Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Variable disappearing from Filter tab in View Designer
Message
From
14/06/1999 08:04:01
 
 
To
14/06/1999 01:41:49
Ray Keys-Bramlett
Custom Business Applications
Fresno, California, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00229355
Message ID:
00229382
Views:
18
>I am trying to create a view in the View Designer which uses a variable in the where clause.
>
>When I view the SQL, the variable has been wrapped in quotes.
>
>The variable C contains the parameter I want to filter with
>
>What I want:
>
> SELECT *;
> FROM workout!exercises;
> WHERE exercises.cat = C;
> ORDER BY exercises.exerciseid
>
>What I get:
>
> SELECT *;
> FROM workout!exercises;
> WHERE exercises.cat = "C";
> ORDER BY exercises.exerciseid
>
>I would like to find a solution that allows me to continue to use the View Designer.

What you are trying to do it create a parameterized view. Put a ? before the C in the view designer so your SQL Statement looks like this:

SELECT *;
FROM workout!exercises;
WHERE exercises.cat = ?C;
ORDER BY exercises.exerciseid
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform