Subject | Re: [firebird-support] Re: SELECT INTO :var gives Unkown Token INTO error |
---|---|
Author | Daniel Rail |
Post date | 2004-12-18T11:05:13Z |
Hi,
At December 17, 2004, 12:50, Peter Welch wrote:
DSQL(Dynamic SQL), which the .Net provider uses.
But, according to the SQL standard the INTO clause should be accepted
for singleton selects in DSQL, but not for a multiple row selects.
And, the syntax for using INTO in a singleton select is as
follows(taking your example):
SELECT min(id) INTO :Id from trays where tray_no = :aTray;
So basically, Firebird does follow the SQL standard in relation to
multiple row selects, and that INTO could be added to the support of
singleton selects, just to be more SQL standard compliant.
--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)
At December 17, 2004, 12:50, Peter Welch wrote:
> Luc, You're the greatest! Now it works. Thank you. I am still puzzled,Although, INTO is accepted in the embedded SQL, it's not accepted in
> though, as to the pervasive use of INTO - it works in other SQL
> statements in my program - and inconsistent support by either Firebird
> or the SQL standard. Is there a reference that compares Firebird
> syntax to the current SQL standard?
DSQL(Dynamic SQL), which the .Net provider uses.
But, according to the SQL standard the INTO clause should be accepted
for singleton selects in DSQL, but not for a multiple row selects.
And, the syntax for using INTO in a singleton select is as
follows(taking your example):
SELECT min(id) INTO :Id from trays where tray_no = :aTray;
So basically, Firebird does follow the SQL standard in relation to
multiple row selects, and that INTO could be added to the support of
singleton selects, just to be more SQL standard compliant.
--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)