× 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 have this code that originally had a group by so that one line was always
inserted into WSKUSUM99. The "1" after the field job is the sequence#.


exec Sql
insert into wskusum99 (
job , 1 , next value for styhs2r, msc1, msc2,shp,sea,sty,clr,
fab,mod,msz,qt2,qt3)

select :#sdjb#, seq,
0,'a','PHYSICAL COUNT',ls.shp, ls.sea, ls.sty, ls.clr,
ls.fab, ls.mod, ls.msz,
ls.qty, ls.qty

How can I change the 1 to an incrementing field? The table column is
defined as seq (3,0)

I found this code to create a sequence. I But I would like to reset it to 1
every time. How do I do that? Also,how do I put "next value for styhs2r"
into the insert statement?

exec Sql
create sequence styhs2r
start with 1
increment by 1
no maxvalue
no cycle;

Thanks

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.