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
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