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.
| Author |
Topic |
|
AsimKhaliq
Yak Posting Veteran
94 Posts |
Posted - 2003-12-01 : 14:57:41
|
| hiis this a correct syntexSELECT C.Email,ViewerType FROM tab1 as C INNER JOIN tab2 AS GON C.EMAIL not like '%'+G.EMAIL+'%'here email is the common field in both table, and i want to retrieve data based on like comparionPlz write me if anyone ahve other suggestionsthanks |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2003-12-01 : 15:12:03
|
You need to relate tables together with a Join (ON or in a WHERE clause) and need to limit Results with a predicate (Let's just say in the WHERE clause for now): SELECT C.Email , ViewerType FROM tab1 as C INNER JOIN tab2 AS G ON c.Email = g.Email WHERE C.EMAIL not like '%'+G.EMAIL+'%' ook up INNER, OUTER LEFT, RIGHT, FULL, and CROSS JOINS in BOLHappy joiningBrett8-) |
 |
|
|
|
|
|