Creating Dummy Records
601286Feb 13 2009 — edited Feb 15 2011Hi, wondering if someone can give me some advise..I'm needing to create dummy records off some data, I need 10 total rows for each account number ( Field 2 ).
I've tried a few different ways such as using a ROW_NUMBER() over (partition by FIELD 2) then doing an outer join to
(select rownum r,field 1, field 2 from all_objects
where rownum < 11)
based on row num but I can't get this to work. I can't do this in my data, it has to be in a SQL statement. Anyone have suggestions?
My Data
Field 1 Field 2
10 1029
20 1029
10 1131
20 1131
30 1131
40 1131
50 1131
Desired Result
Field 1 Field 2
10 1029
20 1029
0 1029
0 1029
0 1029
0 1029
0 1029
0 1029
0 1029
0 1029
10 1131
20 1131
30 1131
40 1131
50 1131
0 1131
0 1131
0 1131
0 1131
0 1131