getting some values from the table

what is wrong with this rs = statement.executeQuery("SELECT * MAX(COLUM) FROM Table");I am getting message Column Not Found
[164 byte] By [qasims_1] at [2007-9-26 4:32:21]
# 1
The SQL syntax is incorrect. Use "SELECT COL1, COL2, MAX(COL3) FROM TABLE1 GROUP BY COL1, COL2".You must use group by when you have both set functions (MAX()) and column expression./Fredrik
fredrika at 2007-6-29 17:46:50 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
Thanks for your reply.But i have one typing mistake in the querythey Query is rs = stm.executeQuery("SELECT MAX(COLUMN-NAME) FROM Table ");Please check it out again. Do, I still need to use group by funcations
qasims_1 at 2007-6-29 17:46:50 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3
I can reproduce the error when I mispell the column name. Double check to make sure the spelling is correct. Another suggestion is to try the statement in a SQL Editor to make sure it works.Jamie
jlrober at 2007-6-29 17:46:50 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...