Multiple rows from a single row [message #21676] |
Thu, 22 August 2002 05:54 |
Kalyan Dande
Messages: 1 Registered: August 2002
|
Junior Member |
|
|
How can I get multiple rows from a single row using SQL? My requirement is like this:
Suppose, I have few records in dept table, as
Dept# DeptName Location
----- -------- --------
5 Sales New York
10 Operations Los Angeles
How do I print these records by dept# times? My output should be record with dept# should be printed 5 times as it has a value of 5 and record with dept# should be printed 10 times as it has a value of 10.
Please do not respond with replies using huge tables as joins. I want to do this using dept table alone or using dual table in conjuntion with dept table.
|
|
|
|