TheGoldMineGuru
MIS
Hello. I need help with a command. Here's my SQL Query that works perfect in Query Analyzer. It works fine hardcoding 'MIKEF' but when I place a parameter in it's place it errors out. Is this correct?
select t1.accountno
from dbname.dbo.table1 t1 inner join dbname.dbo.table2 t2
on t1.accountno = t2.accountno
where t1.accountno not in
(select t3.accountno
from dbname.dbo.table3 t3 inner join dbname.dbo.table1 t1
on t3.accountno = t1.accountno inner join dbname.dbo.employees e
on t1.username = e.fullname
where t3.userid = 'MIKEF')
THANKS!
select t1.accountno
from dbname.dbo.table1 t1 inner join dbname.dbo.table2 t2
on t1.accountno = t2.accountno
where t1.accountno not in
(select t3.accountno
from dbname.dbo.table3 t3 inner join dbname.dbo.table1 t1
on t3.accountno = t1.accountno inner join dbname.dbo.employees e
on t1.username = e.fullname
where t3.userid = 'MIKEF')
THANKS!