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:
@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