Quote:
|
Originally Posted by ratheeshknair
[SQL0029] INTO clause missing from embedded statement.
|
I assume this is SQLJ.
Try adding "INTO :varname" between your SELECT and FROM clauses,
where "varname" is the name of the Java variable into which you want the data to be returned.
If you SELECT clause contains multiple columns, you will need multiple variables:
Code:
#sql {
SELECT col1, col2
INTO :var1, :var2
FROM mytable
WHERE ...
};
See e.g. Example 3 on page 882 of the SQL Reference, Volume 2, for DB2 9.5 LUW.