× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I can explain this. It is not possible for the SQL parser to determine any
difference between these two expressions:

NEXT VALUE FOR mylib/sequence
NEXT VALUE FOR sequence/column1

You know when you write the first one that you want it to mean a qualified
sequence reference. And you know the second one is division. But the SQL
parser cannot distinguish between them. The / in an expression must mean
division. The same problem exists for qualifying a function in system
naming - you will always get division.

Sue Romano

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.
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
a
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 thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.