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
 Query Help

Author  Topic 

h2sut
Starting Member

40 Posts

Posted - 2008-03-17 : 12:40:22
Hello i have created this subquery but i keep getting a error. I am trying to select the data from procduce and also selcet a cloumn from the new table to form a condition.

from dbo.Produce n
where ImportFromFileTime is not null and SignonEmailSent =0
and email is not null and len(email) > 3 and
(select cust from dbo.Newtable
where Cust not like ('D%'))

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2008-03-17 : 12:55:16
Since you didn't post enough info to get a specific answer, I will take a guess as to what you are looking for.

Jim

SELECT n.somecol,t.someothercol

from dbo.Produce n
inner join
dbo.newTable t
ON
n.somelink = t.somelink
where ImportFromFileTime is not null and SignonEmailSent =0
and email is not null and len(email) > 3 and
t.Cust not like ('D%'))


Go to Top of Page
   

- Advertisement -