Home » SQL & PL/SQL » SQL & PL/SQL » Multiple rows from a single row
Multiple rows from a single row [message #21676] Thu, 22 August 2002 05:54 Go to next message
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.
Re: Multiple rows from a single row [message #21715 is a reply to message #21676] Sun, 25 August 2002 07:18 Go to previous message
Try
Messages: 8
Registered: July 2002
Junior Member
I gues you have to write a pl/sql with FOR loop. Try it out.

Good luck :)
Previous Topic: help me urgent
Next Topic: Information on SELCT Query
Goto Forum:
  


Current Time: Fri Apr 26 14:54:00 CDT 2024