Hi,
Please help me out to get this issue solve. Am don't know, how to get the output.
This is the way, i need. But i don't know.
(a)select distinct empid from emptable where year=2011 order by empid
(b)I needs to pass this empid with the while loop:
while()
{
select count from empdetails where year=2011 and empid=?
if(count==0)
{
'print statement
}
}
How can i write a query using Transact-SQL. Please suggest me.