Trying to execute an invalid INNER JOIN query that misses the comma before 
the declaration of the last field to be extracted, the engine complains 
Column "<1st column name>" not found; 
<http://localhost:8082/query.do?jsessionid=a88e857137898e83ce1e2c0fb3f00760#>

I feel this is a minor issue: the SQL is really invalid, but *the error 
message is misleading*. That could become a problem for fairly complex 
queries, where one could waste time investigating on the wrong direction.
Follows a reproducible test case.

CREATE TABLE foo (ID int, FIELDX int);
CREATE TABLE bar (ID int, FIELDY int);

SELECT 
f.id,
f.fieldx
b.fieldy
FROM foo f INNER JOIN bar b ON (f.id=b.id)

(please note the missing comma before b.fieldy)

This example produces the following error message using h2 v. 1.3.173

Column "F.ID" not found; SQL statement:
SELECT 
f.id, 
f.fieldx 
b.fieldy 
FROM foo f INNER JOIN bar b ON (f.id=b.id) 
[42122-170]<http://localhost:8082/query.do?jsessionid=a88e857137898e83ce1e2c0fb3f00760#>
 42S22/42122

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to