I am trying to take a variable from a text box (variable name JOB_ID) in applicaiton builder and use it as part of a concatonated string.
I have the code below as the press code in a button
SQL_Statement ="SELECT * FROM SAS_Plate_Reader t1 Where Job_ID='"||Job_ID||"'";
New SQL Query(
QueryName( "SAS_Plate_Reader" ),
CustomSQL( SQL_statement )
) << Run;
The error message i get is:
rgument should be character in access or evaluation of 'Concat' , Bad Argument( Job_ID ), "SELECT * FROM SAS_Plate_Reader t1 Where Job_ID='" || /*###*/Job_ID || /*###*/"'" /*###*/
I think I dont understand the name space to pass the textbox to the script or how to concatenate a string properly, so any help appreciated!
SQL_Statement ="SELECT * FROM SAS_Plate_Reader t1 Where Job_ID='"||char(Job_ID)||"'";I'm guessing your Job_ID os a numeric type and you are trying to concat this to a string. Need to cast to a string with teh char() fn.
It looks Job_ID is a variable that holds a texteditbox. What you need is the string that the texteditbox has in it. You can do that with the message Get Text.
In your code, try this (change in red):
SQL_Statement ="SELECT * FROM SAS_Plate_Reader t1 Where Job_ID='"||(Job_ID<<Get Text)||"'"
There are no labels assigned to this post.