Hello,
I try to put the underneath 2 queries in one ‘database web service’. The query has to search data on myTable1.col1=? or myTable2.col2 =?
query 1:
select myTable1.col1,myTable2.col2
from myTable1,myTable2
where myTable1.col1=?
and myTable1.ID=myTable2.ID
query2:
select myTable1.col1,myTable2.col2
from myTable1,myTable2
where myTable2.col2 =?
and myTable1.ID=myTable2.ID
I have tried to make something as
select myTable1.col1,myTable2.col2
from myTable1,myTable2
where (myTable1.col1=? or myTable2.col2 =? )
and myTable1.ID=myTable2.ID
But this is very slow and not working well.
Could you please advice if I can use template tag
%ifvar% or something to resolve the problem.
Or may be there is otherway ?
Thanks very much for the help,
Quoi