Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

An easy ORDER BY..., but it didn't work.

Status
Not open for further replies.

ssapex

MIS
May 23, 2005
2
US
This is part of code from Q_Lines of Oracle standard report RAXINV.

Select...
From…
Where…
order by
/* comment out for bug 745960 :
decode(msi.item_type,
'FRT', 'Z',
'A') ,
*/
decode( c2.line_number,
null, decode( c.line_type,
'LINE', c.line_number*10000+0,
'TAX', c.line_number*10000+8000,
100000000000),
decode( c2.line_type,
'LINE', c2.line_number*10000+0,
'TAX', c2.line_number*10000+8000,
c2.line_number*10000+9000) +
decode( c.line_type,
'LINE', 0,
'TAX', 8000,
'FREIGHT', 9000) +
c.line_number )

In order to collect detail lines in pair, I added another order by column in front. like this:

Order by
c.inventory_item_id, (in order to have the transactions printed with pairs)
….old stuff

The result through SQL Navigator comes out what I am looking for. However, after I compiled it and uploaded to the server, the report looks unchanged. Well, I should say it changed. Instead of order change, there are some numbers missing now. Like this: note all the DELIVs are missing.

Old Version My Version
PLSSR.22721 DELIV:288494 (49.00) PLSSR.22721(49.00)
8201801990L PF…. 30.00 8201801990L PF….30.00
DELIV:288494 PLSSR.22721 (15.00)
PLSSR.22721 DELIV:288494 (15.00) 8667207520C01Main…. 320.00
8667207520C01 Main…. 320.00 PLSSR.22721 (160.00)
PLSSR.22721 DELIV:288494 (160.00)



Can anyone help with this?
 
This would probably get better responces in an Oracle SQL Form.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top