|
Thanks, this works perfect
On Fri, Apr 16, 2010 at 2:17 AM, Birgitta Hauser wrote:
SELECT ... INTO is not allowed with dynamic SQL,
but VALUES INTO is!
MyStatement = 'Values(select date(JOTSTP), time(JOTSTP) +
From %TrimR(templib) + '/' + %TrimR(tempfile) +
ORDER BY JOTSTP desc +
fetch first 1 row only) into ?, ?';
Exec SQL Prepare DynSQL from :MyStatement;
Exec SQL Execute DynSQL Using :Date1, :Time1;
Ashish Kulkarni wrote:
Where i can pass templib and tempfile from other program, all
the tables will have these 2 columns
dtemplib s 10a inz('QTEMP')
dtempfile s 10a inz('myfile')
d date1 s d
d time1 s t
MyStatement = 'select (date(JOTSTP)), (time(JOTSTP)) '
+ 'into :date1 , :time1 from '
+ %TrimR(templib) + '/' + %TrimR(tempfile)
+ ' ORDER BY JOTSTP desc fetch first 1 row only ';
Exec SQL
Execute Immediate :MyStatement;
This is not working for me at all
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.