Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> SQL - Special Sorting need for Result set
Hello,
Need some help with returning a result set with a special sort.
Example of rows:
Type Name
credit sam
credit will
credit david
credit kate
debit bob
debit joe
debit kate
debit david
salary fred
salary will
salary phill
Need result set to be:
Type Name
credit sam
credit will
credit david
debit david
credit kate
debit kate
debit bob
debit joe
salary fred
salary will
salary phill
If the "name" has a matching Debit and Credit I need them grouped together. the rest will be regularly sorted by type.
Any ideas on the SQL. A regular ORDER BY will not solve this. I can be emailed at devdewboy_at_hotmail.com
Thank you much Received on Tue Jun 26 2007 - 13:32:05 CDT