RE: Simple SQL Query Question

2001-07-02 Thread Amar Kumar Padhi
select 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 am39 where station = ''; rgds amar

Re: Simple SQL Query Question

2001-07-02 Thread novicedba
SELECT STATION,EMISSION_FREQ,RECEPTION_FREQ,DECODE(SUBSTR(NVL(TO_CHAR(RECEPTION_FREQ),'NONE'),1,1),'N',EMISSION_FREQ*1,EMISSION_FREQ*2) VALUEFROM TEST; STATION EMISSION_FREQ RECEPTION_FREQ VALUE-- - -- -STAT1 192.5 193.5 385STAT2 192.5

Re: Simple SQL Query Question

2001-07-02 Thread novicedba
you could achieve this using decode cozI am anoviceOracle Certifiable DBBS - Original Message - From: ALEMU Abiy To: Multiple recipients of list ORACLE-L Sent: Monday, July 02, 2001 1:00 PM Subject: Simple SQL Query Question I've a table with the following

RE: Simple SQL Query Question

2001-07-02 Thread ALEMU Abiy
I'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-LObjet: RE: Simple SQL Query Question select count((case

RE: Simple SQL Query Question

2001-07-02 Thread ALEMU Abiy
-Message d'origine-De: novicedba [mailto:[EMAIL PROTECTED]]Envoyé: lundi 2 juillet 2001 11:15À: Multiple recipients of list ORACLE-LObjet: Re: Simple SQL Query Question SELECT STATION,EMISSION_FREQ,RECEPTION_FREQ,DECODE(SUBSTR(NVL(TO_CHAR(RECEPTION_FREQ),'NONE'),1,1),'N

RE: Simple SQL Query Question

2001-07-02 Thread Harsh Agrawal
, 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 Question select count((case when (nvl(emission_freq, 0) != 0 and nvl

RE: Simple SQL Query Question

2001-07-02 Thread ALEMU Abiy
2001 13:20À: Multiple recipients of list ORACLE-LObjet: RE: Simple SQL Query Question 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

Re: Simple SQL Query Question

2001-07-02 Thread novicedba
Message - From: ALEMU Abiy To: Multiple recipients of list ORACLE-L Sent: Monday, July 02, 2001 3:30 PM Subject: RE: Simple SQL Query Question For example for a table like this one, STATION EMISSION_FREQ RECEPTION_FREQ

RE: Simple SQL Query Question

2001-07-02 Thread ALEMU Abiy
Thank you Harsh, your query seems working -Message d'origine- De : Harsh Agrawal [mailto:[EMAIL PROTECTED]] Envoyé : lundi 2 juillet 2001 14:05 À : Multiple recipients of list ORACLE-L Objet : RE: Simple SQL Query Question Hi ALEMU Abiy, Try out this : select count(*)*2 FREQC from

RE: Simple SQL Query Question

2001-07-02 Thread ALEMU Abiy
Your query also seems working, not anovice's solution :--) Thank you -Message d'origine-De: novicedba [mailto:[EMAIL PROTECTED]]Envoyé: lundi 2 juillet 2001 14:05À: Multiple recipients of list ORACLE-LObjet: Re: Simple SQL Query Question select decode(emm_freq,0,1