mcunningham
New Member
Is there a way to substitute variables in a SQL statement embedded within an INPUT THROUGH statement. Here is what my code looks like:
assign
a = "something"
b = "something"
c = "something".
output through "/path/mysql -u uid -ppwd -D db -e 'insert into cust values (I want to substitute variables here)'".
put a b c.
I have tried any number of ways to put the variables into that statement and nothing seems to work.
I have tried creating a "cmd" variable and typing the entire sql statement into it and then using output through value(cmd) and that strips out all quotation marks - even those I force using ~ which then nets an error message.
I have also tried putting the code into a UNIX SILENT command and get the same results.
Am I missing something or is there a way to substitute the variables?
Thanks in advance for your help!!
Mary
assign
a = "something"
b = "something"
c = "something".
output through "/path/mysql -u uid -ppwd -D db -e 'insert into cust values (I want to substitute variables here)'".
put a b c.
I have tried any number of ways to put the variables into that statement and nothing seems to work.
I have tried creating a "cmd" variable and typing the entire sql statement into it and then using output through value(cmd) and that strips out all quotation marks - even those I force using ~ which then nets an error message.
I have also tried putting the code into a UNIX SILENT command and get the same results.
Am I missing something or is there a way to substitute the variables?
Thanks in advance for your help!!
Mary