Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameterized view refuses my IIF
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00272951
Message ID:
00272982
Views:
20
>I want to compare units from two date ranges, say Range1 and Range2.
>Using a variation on TasTrade's DateRange class, I collect two pair of dates. I want to do this in a view, and use the parameters like this:
>
>SELECT Activity.date, Activity.units;
> FROM eh!Activity;
> WHERE Activity.date BETWEEN ?dDateFrom AND ?dDateTo;
> OR (Activity.date BETWEEN ?dDateFrom2 AND ?dDateTo2);
> ORDER BY Activity.date
>
>But --
>
>When I add Range1 and Range2 to sort out the units (by adding IIF lines):
>SELECT Activity.date, Activity.units;
> IIf(Activity.date =>?dDateFrom and Activity.date => IIf(Activity.date =>?dDateFrom2 and Activity.date => FROM eh!Activity;
> WHERE Activity.date BETWEEN ?dDateFrom AND ?dDateTo;
> OR (Activity.date BETWEEN ?dDateFrom2 AND ?dDateTo2);
> ORDER BY Activity.date
>
>I can't save the vue file without getting:
>"Enter a value for dDateFrom" Why the difference?

Without analyzing your code, you can download Erik Moore's eView from the files section here, and edit the view SQL to your heart's content...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Reply
Map
View

Click here to load this message in the networking platform