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