How can i hold multiline sql query in a shell variable?
SQL='Lets get CREATE TRIGGER STATEMENT'
How to hold it?
How can i hold multiline sql query in a shell variable?
SQL='Lets get CREATE TRIGGER STATEMENT'
How to hold it?
This worked well for me
extract_sql="SELECT *
FROM TABLE"
To run SQLs with command line tools like wxsubmit or sqlplus
commandlinesqltool -options << EOF > /dev/null 2>&1
SET HEADER OFF
UPDATE TABLE
SET A=1;
EOF
Declare @sql nvarchar(max);
SET @sql='SELECT *'+char(13) +'FROM table'
Print(@sql);
result: SELECT *
FROM table
In above query char(13) will hepls to write in next line.
Now @sql variable has two lines.