Help with Query - group by error

  • I just got this error:

    Msg 102, Level 15, State 1, Line 24

    Incorrect syntax near ')'.

  • doh, got to add a name for the derived table,

    just add AS derived1 to the last line after the )

  • Sorry just got back from a meeting - Looking much better now 🙂

    ==========================================================================================================================
    A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila. Mitch Ratcliffe

  • Thank you, thank you so much! I did wonder if to put as **** at the end, but wasn't sure.

    This has helped me alot, really appreciate it

  • If you run your original query, against the new query and export the actual query plans, I would be interested to see the differences, especially around the SARGable parts with using the date parts instead of the full dates.

Viewing 5 posts - 16 through 19 (of 19 total)

You must be logged in to reply to this topic. Login to reply