Example Of Sql Joining

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ranees ras
    New Member
    • Nov 2013
    • 6

    Example Of Sql Joining

    select A.RegistrationI d,B.CustomerNam e,ServiceNo as ServiceNo,conve rt(varchar(20), OrderDate,110) OrderDate,
    D.ProductName,E .ServiceName,co nvert(varchar(2 0),C.DeliveryDa te,110) DeliveryDate
    from TBL_ServiceRegi stration A
    left OUTER JOIN TBL_CustomerMas ter B on A.CustomerId=B. CustomerId
    left outer JOIN TBL_ServiceRegi stration_Detail s C on A.RegistrationI d=C.Registratio nId
    left outer JOIN TBL_ProductMast er D ON C.ProductId=D.P roductId
    left OUTER JOIN TBL_ServiceEntr y E on C.ServiceId=E.S erviceId
    where (@ServiceId=0 OR A.RegistrationI d=@ServiceId) and (@CustomerId=0 OR A.CustomerId=@C ustomerId)
  • ranees ras
    New Member
    • Nov 2013
    • 6

    #2
    It wont work...itz just an example of sql left outer joining

    Comment

    Working...