March 26, 2010, 03:05 PM
Maria Tanpassthrough and variable
Hey;
I have the following codes who works fine to date update via passthrough. However i want to make
where query as variable, ex:
WHERE EMPLOYEE_ID EQ &employeeNum;
and it won't work. Any idea?
Original fex file
SET SQLENGINE=SQLMSS
SQL SQLORA SET SERVER EUM
SQL SQLORA
UPDATE PERSON
SET LAST_UPDATED_DATE = SYSDATE
WHERE EMPLOYEE_ID = 'N01';
END
-IF &LINES EQ 0 GOTO REPTDONE;
-RUN
-EXIT
-REPTDONE
-HTMLFORM NODATA
March 26, 2010, 03:11 PM
Darin LeeWhat do you mean by "it won't work"? error messages? not updating? updating wrong records?
Also, you are missing the quote marks. Should be WHERE EMPLOYEE_ID = '&employeeNum'; (EQ isn't valid SQL syntax) and &employeeNum would either need to be populated (by a -SET or -DEFAULT) or "Prompt for Parameters" property turned on.
March 26, 2010, 03:13 PM
fatboyjimHi,
The WHERE statement is missing quotes
WHERE EMPLOYEE_ID EQ '&employeeNum';
Best Regards,
Jimmy Pang
March 26, 2010, 03:52 PM
Maria TanHey, Darin and Jimmy;
The field got updated.
Thanks a million for your help you gave.
Maria