Subject | Re: [ib-support] Embedded SQL anyone? |
---|---|
Author | Svein Erling Tysvær |
Post date | 2002-04-03T11:00:18Z |
First of all, using SQL-92 is recommended:
EXEC SQL SELECT i.rating_factor1, rfa.descr, i.rating_factor2, rfb.descr
INTO :Hid1, :HrtgFDesc1, :Hid2, :HrtgFDesc2
FROM instable i
JOIN rating_factor rfa ON rfa.id = i.rating_factor1
JOIN rating_factor rfb ON rfb.id = i.rating_factor2
WHERE i.id = :Hid
But I don't think this is your problem, since I think -104 indicates wrong
syntax and your syntax appears good. Didn't your error message give any
hint as to where in your statement it was unhappy (e.g. line xx, char xx).
It could be as simple as you forgetting to issue a SET TERM or something.
If SET TERM is not something used in embedded SQL, well, then you've
discovered my knowledge on the subject (sorry, I never need embedded SQL).
HTH,
Set
EXEC SQL SELECT i.rating_factor1, rfa.descr, i.rating_factor2, rfb.descr
INTO :Hid1, :HrtgFDesc1, :Hid2, :HrtgFDesc2
FROM instable i
JOIN rating_factor rfa ON rfa.id = i.rating_factor1
JOIN rating_factor rfb ON rfb.id = i.rating_factor2
WHERE i.id = :Hid
But I don't think this is your problem, since I think -104 indicates wrong
syntax and your syntax appears good. Didn't your error message give any
hint as to where in your statement it was unhappy (e.g. line xx, char xx).
It could be as simple as you forgetting to issue a SET TERM or something.
If SET TERM is not something used in embedded SQL, well, then you've
discovered my knowledge on the subject (sorry, I never need embedded SQL).
HTH,
Set