Hi,
I am using surrogate key generator stage to generate incremental number. For this i tried to use a DB2 database sequence. I have specified the sequence name in the 'Source Name' property. The jobs runs fine but the no. doesnt get incremented.. How can we specify 'next value' type of clause to this sequence?
I tried to search the posts, but couldnt find. Request help.
Thnks
Using Surrogate key generator with db2 sequence
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 24
- Joined: Mon Apr 24, 2006 3:34 am
- Location: USA
-
- Participant
- Posts: 24
- Joined: Mon Apr 24, 2006 3:34 am
- Location: USA
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 24
- Joined: Mon Apr 24, 2006 3:34 am
- Location: USA
Make ur table column like this and aviod this column in the mapping area so it populated from 0 and it will incremented by 1saxena_richa wrote:I wud like to know how can we use a db2 sequence in surrogate key generator and increment it. As stated earlier, I am facing prob. in incrementing it. Would be grateful if anyone can help on this.
Thanks
CREATE TABLE DB2_EDW.DIM_CONTRACT (
DIM_CONT_SKEY INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 0, INCREMENT BY 1, NO CACHE) NOT NULL,
DIM_CONT_SDATE DATE NOT NULL DEFAULT '1900-01-01',
DIM_CONT_EDATE DATE DEFAULT '1900-01-01',
DIM_CONT_FLAG CHARACTER(1) NOT NULL DEFAULT 'N')
This is work and i am using that in my project
Regards...
Naveen.K