Cancoon2000
11th November 2009, 23:32
I would like to now what is the correct syntax when using wild cards in SELECT sql command. The compiler is producing a syntax error when trying to compile the following:

string project.dsca(30)
project.dsca = ".*" & strip$(prj.dsca) & ".*"

select ticst002.pdno, ticst002.opno, ticst002.cwoc, ticst002.qcrs,
ticst002.qcus, ticst002.qcud, ticst002.qcut,
tisfc001.pdno, tisfc001.cprj, tisfc001.mitm,
tisfc001.osta, tirou001.cwoc, tirou001.dsca,
tipcs020.dsca
from ticst002, tisfc001, tirou001, tipcs020
where tisfc001._index3 inrange {:cprj.f, :pdno.f, :mitm.f}
and {:cprj.t, :pdno.t, :mitm.t}
and tisfc001.cprj = tipcs020.cprj
and tipcs020.dsca like :project.dsca
order by tisfc001._index3
selectdo
..................
endselect

Thank you

mark_h
12th November 2009, 16:01
Use the search feature on this forum - find lots of threads on this topic. Here is just one thread (http://www.baanboard.com/baanboard/showthread.php?t=56914&highlight=like+query).

Cancoon2000
12th November 2009, 22:10
I tried to do a search before posting but my search clause most probably was not getting much info. Thank you very much Mark, I followed the observations & comments in the link provided and my issue is now resolved.

Thank you again for your support.