Tony@DataLynx
New Member
Hi, I am a total newb working with Progress however thus far I have found the implementation of SQL to be rather nicer than some other databases I have used, however I am having a problem with a particular query and I wonder if somebody could please explain to me why it doesn't work?
SELECT
GROUP BY
TRANSLATE( UPPER ("fnam" ),
I get the following error:
SQL State = S1000
Native Error Code = -20022
Error Message = [DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Non-group-by expression in select clause (7641)
I know it looks a bit odd but the code is generated dynamically from a a software product which I have developed, hence the end query marker thing.
The query will run against almost every other database I have tried it against (though sometimes I need to change the function call to TRANSLATE if that function is not supported) so there must be an idiosyncracy of Prorgess SQL that I need to be aware of. I'd be very grateful if somebody could point out the error of my ways!
SELECT
COUNT(*) AS OCCURRENCES,
TRANSLATE( UPPER ("fnam" ),
FROM PUB.people TRANSLATE( UPPER ("fnam" ),
'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',
'AAAAAAAAAAAAAAAAAAAAAAAAAA9999999999' ) AS COL_1,
min('<DLX_QUERY_END>') AS END_QUERY_MARKER 'AAAAAAAAAAAAAAAAAAAAAAAAAA9999999999' ) AS COL_1,
GROUP BY
TRANSLATE( UPPER ("fnam" ),
'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',
'AAAAAAAAAAAAAAAAAAAAAAAAAA9999999999' )
ORDER BY 2'AAAAAAAAAAAAAAAAAAAAAAAAAA9999999999' )
I get the following error:
SQL State = S1000
Native Error Code = -20022
Error Message = [DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Non-group-by expression in select clause (7641)
I know it looks a bit odd but the code is generated dynamically from a a software product which I have developed, hence the end query marker thing.
The query will run against almost every other database I have tried it against (though sometimes I need to change the function call to TRANSLATE if that function is not supported) so there must be an idiosyncracy of Prorgess SQL that I need to be aware of. I'd be very grateful if somebody could point out the error of my ways!