String functions resulting in SQL syntax errors?
Posted: Wed 13 Aug 2014 20:33
I have a simple query that has a where clause that needs to examine the first two characters of one of the table fields. For example,
SELECT
myfield1,
myfield2,
myfield3
from
mytable
WHERE
LEFT(myfield, 2) = 'XX'
This results in the following error:
You have an error in your SQL syntax at line 8, column 2: Unexpected symbol 'LEFT'.
Are functions supported? If so, can someone help me understand the syntax problem with the query referenced above?
SELECT
myfield1,
myfield2,
myfield3
from
mytable
WHERE
LEFT(myfield, 2) = 'XX'
This results in the following error:
You have an error in your SQL syntax at line 8, column 2: Unexpected symbol 'LEFT'.
Are functions supported? If so, can someone help me understand the syntax problem with the query referenced above?