- Contents
Interaction Designer Help
Sample SQLExec Statements
When building SQLExec statements for use in a DB SQL Exec step, you must build the SQLExec statements in a Assignment step (using the Expression Editor Assistant) and assign it as the value of a variable. Building a SQLExec statement from the Expression Editor Assistant requires special formatting. Refer to the following examples when constructing your Where clauses:
SQLExec statement:
"INSERT INTO CUSTOMER_TABLE (CUSTOMER_ID, CUSTOMER_NAME, CITY, STATE) VALUES ('ACB8934', 'Joe''s Bar & Grill', 'Indianapolis', 'IN') "
Assign String using a literal:
"INSERT INTO CUSTOMER_TABLE (CUSTOMER_ID, CUSTOMER_NAME, CITY, STATE) VALUES ('ACB8934', 'Joe''s Bar & Grill', 'Indianapolis', 'IN') "
Assign String using variables:
"INSERT INTO CUSTOMER_TABLE (CUSTOMER_ID, CUSTOMER_NAME, CITY, STATE) VALUES (" & SQLStr(var_customer_id) & "," & SQLStr(var_customer_name) & "," & SQLStr(var_city) & "," & SQLStr(var_state) & ")"
Note: See the SQLStr help for more information on the SQLStr function.