Hi all,
Situation Is:
- On my web form I have locations to choose from. If I select a single location(Location Code is passed for the same) my store procedure works fine. But when I try to pass more than one Location(location Code) it doesn't work.
- The parameter in my store procedure is of navarchar(50) data type.
Store procedure:
SELECT TOP (100) PERCENT dbo.tbEmpPersonalInfo.pkEmpCd, dbo.tbEmpPersonalInfo.EmpName
FROM dbo.tbEmpPersonalInfo INNER JOIN
dbo
.tbEmpPaymentInfo ON dbo.tbEmpPersonalInfo.pkEmpCd = dbo.tbEmpPaymentInfo.fkEmpCd INNER JOINdbo.tbEmpDeptInfo ON dbo.tbEmpPaymentInfo.fkEmpCd = dbo.tbEmpDeptInfo.fkEmpCd
WHERE (dbo.tbEmpPaymentInfo.EligbeOverTime = 1) AND (dbo.tbEmpDeptInfo.fkLocationCd IN (@Location))
ORDER BY dbo.tbEmpPersonalInfo.pkEmpCd
I have tried passing location as '1','2', but it failed.
so, what can i do to perform this operation?
Regards,
Royal
Enter your message below
Sign in or Join us (it's free).