Page 1 of 1

Generate repeated values in target table

Posted: Wed Jun 21, 2006 1:48 am
by Amarpreet
I have a scenario wherein I have some 2000 records in target table. There is one source table in which only one field is there (say 10 random values). There is no joiing condiiton between these tables. I have to poplulate one of my taget columns with this source field and have to run the job as many values are there in source. In the end I should have 2000*10 records in my target table. 2000 records will repeat for each value of the source field. and that value I have to populate in one of my target columns.
How can I do this?

Posted: Wed Jun 21, 2006 1:54 am
by kumar_s
Search for Cartesian product or join.
Create a dummy column say with a value of 1. In both the tables if possible. And make a join betweent the two table on the dummy column during run time. Or do a lookup on the column. Which will force the cartecial product.