Using the QSpatiaLite plugin in QGIS I composed the following query
SELECT 'AddressPoint_2'.'buildingNu', 'AddressPoint_2'.'postCode' WHERE 'AddressPoint_2'.'postCode' = 'NR13 3AA' FROM 'AddressPoint_2'
This returns an error:
"The SQL query seems to be invalid near "FROM":syntax error."
A previous query:
SELECT 'AddressPoint_2'.'buildingNu', 'AddressPoint_2'.'postCode' FROM 'AddressPoint_2'
runs OK. I cannot see why the slightly more complicated query is failing on the same use of FROM
Any pointers please?
-
1Move your FROM clause before your WHERE clause: SELECT ... FROM ... WHERE ...user10353– user103532013年01月14日 16:38:23 +00:00Commented Jan 14, 2013 at 16:38
-
@kyle: Thank you for that. Changing the order as you suggested is the answer. Would you like to post that as the answer?nigellaw– nigellaw2013年01月14日 16:42:06 +00:00Commented Jan 14, 2013 at 16:42
1 Answer 1
Move your FROM clause before your WHERE clause: SELECT ... FROM ... WHERE ...