Viewing 9 posts - 16 through 24 (of 24 total)
bitbucket: You've haven't quite got the same data as the original post; the original post has dates and times in the TransDate column (and it makes a world of...
May 25, 2010 at 12:30 pm
... and ordering by the full TransDate is asking for trouble too!
May 25, 2010 at 12:25 pm
As long as you insist on grouping by TransDate, you will have a new row for each distinct value of TransDate, a datetime that includes time.
You should be using:
group by...
May 25, 2010 at 12:20 pm
Of course it only works if all your data is in the same year. There are many ways to deal with converting datetime values to dates. Datepart() can...
May 25, 2010 at 11:26 am
That's not new; I already covered that in my first response. Your use of datepart is a working solution to that problem.
May 25, 2010 at 11:13 am
Then that's what you group on. Every field other than your group fields must be a function like max(), min(), sum() or count(); this can include your case statement...
May 25, 2010 at 11:01 am
To me, the format of your desired output makes it unclear whether you want one row per date or one row for each date/payment method combination.
Either way your 'group by'...
May 25, 2010 at 10:33 am
No. Your query would give orders received in the past and either filled on the same date or not at all. In general, orders can be filled on...
May 25, 2010 at 7:16 am
The project I've been working on far many, many years lies somewhere between off-the-shelf and 100% custom software. That is to say that while we as the developers try...
May 20, 2010 at 1:19 pm
Viewing 9 posts - 16 through 24 (of 24 total)