Re: combining inner and outer joins

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Adam Machanic (amachanic_at_hotmail._removetoemail_.com)
Date: 08/23/04


Date: Mon, 23 Aug 2004 11:19:39 -0400

Todd,

Please post DDL (CREATE TABLE statements), sample data (INSERT statements),
the query that works for you in Sybase, and the output you're looking for.

"Todd" <lordstanleycup@hotmail.com> wrote in message
news:0cfc01c48923$e34dbd80$3a01280a@phx.gbl...
> Hello,
>
> I've recently switched from Sybase to SQL Server, and am
> trying to do a join (that Sybase had no problem with) that
> SQL Server will not allow:
>
> 3 tables:
>
> tables: store store_att attribute
>
> columns: key *----- key
> att_code ----- att_code
> att_desc
>
> I need a query that will return all rows from store, along
> with the att_desc when there is a match. (Store att may
> have no, or many records to match the key). SQL Server
> does not allow this stating the table is an inner member
> of an outer join clause. How do I go about this in SQL
> Server? I've tried to workaround using a view with the
> outer join, and then using a inner join in the query, but
> no luck, same message.
>
> thanks
> Todd



Relevant Pages

  • Re: CONTAINS performance
    ... How can I predict the scalability of the simple query given that I don't ... but will measure the FTS with multiple clients issuing random FTS queries. ... B on A.bid=B.id left outer join ... the SQL Server query optimizer executes this query in the optimal manner ...
    (microsoft.public.sqlserver.fulltext)
  • Re: *=
    ... > from customers c, orders o, items i ... As Marek said *= is an old syntax for outer join. ... the query returns 5 rows. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: how to improve performance of LEFT JOIN
    ... LEFT OUTER JOIN TableB ... I add the subquery to query every table before 'LEFT JOIN' ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: How to query with both JOIN and aliases in Access?
    ... v.empID LEFT OUTER JOIN FirstDayWorked FROM ... This query performs in SQL Server without any problem. ... LEFT OUTER JOIN (SELECT empID, ...
    (microsoft.public.access.queries)
  • Re: data flow
    ... i hade a sybase DB which i have only read rights. ... so i though about making a query on my sql server 2005 for the last row ... the query option with a condetion on that variable. ...
    (microsoft.public.sqlserver.dts)