Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AS Clause
Message
 
To
28/08/2000 11:03:08
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00409807
Message ID:
00409827
Views:
27
>Dear readers,
>
>When i execute the folowing SQL query, i get the error colomn "WTG"not found.
>
>SELECT detail.avr_ari,;
> iif(Detail.avr_wtg=.t.,'J','N') as WTG;
>FROM general!detail;
>WHERE WTG='J'
>
>Is this an impossible kind of query, to include an expressionalias in the WHERE Clause ?
>
>Any idea's how to solve this ?
>

Bjorn,

The WHERE clause of SELECT si applied to the source tables, there is no fild named WTG in the source fields. You can change it to;

WHERE Detail.avr_wtg = "J"

which will be fast and will work or you can dump the WHERE clause and use;

HAVING WTG="J"

which will be slower but will work.

Having is applied to the result of the query while WHERE is applied to the source tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform