I have a Java program connected to a SQL database. I need to retrieve records from a table having a field that starts with a given string. I launched this query:
SELECT s.DATA
FROM TMT_SOLICITUD s, TMT_TRAMITES t
WHERE s.IDTRAMITE='723'
AND s.IDTRAMITE=t.IDTRAMITE
AND s.DATA LIKE '<?xml *'
I know that the table TMT_TRAMITES is not used. We still developing the program and it will be used soon. Ignore that part.
The problem is that the result-set that returned to me is empty. However I if launch the same query through Access, It returns me 4 records (which are correct).
Anyone knows how to use the command LIKE correctly, or the reason why this isn't working?