Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parametized Views
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00100644
Message ID:
00100654
Views:
41
>i have a problem that I'm sure there is a solution for but just can't quite figure it out.
>
>what i need to do is create a parametized view where the value may, or may not, be need to be taken into consideration. I can write the sql to do this however, I can't get the View designer to do it.
>
>i.e.
>if I have a remote parametized view xyv, with name C(10), age N(2) fields
>
>name age
>tom 20
>tom 30
>
>Here is the SQL that I wrote to get the results and it works just fine.
>
>select * ;
> from xyz ;
> where ;
> iif(empty(m.name),.t.,xyz.name = m.name) and ;
> iif(val(m.age)=0,.t.,xyz.age = m.age)
>
>so if m.name = 'tom' and age = 0, I get the 2 records
>or if m.name = 'tom' and age = 20, I get the one record,
>or if m.name is empty and age = 20 I get the one record.
>
>I just can't get the View designer to spilt this out ?????
>
>Please help
>
>Thanks :-)

You can create the view programmatically without the designer:

CREATE SQL VIEW myview AS your_sql_statement_goes_here

HTH
_________________________________
There are 2 types of people in the world:
    Those who need closure
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform