My question might sound really stupid, but I am stuck. Here is the pseudo code of what I am trying to do in SQL Server
if exists(select id from employee where Email='saghir@abc.com')
begin
insert in tasks with selected id
end
else
begin
insert in employee value Email='blah';
insert in tasks with new id in employee
end
Hopes for you suggestions.. .