I tried to do this:
SELECT SUM(SUBTOTAL as TODAYSALES) FROM dbo.SALESORD_HDR where ORDERDATE >=41187
But the browser throws an exception about the sum function saying 'SUM' is not a recognized built-in function name.
Any ideas?
I tried to do this:
SELECT SUM(SUBTOTAL as TODAYSALES) FROM dbo.SALESORD_HDR where ORDERDATE >=41187
But the browser throws an exception about the sum function saying 'SUM' is not a recognized built-in function name.
Any ideas?
Your syntax seems off. It should be SELECT SUM(SUBTOTAL) AS TODAYSALES FROM dbo.SALESORD_HDR where ORDERDATE >= 41187
Aliases must be defined outside the expression they are targeting:
SELECT SUM(SUBTOTAL) as TODAYSALES FROM dbo.SALESORD_HDR where ORDERDATE >=41187