I am unable to find the right usage for LOCATE
string function.
i use like this-
-----------
select LOCATE(steering, horn, 1) from Car
--------------
here steering and horn are the column's for Car table.
if i modify the query like this and run in Apache Derby Client, it give's me error. I haven't yet tried thru EJB3 JPA.
---------------
select LOCATE(steering, hor, 1) from Car
------------------
error
-------------------
Error: Column 'HOR' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE statement then 'HOR' is not a column in the target table.
SQLState: 42X04
ErrorCode: -1
-----------------------
i want to first run it cleanly here before i do run thru JPA.