none
SQL query in Excel RRS feed

All replies

  • Hello,

    Could you please share your table and your expected result here? 

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, November 10, 2017 6:07 AM
    Moderator
  • Hello,

    This forum is for development issues when using Excel Object Model. Your issue is out of scope. You may post on SQL forum for professional suggestions about writing sql sentence. Sorry for any inconvenience.

    According to Using Outer Joins, outer joins return all rows from at least one of the tables or views mentioned in the FROM clause, as long as those rows meet any WHERE or HAVING search conditions. All rows are retrieved from the left table referenced with a left outer join, and all rows from the right table referenced in a right outer join. All rows from both tables are returned in a full outer join.

    In my opinion, you may use Outer join on CR_ACCS.ACCNO = STOCK_ITEMS.SUPPLIERNO and STOCK_ITEMS.STOCKCODE = DR_INVLINES.STOCKCODE so the records would be returned even there is no STOCKCODE and SUPPLIERNO.

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, November 10, 2017 9:42 AM
    Moderator