Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Sybase/Sql server Outer Joins, nulls, and counts

Re: Sybase/Sql server Outer Joins, nulls, and counts

From: Brian Peasland <dba_at_nospam.peasland.net>
Date: Tue, 24 Oct 2006 20:47:10 GMT
Message-ID: <J7nr2n.G4x@igsrsparc2.er.usgs.gov>


> select count(*)
> from E621.dbo.THE_TABLE r
> LEFT OUTER JOIN
> E622.dbo.THE_TABLE e
> On r.unique_id = e.unique_id
> And e.unique_id is NULL

Try the following:

  select count(*)

  from E621.dbo.THE_TABLE		r
  	LEFT OUTER JOIN
  	E622.dbo.THE_TABLE	e

  On r.unique_id = e.unique_id
  WHERE e.unique_id is NULL

See if that works.

HTH,
Brian

-- 
===================================================================

Brian Peasland
dba_at_nospam.peasland.net
http://www.peasland.net

Remove the "nospam." from the email address to email me.


"I can give it to you cheap, quick, and good.
Now pick two out of the three" - Unknown
Received on Tue Oct 24 2006 - 15:47:10 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US