I have few rows i one table with CUD-No as the primary key and the table has 300 + columns.
I need to create almost 300 to 400 records , i am trying to create all these rows just copying the one of existing row but just incrementing the CUD-No , is there any way to do it . I do not want to use column list in the sql as there are so many columns , again i do not want to create rows with any default value i want to pick all values to be picked as exists for the sample CUD-No (which is existin in the table)
Joined: 20 Oct 2006 Posts: 6970 Location: porcelain throne
I do not want to use column list in the sql as there are so many columns
if you had decent ISPF skills,
capturing the column names and putting them in your sql would take 30 seconds.
change the select CUD-No + 1 in your dsntemp2/dsnutial dump
then you have an unload that you could immediately reload.
use the ispf command CUT (CC on first column name and CC on last)
to capture the column names in the ddl
use the ispf command PASTE
to put them in a member that you use for your sysltin
x all, display the first (line command F)
display the last (line command L)
use )) to shift the column names where you want them,
Insert a line containing a comma ',' aligned before the start of column name
line command M on the comma line,
line command OO on the first non-displayed line,
line command OO on the last line (the last column name which is displayed)
add the '+ 1' to CUD_No
save and execute.