|
message: 8
date: Tue, 10 Jul 2007 17:28:41 -0400
from: rob@xxxxxxxxx
subject: Imbedded SQL vs Sequence object
I have a sequence object. I am trying to use it with:
exec sql insert into testlib/ordline
(ordernbr, orderline, active, itemnumber, orderquantity,
somenbr)
values(:LastOrder, :Z, '1', SECOND(CURRENT TIME),
:ItemNumber,
NEXT VALUE FOR testlib/SEQUENCE);
However I am getting:
Column SEQUENCE not in specified tables.
Then I tried STRSQL using:
INSERT INTO testlib/ORDLINE (ORDERNBR, ORDERLINE, ACTIVE,
ITEMNUMBER, ORDERQUANTITY, SOMENBR) VALUES(1, 1, '1',
SECOND(CURRENT TIME), 'Item 1', NEXT VALUE FOR testlib/SEQUENCE)
and I get:
testlib in *LIBL type *DTAARA not found.
Apparently it has a tough time qualifying a sequence object. And, yes, I
have my session attributes set up to use the library/object naming.a
Creating the sequence in the default library, and removing the
qualification, worked.
V5R4
PTF Group Level
SF99540 7107
SF99539 45
SF99504 10
Yes, I know, I hate qualifying libraries. But, as they all say, this is
special case.
Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.