By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,439 Members | 1,356 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,439 IT Pros & Developers. It's quick & easy.

Example Of Sql Joining

P: 6
select A.RegistrationId,B.CustomerName,ServiceNo as ServiceNo,convert(varchar(20),OrderDate,110) OrderDate,
D.ProductName,E.ServiceName,convert(varchar(20),C. DeliveryDate,110) DeliveryDate
from TBL_ServiceRegistration A
left OUTER JOIN TBL_CustomerMaster B on A.CustomerId=B.CustomerId
left outer JOIN TBL_ServiceRegistration_Details C on A.RegistrationId=C.RegistrationId
left outer JOIN TBL_ProductMaster D ON C.ProductId=D.ProductId
left OUTER JOIN TBL_ServiceEntry E on C.ServiceId=E.ServiceId
where (@ServiceId=0 OR A.RegistrationId=@ServiceId) and (@CustomerId=0 OR A.CustomerId=@CustomerId)
Nov 21 '13 #1
Share this Question
Share on Google+
1 Reply

P: 6
It wont work...itz just an example of sql left outer joining
Nov 21 '13 #2

Post your reply

Sign in to post your reply or Sign up for a free account.