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
 General SQL Server Forums
 New to SQL Server Programming
 concat within FROM ?

Author  Topic 

seanh1016
Starting Member

14 Posts

Posted - 2010-10-22 : 19:03:12
is this(or something like this) possible?

FROM
(ab.column1 + ab.column2) = bc.column3

MS SQL 2005

Thanks

robvolk
Most Valuable Yak

15732 Posts

Posted - 2010-10-22 : 23:30:40
SELECT *
FROM table1 ab
INNER JOIN table2 bc
ON ab.column1+ab.column2=bc.column3
Go to Top of Page

seanh1016
Starting Member

14 Posts

Posted - 2010-10-23 : 01:12:07
would an outer join also work?

SELECT *
FROM table1 ab
LEFT OUTER JOIN table2 bc
ON ab.column1+ab.column2=bc.column3
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-10-23 : 01:42:54
quote:
Originally posted by seanh1016

would an outer join also work?

SELECT *
FROM table1 ab
LEFT OUTER JOIN table2 bc
ON ab.column1+ab.column2=bc.column3


it will work but will return everything from ab regardless of match in bc

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -