Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Left Outer Join

Author  Topic 

augustin_p
Starting Member

21 Posts

Posted - 2002-03-31 : 23:31:03
Hi,
i have a query where i use a left outer join since i need to retrieve all records of first table and matching records of second table. Now, what i need is, for the matching records of second table, i need to display it's related records from a third table.
im getting an error message

"The table 'TBLSample' is an inner member of an outer-join clause. This is not allowed if the table also participates in a regular join clause."

How do i do this?

Thanks,
prasanna

nr
SQLTeam MVY

12543 Posts

Posted - 2002-03-31 : 23:33:39
Which version are you using?

with *= you can't do it (and will get that error) and will have to use a temp table.

with
left outer join ... on ...

you should be ok.

==========================================
Cursors are useful if you don't know sql.
Beer is not cold and it isn't fizzy.
Go to Top of Page

augustin_p
Starting Member

21 Posts

Posted - 2002-04-01 : 04:08:43
Im Using Sql Server 7.0 and Windows 2000 . I tried using *= query..
If im using such query , do i have to use multiple update statements on a Temp table. can u give me a sample query to achieve the same using 'Left Outer Join on' Statement.

Thanks,
prasanna
Go to Top of Page

Nazim
A custom title

1408 Posts

Posted - 2002-04-01 : 07:40:10
select columnnlist from table1 t1
left join table2 t2
on t1.columname=t2.columnname
inner join table3 t3
on t2.columname=t3.columnname

HTH


--------------------------------------------------------------
Go to Top of Page
   

- Advertisement -