Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
View SQL Parsing Problem
Message
De
28/10/1998 11:55:59
Rick Hawkins
Rose Valley Software Studio
Wallingford, Pennsylvanie, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00151526
Message ID:
00151679
Vues:
24
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??
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform