[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
[sqr-users] Order by the values obtained in the amount columns
- Subject: [sqr-users] Order by the values obtained in the amount columns
- From: ashwin reddy <ashwin443@yahoo.co.uk>
- Date: Tue, 6 Mar 2007 22:45:28 +0000 (GMT)
- Delivery-date: Tue, 06 Mar 2007 17:48:09 -0500
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk;h=Message-ID:X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding;b=peefYsgr7Sw2rMjDNtzAL3fkZJMdEQY7KTRSVEsGjhTZaYpgzcdSTl4L73ZSFAt3LP9alGShIp6lpIRnEF/+Mb7VeFeAqifCOF+P5zJxoh24lmWeuZcqBb9TNsoTPrgTCLrfmb6b9Zdj5U1Dr6SlI7skPlPx4kM56X+SaL6aGnc=;
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
I am having a small problem in figurin this out maybe someone has done this
before
Here is my problem ..... here is the sql i have written
select cust_name , item_amt , billable_flg
from ps_xxx
where ....
order by billable_flg desc , cust_name
The output will order by billable_flg and customer name .... here is the
result of the output
billable_flg name item_amt
Y A..... 123.22
Y B.... 0.00
Y C.... 21.00
N A.... 213.22
N B.... 321.22
what i am finally supposed to do is ....to put all the item_amt which are
equal to zero at the end but just before the billable_flg is changed to 'N'
from 'Y'
final output required
billable_flg name item_amt
Y A..... 123.22
Y C.... 21.00
Y B.... 0.00
N A.... 213.22
N B.... 321.22
any ideas on how to do it ...even if u know some order by syntaxes that i can
try let me know i can test it on my query
Thanks,
Ashwin
---------------------------------
New Yahoo! Mail is the ultimate force in competitive emailing. Find out more
at the Yahoo! Mail Championships. Plus: play games and win prizes.
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users