Hello,
I am trying to build a SQL statement dynamically for execution within a
procedure, using PREPARE ... OPEN.
SET v_sql = ' SELECT a,b,c,d,e, .....x,y,z FROM table1, table2 WHERE
a = v_1...and so on FOR READ ONLY';
What is used for continuation if I want to break the variable v_sql out
into lines so one can read it?
SET v_sql = ' SELECT a,b,c,d,e, .....x,y,z (what goes here?)
FROM table1, table2 (and here?)
WHERE a = v_1...and so on (and here?)
FOR READ ONLY';
Thanks
Purple-D - 29 Jun 2006 17:55 GMT
You could try the concat function or ||
> Hello,
>
[quoted text clipped - 13 lines]
>
> Thanks
--CELKO-- - 30 Jun 2006 13:29 GMT
>> I am trying to build a SQL statement dynamically for execution within a procedure, ..<<
Do not write code like this. It says that your design is so bad that a
random future stranger can do a better job at run-time that you did
with all the specs and weeks of coding. You say that you don't know or
care about SQK injection, etc. Justr sloppy coding
>> What is used for continuation if I want to break the variable v_sql out into lines so one can read it? <<
Why are you worred about display instead of performance anyway? This
is like asking a furniture newsgroup for the best rocks for smashing
screws into wood. The quick answer in "Granite!" but the right answer
is "uses a screw driver" instead.