Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL select Problem
Hi Simon,
Are you sure you don't have a null value in one of your select lists that you are hoping to compare ? If KNR is null when KGR is null, it won't be picked up in the select list as a null never equals a null. Try NLVing the KGR and see it that helps.
Cheers
Richard
"Simon Heinrich" <sheinrich_at_hightech-vola.de> wrote in message
news:alkj5k$88j$1_at_lancelot.camelot.de...
> Hi NG,
>
> I like to write an SQL select wich searches in an Collum for a list of
> Values and also inkludes that collums wich a 'NULL'
>
> SELECT
> "KUNDAT"."KNR", "KUNDAT"."KGR", "KUNDAT"."FNAME1", "KUNDAT"."FNAME2",
> "KUNDAT"."FNAME3","KUNDAT"."STR", "KUNDAT"."LAND", "KUNDAT"."PLZ",
> "KUNDAT"."ORT","KUNDAT"."POSNR", (SELECT sum ("KUNUMS"."UMS") from
> "DSPHTECH"."KUNUMS" "KUNUMS" where "KUNUMS"."JAHR" in (2001,2002) and
> "KUNDAT"."POSNR" = "KUNUMS"."PNKUNDAT" ) "Umsatz"
> FROM
> "HTECH"."KUNDAT" "KUNDAT",
> "HTECH"."KUNUMS" "KUNUMS"
> WHERE
> "KUNDAT"."POSNR" = "KUNUMS"."PNKUNDAT" And
> "KUNDAT"."NR" in ( select "KUNDAT"."KNR" from "HTECH"."KUNDAT"
"KUNDAT"
> where "KUNDAT"."KGR" is in
>
('AM','CG','CG,GI','CG,PM','COMI','COMI-RF+F','DR','ES','GSH','GT','HÄ','HIL
>
D','IGH','KL','ME','NW','NW-ME','RE','RK','SANIGRO','SED','SU','SU-AUS','SU,
>
PI','TECHNO','THY','UH,PI','UH,BRICK','UH,H','UH,TAXIS','UH,VMG','VBH','VBH,
> B','WIEDEMANN','WUP') or "KUNDAT"."KGR" is null)
>
> ....but this doesen`t work :(
>
> I hope you can help me.
>
> Simon
>
>
>
Received on Tue Sep 10 2002 - 08:52:27 CDT
![]() |
![]() |