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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-07-26 : 10:12:36
|
| Jonathan Gould writes "I have two tables, Vendors and Links. Links is used to create a link page for our intranet. It has two fields, company and links. Over in the vendor table we have multiple fields, the two in question here, name and website.What I need is an SQL statement that will query the vendor database for any records that the website field doesnt match any links field in the links table and the name field doesnt match any company field in the links table.I need this so that I can run the query through the vendor database and pickup any companies and website that are not in the link table and add them to it. (I know how to do the adding part if I could get the sql statement.)Here is what I tried with no success:SELECT NAME, WEBSITE FROM VENDORWHERE VENDOR.NAME <> LINKS.COMPANY AND VENDOR.WEBSITE <> LINKS.LINKSWhat am I doing wrong?I will greatly appreciate it if you can help me.Jonathan." |
|
|
|
|
|