Author |
Topic |
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 03 April 2015 : 10:18:13
|
OK. There's a SQL 'GROUP BY' syntax error on lines 20/50 (in red) below. It works fine with MS Access, but MS SQL gets the hiccups. Can anyone spot a problem?
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 03 April 2015 : 16:57:10
|
Well, I previously only had group by member_id since that was the only selected field ... that didn't work, same error. So I guess I need to put all three fields in the first select as well as in the distinct select? |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 03 April 2015 : 17:44:47
|
quote: Originally posted by Carefree
Well, I previously only had group by member_id since that was the only selected field ... that didn't work, same error. So I guess I need to put all three fields in the first select as well as in the distinct select?
Yes, you need to have all three fields in the SELECT clause.The fields are needed in the query that has the GROUP BY clause but here, since you are SELECT from the subquery, the subquery needs the three fields as well, or they wouldn't be in the main query, to start with.
With a single Group By field, and that field present in the SELECT clause, I don't see why the query would fail. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 03 April 2015 : 22:51:08
|
Well, no change, still failed. Back to the drawing board.
Redid the routines in "topic.asp" and the "pop_thanks.asp" on SnitzBitz. They will now work with all. |
Edited by - Carefree on 04 April 2015 00:06:21 |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 07 April 2015 : 16:23:30
|
Heard that someone experienced an error. Please, either post a link to your "topic.asp" in .txt format for me to see, or reply here and surround your "topic.asp" with [scrollcode][/scrollcode].
Resolved. Had code blocks in wrong place. |
Edited by - Carefree on 08 April 2015 11:03:04 |
|
|
Topic |
|