Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameterized Views
Message
From
27/11/1999 17:06:26
 
 
To
27/11/1999 16:55:48
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00296038
Message ID:
00296041
Views:
37
>Hello everyone,
>I would like to know how to pass a parameter to a view's "where" clause for conditions. For example, in different areas I may have different "where" clause conditions. In one instance, I may have "cField1 = 'x'" and in another instance "cField2 = 'y' .AND. !empty(cField1)". Is this possible? I had attempted the following but it did not work: "create sql view test as select * from myTable where ?x"
>then before issuing the "use test" I assigned x="cField1 = 'x'". I would appreciate any suggestions.

It should be
SELECT *;
FROM mytable;
WHERE mytable.myfield= ?MyVar

If where clauses are different, you may create different views.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform