4 Replies Latest reply: Oct 29, 2012 6:43 AM by Miroslav Žebrák RSS

    Transform SQL select to QV expression

      Hello QV developers,


      please, could anybody help me with transforming SQL select to QV expression? I have created an example QVW.


      I want to see  Orders (work in progress in specified season) as is specified in this MS SQL select (orders in progress till 31.1. 2012).


      select COUNT(*) as Order from KPI_Orders

      where ((Order_date_income <='20120131 23:59:59' and (Order_date_closed >'20120131 23:59:59' or Order_closed=0))

                  or (Order_date_income <='20120131 23:59:59' and Order_date_closed ='19000101 00:00:00'))


      The correct number of this select in MS SQL is 54.


      Thank you for any help!