Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View SQL Parsing Problem
Message
 
 
To
30/10/1998 09:45:46
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00151526
Message ID:
00152870
Views:
29
Rick,

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

I don't understand how it can not be getting the () where you place them. I assumed since you were originally talking about the view designer that you looked at it. When you mentioned that you saw the () out of place, where exactly did you see that?

I assume you know that OR has precedence over AND which is why you enclosed the two OR expressions.

Looking closer at the view I think it ought to be:

CREATE SQL VIEW request AS;
SELECT * FROM A;
WHERE A.USER_CLOCK LIKE ?cuser_clock;
AND A.AREA LIKE ?carea;
AND (A.MNRCAT LIKE ?cmnrcat OR A.MNRCAT IS NULL);
AND (A.STATUS LIKE ?cstatus OR A.STATUS IS NULL)


>I have the view code in a prg. I am not trying to edit it from view designer after it is created from the code. I dont know where to place () i.e brackets for AND and OR. I want your help with that.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform