|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 5/29/2008 5:40:04 PM
Posts: 7,
Visits: 11
|
|
hi,
i am needing help on how to create a table (No RAW data to insert) , only generate the count from 1 to 1000.
the final table will
Counter
1
.
.
.
1000
Thank you very much.
T-Nguyen
|
|
|
|
|
Forum Member
      
Group: Forum Members
Last Login: 9/16/2008 7:29:17 AM
Posts: 28,
Visits: 154
|
|
Hi,
Create table as mentioned below and exec the foll. query.
CREATE SET TABLE ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT
(
ID_COL INTEGER GENERATED ALWAYS AS IDENTITY
(START WITH 1
INCREMENT BY 1
MINVALUE -2147483647
MAXVALUE 1000
NO CYCLE))
UNIQUE PRIMARY INDEX ( ID_COL );
INSERT INTO
SELECT 1 FROM DB_NAME.TABLE_NAME_2
Just make sure, above select query fetches the number of records you want. In this case 1000.
Dhiraj P
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 10/3/2008 7:39:41 AM
Posts: 483,
Visits: 213
|
|
Hi Dhiraj,
did you try it, this will not work :-)
If it's less than 73000 values:
insert into tab
select day_of_calendar
from sys_calendar.calendar
where day_of_calendar <= 1000
Dieter
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 5/29/2008 5:40:04 PM
Posts: 7,
Visits: 11
|
|
Hi, it does not work. it did not fetch the record, only insert 1 record. the max value may go up to 999999999999999.
thanks,
T-Nguyen
|
|
|
|