Jump to content
Server Maintenance This Week. ×

ExecuteSQL Select Date Filed not working.


This topic is 2921 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I'm tying to write an ExecuteSQL for charting.

I can get it to work with out selecting a Date Filed (OrderDate). What I want to do in the end is do a "Where OrderDate = mm/dd/yyyy" to filter out by date. But in testing I'm not even able to even get SELECT to work.

=================================
ExecuteSQL ("
SELECT SKU, SUM(Quantity) as ProductTotal
FROM LineItems
GROUP BY SKU
ORDER BY ProductTotal DESC FETCH FIRST 20 ROWS ONLY
"
; "|" ; ¶ )
=================================
 

Link to comment
Share on other sites

Hi,

Try

    ORDER BY 2 DESC..... (ref to second column)

Good luck

G

 

Edited by LAIRY
spelling mistake
Link to comment
Share on other sites

This topic is 2921 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.