Well, then decode would be the only option, as suggested by other
members. Case is not supported.
rgds
amar
-----Original Message-----
From: ALEMU Abiy [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 2:00 PM
To: Multiple recipients of list ORACLE-L
Subject: RE: Simple SQL Query QuestionI'm using Oracle 7.3.4, so is it possible to use CASE statements ?-----Message d'origine-----
De : Amar Kumar Padhi [mailto:[EMAIL PROTECTED]]
Envoy� : lundi 2 juillet 2001 10:57
� : Multiple recipients of list ORACLE-L
Objet : RE: Simple SQL Query Questionselect count((case when (nvl(emission_freq, 0) != 0 and nvl(reception_freq, 0) != 0)
then 1 else null end)) * 2 +
count((case when (nvl(emission_freq, 0) != 0 and nvl(reception_freq, 0) != 0)
then null else 1 end)) * 1 as "total"
from am39where station = 'xxxx';rgdsamar-----Original Message-----
From: ALEMU Abiy [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 11:30 AM
To: Multiple recipients of list ORACLE-L
Subject: Simple SQL Query QuestionI've a table with the following structure and sample data :Station Emission_Freq Reception_Freq-------- ----------------- ------------------STAT1 192.5 193.5STAT2 193STAT2 194STAT2 193.5 194.5STAT2 195And I would like to select the number of frequencies, sort of count(*), for a given station and multiply that value by 2 if the station has Emission frequency and reception frequency and multiply by one if the station has only the emission frequency or only the reception frequency. I don't know how to use a condition in SQL. I'm sure that it's possible to do it but I don't know how. Can anybody help me ?------------------------------------------------------------------------------------@biy @lemuDatabase Administration EngineerFrance
