Good News Everybody!
The new search engine is LIVE!
Please report any problems to david (at) midrange.com.
|
I've got a table that was created via an SQL statement that looks
like this:
<<SNIP create table>>
I need to get the key that is created when an insert is done
and this is what I've pulled from a sample from a DB2 Cookbook
but I'm getting an error in WDSc when trying to enter it:
Exec SQL
Select HDRHEADKEY
InTo :HeaderKey
From Final Table
(Insert InTo NotePadHd
( HdrDate, HdrTime , HdrUser , HdrCaption
, HdrDesc, HdrInsName, HdrSubject)
Values(:NoteDate, :NoteTime, :NoteUser , /* value? */
' ' , :InsuredName, ' '))
End-Exec
SQL0199 Keyword TABLE not expected. Valid tokens:
FOR WITH FETCH ORDER UNION EXCEPT OPTIMIZE
Am I trying to do something that can't be done? Is there another
way to get the newly created key from an insert to be used in
another table?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.