Subject | Re: SELECT INTO :var gives Unknown Token INTO error |
---|---|
Author | Peter Welch |
Post date | 2004-12-27T17:19:41Z |
Thank you, Daniel. Some of my problems did stem from not ensuring a
singleton select.
SQL is such a bear to program in. Despite the great advances in OOP,
we're back to murky SQL procedural programming to implement a .NET
solution -- if what I read is correct, that one should use stored
procedures for all database activity. IOW, all business logic is being
put back in the database.
Pete
singleton select.
SQL is such a bear to program in. Despite the great advances in OOP,
we're back to murky SQL procedural programming to implement a .NET
solution -- if what I read is correct, that one should use stored
procedures for all database activity. IOW, all business logic is being
put back in the database.
Pete
> > or the SQL standard. Is there a reference that compares Firebird
> > syntax to the current SQL standard?
>
> Although, INTO is accepted in the embedded SQL, it's not accepted in
> 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)