Klo pake decode kyk ny g bsa,
Tapi coba menggunakan CASE
Misal
Select case when amount > 0 and amount < 100 then A
when amount > 100 then B
else to_char(amount) end
from table
Semoga bisa membantu :-)
Regards
Ones (STIKOM SURABAYA)
_____
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of abang sunda
Sent: Friday, October 26, 2007 5:02 PM
To: [email protected]
Subject: [indo-oracle] ask : tanya query pakai decode
all,
bagaimana syntaxnya untuk query number,
agar jika jumlahnya diatas 0 tapi < 100 maka yg
tampil adalah 'A',
sedang jika > 100 yg tampil adalah B ?
jadi spt ini ( hanya contoh, karena pasti gak jalan :)
select decode(amount,-0< ?<100,'A',>100,-B,amount) from
table ?
yg aku tahu sih kalau bedain negatif / positif spt ini
select decode(sign(--12),-1,'-A','B') from dual;
makasih
____________-_________-_________-_________-_________-__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
HYPERLINK "http://mail.yahoo.com"http://mail.-yahoo.com
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 269.15.10/750 - Release Date: 10/24/2007
12:00 AM
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 269.15.10/750 - Release Date: 10/24/2007
12:00 AM
[Non-text portions of this message have been removed]
--
-----------I.N.D.O - O.R.A.C.L.E---------------
Keluar: [EMAIL PROTECTED]
Website: http://indooracle.wordpress.com
-----------------------------------------------
Bergabung dengan Indonesia Thin Client User Groups,
Terminal Server, Citrix, New Moon Caneveral, di:
http://indo-thin.blogspot.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/indo-oracle/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/indo-oracle/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/