troubleshooting Question

SQL Query

Avatar of SALA DONATELLA
SALA DONATELLA asked on
Microsoft SQL Server
54 Comments1 Solution183 ViewsLast Modified:
I have this query:
SELECT

A.SalesOrderNo,
B.UDF_COMPLETE_PART,
B.UDF_CUST_PART,
E.ExtendedDescriptionText,
B.UDF_Serial,
A.CustomerPONo,
A.UDF_EXT_CUST_PO,
A.ARDivisionNo,
D.CustomerNo,
D.CustomerName,
A.ConfirmTo,
A.EmailAddress,
A.UDF_END_USER,
A.UDF_REG_MANAGER,
A.UDF_REP_ACCT,
A.BillToName,
A.BillToCity,
A.BillToState,
A.ShipToName,
A.ShipToCity,
A.ShipToState,
C.CountryName,
A.RMANo,
F.ReceiptDate

FROM
      SO_SalesOrderHistoryHeader A,
      SO_SalesOrderHistoryDetail B,
      SY_Country C,
        AR_Customer D,
      CI_ExtendedDescription E,
      RA_ReceiptsHistoryHeader F
WHERE
        A.CustomerNo = D.CustomerNo
        and A.ARDivisionNo = D.ARDivisionNo
      and A.orderstatus = ''A''
      and A.SalesOrderNo = B.SalesOrderNo
      and C.CountryCode = D.CountryCode
      and B.ExtendedDescriptionKey = E.ExtendedDescriptionKey
      and A.RMANo = F.RMaNo

I'd like also include in the results, all records from SO_SalesOrderHistoryHeader having RMANo = NULL
How can I do this?
Thanks.
ASKER CERTIFIED SOLUTION
SALA DONATELLAIT

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 54 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 54 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros