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
 Transact-SQL (2000)
 Simple SQL Help

Author  Topic 

mross
Starting Member

1 Post

Posted - 2003-04-29 : 15:20:19
I need to select t1.field1, t1.field2. t1.field3,
even if t2.field1 = t1.field2 does not match
how can I do this?

I need t2.field1 only of it matches it needs to be optional.

select t1.field1, t1.field2. t1.field3,
t2.field1 from table1 t1, table2 t2
where t1.field=1
and t2.field1 = t1.field2

Thanks,

Mike


X002548
Not Just a Number

15586 Posts

Posted - 2003-04-29 : 15:25:00
select t1.field1, t1.field2. t1.field3,
t2.field1 from table1 t1 left join table2 t2
on t2.field1 = t1.field2
where t1.field=1


Brett

8-)
Go to Top of Page
   

- Advertisement -