-
1. Re: Assistance with a LEFT OUTER JOIN query
EddieLotter May 19, 2016 11:27 AM (in response to WolfShade)You're using to_char in the select clause and to_date in the order by clause. Make them the same and you should be good to go, but then again, it is Oracle.
Cheers
Eddie
-
2. Re: Assistance with a LEFT OUTER JOIN query
EddieLotter May 19, 2016 11:30 AM (in response to EddieLotter)Wait, I should have looked closer.
to_char is not an aggregate function, so you have to include it in the group by clause.
Sorry about that.
Cheers
Eddie
-
3. Re: Assistance with a LEFT OUTER JOIN query
WolfShade May 19, 2016 11:53 AM (in response to EddieLotter)Sorry.. I wasn't paying attention while typing. The to_date() _should_ be to_char().
V/r,
^_^
-
4. Re: Assistance with a LEFT OUTER JOIN query
WolfShade May 19, 2016 11:57 AM (in response to EddieLotter)I have aliased it, and tried using the alias and tried it using the column name, no change.
GROUP BY a.blogID, a.blogTitle, a.blogBody
GROUP BY a.blogID, a.blogTitle, a.blogBody, a.dateEntered --column name with table alias
GROUP BY a.blogID, a.blogTitle, a.blogBody, dateEntered --alias
I get varying error messages on each.
V/r,
^_^
-
5. Re: Assistance with a LEFT OUTER JOIN query
EddieLotter May 19, 2016 12:10 PM (in response to WolfShade)Try:
GROUP BY a.blogID, a.blogTitle, a.blogBody, to_char(a.dateEntered,'YYYY-MM-DD HH24:MI:SS')
Cheers
Eddie
-
6. Re: Assistance with a LEFT OUTER JOIN query
WolfShade May 19, 2016 12:19 PM (in response to EddieLotter)AH! Never thought of that. I'll give it a shot.
Thanks!
V/r,
^_^
-
7. Re: Assistance with a LEFT OUTER JOIN query
WolfShade May 19, 2016 12:39 PM (in response to EddieLotter)Okay.. that seems to have fixed it, but the query is now breaking elsewhere.. of course.
Part of the problem (and don't ask me WHY the original developer did this, coz it makes ZERO sense) is that one of the columns (the body of the blog) is CLOB/BLOB, and if I include it in the group by, I get inconsistent datatypes, if I don't include it, I get the "not a group by expression".
*headdesk* *headdesk* *headdesk* *headdesk* *headdesk* *headdesk* *headdesk* *headdesk*
^_^
-
8. Re: Assistance with a LEFT OUTER JOIN query
EddieLotter May 19, 2016 12:59 PM (in response to WolfShade)That's why I recommend that people post their database questions in a forum that deals specifically with their database engine.
I'm not an Oracle guy, I could only answer your original question because it dealt with ANSI SQL.
Cheers
Eddie