Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View SQL Parsing Problem
Message
From
30/10/1998 23:16:48
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00151526
Message ID:
00153128
Views:
28
>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.




Rick, I would suggest you to Create a Temp Table to carry your SQL result!

lSafety = Set("Safety")
Set Safety off
Select ... into table tmpResu
set Safety &lSafety
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Previous
Reply
Map
View

Click here to load this message in the networking platform