I have created a job stream...it has certain condition as well..have placed a sql node to insert/capture that variable value into database table...but unable to read the variable values in insert statement
i have mentioned the insert as below:
insert into x_dbvalues
values($chkVar,'s');
the values $chkVar is a texttype of column in table.
To use a variable in a SQL node, you will need to include it in a pair of braces {} - ie
insert into x_dbvalues
values({$chkVar},'s');
Alternatively, do this from a Procedure Node using a SQL() function.
Regards,
MF.
SQL() would help in such statements to run:
To run the below SQL statement
--------------
insert into x_dbvalues
values($chkVar,'s');
--------------
Use below code:
$QUERY := CONCAT('INSERT INTO x_dbvalues VALUES(','''',$chkVar,''',''s'')');
SQL('TARGET', $QUERY);
Use of {}, will result in substituting of default values assigned to the variable while inserting rahther than the changed value in variable.