General information
Title:
View SQL Parsing Problem
I had created a view using the view designer but couldn't make
it to form the syntax of the SQL statement the way I wanted it to be.
I wanted like this..........
CREATE SQL VIEW request A AS;
SELECT * FROM A;
WHERE Request.USER_CLOCK LIKE ?cuser_clock;
AND Request.AREA LIKE ?carea;
AND (Request.MNRCAT LIKE ?cmnrcat OR Request.MNRCAT IS NULL);
AND (Request.STATUS LIKE ?cstatus OR Request.STATUS IS NULL);
Instead it created like this.......
SELECT * from A
WHERE Request.USER_CLOCK LIKE ?cuser_clock;
AND Request.AREA LIKE ?carea;
AND Request.MNRCAT LIKE ?cmnrcat;
OR (Request.MNRCAT IS NULL;
AND Request.STATUS LIKE ?cstatus);
OR (Request.STATUS IS NULL;
** Notice the position of ( and )
I know that to get around this problem, you have to do it programmatically in a .prg, but I dont know how. Can anybody help me with it??
Thanks
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only