Information générale
Titre:
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement