Click here to Skip to main content
16,017,788 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi friends,
i am searching the data by following fields

1) Company Name

2) Employee Name

3) State

4) City

5) Specialty

6) Language


I written individual stored procedures for the above search..For Example Below Sp is one of the above fields search

My Sp Is:

SQL
@EmpName varchar(50)
as
begin
select distinct E.UserId,E.EmployeeId,E.Name,P.Picture,C.Id,C.AddressId,C.CompanyName,A.Line1,A.Line2,A.City,A.State,
PL.ProviderId,L.CodeType from
 Employee E,EmployeeCompany EC,Company C,Provider P,Address A,ProviderLookup PL,CompanyProvider  CP,
 Lookup L
 where E.Name=@EmpName  and C.AddressId=A.Id and C.CreatedUserId=E.CreatedUserId
and PL.ProviderId=E.EmployeeId and P.UserId=E.EmployeeId and Cp.CompanyId=C.Id and
PL.ProviderLookupId=L.Id and EC.CompanyId=C.Id and EC.ProviderId=E.EmployeeId and
 E.IsEmployeeProvider='true' and L.CodeType!='Language'

end



Is there any way to write these all are in a single stored procedure

Please help me..

Thanks in advance
Posted
Updated 17-Sep-12 19:31pm
v4

1 solution

 
Share this answer
 
Comments
.net333 18-Sep-12 1:42am    
thank you and i'll try
Kuthuparakkal 18-Sep-12 2:11am    
you're welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900