Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a view with a variable condition?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00474379
Message ID:
00474386
Views:
33
>Hi all,
>
>Is possible to create a view that holds a variable condition?
>
>This is for not creating a bunch of view each one with different conditions.
>
>The cool would be any similar to:
>
>CREATE SQL VIEW ... WHERE &mycondition
>
>And inside mi programs doing:
>
>mycondition = "totalsales > 500000"
>
>in another:
>
>mycondition > "state ='FL'"
>
>and so.
>
>Thanks,

Hi Pablo.
If not create a view?
Ex:
lcCondition = [ TotalSales > 500000 ]
lcCommand = [ SELECT * FROM MyTable WHERE ] + lcCondition
&lcCommand
¿Esto no es lo que quieres, verdad?
Luis María Guayán
Tucumán, Argentina
________________________________
SysOp de www.PortalFox.com
Nada corre como un zorro
________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform