Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View SQL Parsing Problem
Message
From
28/10/1998 11:55:59
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00151526
Message ID:
00151679
Views:
25
David,

It does not give me an error. Instead, my view is created but the SQL statement is changed with brackets in inappropriate places.
It looks like this when I see the SQL from view designer's 'Veiw SQL' menu item.

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;

Thanks
Rick


>Rick,
>
>I guess I wasn't too clear. The View designer is not capable of doing complex ANDs and ORs.
>
>Your parens as hand coded looked ok to me. Is it giving you an error when you try to run the CREATE SQL VIEW command?
>
>>I'm sorry. I did not understand yor answer. Where should I put the brackets ( and ) in the SQL statement.
>>>
>>>It's a limitation of the view designer. If your database is currently selected the CREATE SQL VIEW statement you have there will put the view into the database.
>>>
>>>>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 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??
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform