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
 oracle to sql server

Author  Topic 

TajKazi
Posting Yak Master

101 Posts

Posted - 2014-11-17 : 07:14:31
oracle code

select PERSONID
into v_personID
from HAIL_ESS_USERS_EXTENDED_V
where EID = p_eid
and IS_ACTIVE = 'Y'
and rownum = 1;


sql server code

set @v_PersonId = (select PersonId
from viwSSAppsEmpMasterExtended
where EID = @p_EID
and IsEmployeeActive = 'Y'
and @@rowcount=1)



is it okay or some changes required here

Kristen
Test

22859 Posts

Posted - 2014-11-17 : 07:17:28
Here's my best guess:

select TOP 1 @v_PersonId = PersonId
from viwSSAppsEmpMasterExtended
where EID = @p_EID
and IsEmployeeActive = 'Y'
ORDER BY EID

Go to Top of Page

TajKazi
Posting Yak Master

101 Posts

Posted - 2014-11-17 : 07:50:40
thank you very much
Go to Top of Page
   

- Advertisement -