Doudy

Doudy

  • NA
  • 11
  • 18.9k

How to get all order ID which not payed in SQL Server 2008?

Mar 17 2013 6:47 PM
Hi , I want to get all order id numbers for selected customer which not payed till now, my data show as following:





What I want is Write a SELECT statement that answers this question:

select orderID from order where customer id = @custID and Total cashmovementValue for current order id is less than total (sold quantity * salePrice ) for current order id.

How to do it?

Thanks.


Answers (1)