Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parametrized view based on logical field
Message
From
19/10/2004 13:08:42
 
 
To
19/10/2004 12:16:55
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00952678
Message ID:
00952712
Views:
9
>hi!
>I have a logical field project.terminated
>
>I would like to create a parametrized view that will permit me
>1. select only terminated projets.
>2. select only not terminated projects.
>3. select all projects.

Unless you're willing to use NULLs as the parameter value for "all projects", (Which I'm not sure VFP will allow), you'd have to use two parameters to test this.
Select * from mytable where ISNULL(?vp_terminated) OR (mytable.terminated = ?vp_terminated)

Select * from mytable where IIF(?vp_allprojects,.T.,.F.) OR (mytable.terminated = ?vp_terminated)
Chris.
Previous
Reply
Map
View

Click here to load this message in the networking platform