Re: empty string or null



Frank van Bortel schrieb am 29.03.2007 in <euh3bm$rhd$1@xxxxxxxxxxxxxxxxxxxxxxx>:

Andreas Mosmann schreef:
[snip]
try a JOIN ...
SELECT * FROM ADDRESSES A
LEFT JOIN JOBS J ON
(A.FIRSTNAME=B.FIRSTNAME) and (A.MIDDLENAME=B.MIDDLENAME) and
(A.FAMILYNAME=B.FAMILIYNAME);

no MIDDLENAME- no job

Andreas Mosmann


Does this mean I have a job, and you don't?
:)

I know about VARCHAR2, so I would write the correct query ;)

SELECT * FROM ADDRESSES A
LEFT JOIN JOBS J ON
(A.FIRSTNAME=B.FIRSTNAME
or A.FIRSTNAME is NULL and B.FIRSTNAME is NULL)
and
(A.MIDDLENAME=B.MIDDLENAME
or A.MIDDLENAME is NULL and B.MIDDLENAME is NULL)
and
(A.FIRSTNAME=B.FAMILIYNAME
or A.FAMILIYNAME is NULL and B.FAMILIYNAME is NULL)
and NULL is NULL
and 1=1
and 2=2
..
and 'A'='A'
..

are you interested in knowing which job has Mr. ?
(long time ago he had to call himself "nobody", but now "" is a correct name)


best regards
Andreas <no middlename> Mosmann

--
wenn email, dann AndreasMosmann <bei> web <punkt> de
.