>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