Subject Embedded SQL anyone?
Author Peter Faulks
G'day

Does anybody actually use Embedded SQL anymore (or am I the only one?)

I have a heap of questions about some of IB/FB's "quirks" - like

1) what is the deal with isc_decode_sql_date() why is the result in the tm
struct a 2 digit year and why is the month off by 1?
2) a type decimal - seems to be off by a factor of 100 when fetched into a
float or even a double - what gives?
3) I have a query that works fine in insql but barfs in embedded sql -

SQL> SELECT i.rating_factor1, rfa.descr, i.rating_factor2, rfb.descr
CON> FROM instable i, rating_factor rfa, rating_factor rfb
CON> WHERE i.id = 1 AND rfa.id = i.rating_factor1
CON> AND rfb.id = i.rating_factor2;

RATING_FACTOR1 DESCR
RATING_FACTOR2 DESCR
==============
============================================================ ====
========== ============================================================

2 Waiting Period
1 Benefit Period



EXEC SQL SELECT i.rating_factor1, rfa.descr, i.rating_factor2, rfb.descr
INTO :Hid1, :HrtgFDesc1, :Hid2, :HrtgFDesc2
FROM instable i, rating_factor rfa, rating_factor rfb
WHERE i.id = :Hid AND rfa.id = i.rating_factor1 AND rfb.id =
i.rating_factor2;


I get SQLCODE of -104 Invalid token

Any Ideas?