none
MINUS and EXCEPT clause in sql server using C# RRS feed

  • Question

  • "select [BUYER_QUALITY],[RATE],sum(AREA) as [AREA],sum(PIECES) as [PIECES],sum(AMOUNT) as [AMOUNT] from invrate where INVOICE_NO='" + textBox1.Text + "' group by [BUYER_QUALITY],[RATE] MINUS select [BUYER_QUALITY],[RATE],sum(TOTAL_AREA) as [AREA],sum(TOTAL_PIECES) as [PIECES],sum(TOTAL_AMOUNT) as [AMOUNT] from desWiseRt where INVOICE_NO='" + textBox1.Text + "' group by [BUYER_QUALITY],[RATE]"

    it is saying syntax error(missing operator) in expression [RATE] MINUS select [BUYER_QUALITY].

    what to do?

    i want to get some records from table invrate that are not in table desWiseRt.


    MCA,LUCKNOW.

    Tuesday, May 20, 2014 8:16 AM

All replies