Re: Left Outer Join Only Including Matching Rocords



On Fri, 22 Jun 2007 12:31:02 -0700, Stan wrote:

I am executing the following SQL statement in Management Studio in a SQL
Server 2005 environment:
Select
wl.wmslocationid,il.itemid,il.citullcastartpickinglocation,il.citullcaendpickinglocation
from wmslocation wl left outer join inventitemlocation il
on wl.wmslocationid = il.citullcastartpickinglocation

The returned set of records ONLY shows the records that have matching
entries in both tables. The records from the 'left' table are dropped from
the result. This is not behaving the way a 'left outer' should behave.

Hi Stan,

If this is the *complete* query you are sending, then you might have run
into a bug - though it would surprise me, since this is a fairly regular
kind of query and bugs usuallly only appear in obscure queries that are
not in the standard testet of MS and seldom used in the real world.

I suspect that there is another explanation - but to find it, I need to
be able to reproduce the problem. For that, I need a SQL script
containing the CREATE TABLE statements to reproduce your tables,
including all constraints, properties, and indexes; some INSERT
statements with a few well-chosen rows of sample data; the *EXACT* query
you are executing: and both the expected and real output.

I'd also like to know what version of SQL Server you have running.
Please post the result of
SELECT @@VERSION

--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
.



Relevant Pages

  • RE: SBS 2003 Unable to connect to database STS_Config
    ... Uninstall the SQL server from the SBS 2k3 server from add/remove programs ... Uninstall Microsoft SQL Server Desktop Engine (SHAREPOINT) ... If AV software install any extra IIS virtual directory, ...
    (microsoft.public.windows.server.sbs)
  • RE: migrating from wmsde to sql server
    ... Click Start, point to All Programs\Microsoft SQL Server, and then click ... then click New SQL Server Registration. ... Microsoft CSS Online Newsgroup Support ... This newsgroup only focuses on SBS technical issues. ...
    (microsoft.public.windows.server.sbs)
  • RE: SBS 2003 Unable to connect to database STS_Config
    ... Uninstall the SQL server from the SBS 2k3 server from add/remove programs ... Uninstall Microsoft SQL Server Desktop Engine (SHAREPOINT) ... If AV software install any extra IIS virtual directory, ...
    (microsoft.public.windows.server.sbs)
  • Re: Best replication architecture?
    ... Looking for a SQL Server replication book? ... So if it is subscribing to Publisher 1, ...
    (microsoft.public.sqlserver.replication)
  • RE: Insufficient memory Available
    ... Insufficient memory available. ... within the scope of SQL Server. ... "MemToLeave" area. ...
    (microsoft.public.sqlserver.server)