Home » SQL & PL/SQL » SQL & PL/SQL » selelct from a field
selelct from a field [message #406837] Sat, 06 June 2009 04:55 Go to next message
sysman2007
Messages: 24
Registered: March 2009
Junior Member
I have a record like this

ID NAME QTY
-------------------------
001 TEST 4

Is it possible to write a query to repeat this record according count of QTY field.
in this example repeat 4 record like that record


ID NAME QTY
-------------------------
001 TEST 4
001 TEST 4
001 TEST 4
001 TEST 4
Re: selelct from a field [message #406838 is a reply to message #406837] Sat, 06 June 2009 05:09 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Yes, it is possible, search for "row generator".

Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter), use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Regards
Michel
Re: selelct from a field [message #406869 is a reply to message #406838] Sat, 06 June 2009 22:47 Go to previous messageGo to next message
sysman2007
Messages: 24
Registered: March 2009
Junior Member
Michel Cadot wrote on Sat, 06 June 2009 05:09
Yes, it is possible, search for "row generator".

Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter), use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Regards
Michel



OK
but what is my answer???
Re: selelct from a field [message #406870 is a reply to message #406837] Sat, 06 June 2009 22:57 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
>but what is my answer???
It can be found in the Posting Guidelines locker.
Re: selelct from a field [message #406875 is a reply to message #406869] Sun, 07 June 2009 00:56 Go to previous message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
sysman2007 wrote on Sun, 07 June 2009 05:47
Michel Cadot wrote on Sat, 06 June 2009 05:09
Yes, it is possible, search for "row generator".

Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter), use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Regards
Michel



OK
but what is my answer???

In the first line of my post.

Regards
Michel

Previous Topic: Closing Balance Problem
Next Topic: Conditional MIN Function
Goto Forum:
  


Current Time: Fri Dec 09 19:19:07 CST 2016

Total time taken to generate the page: 0.17392 seconds