Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AS Clause
Message
From
28/08/2000 11:12:13
 
 
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:
00409813
Views:
29
>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

You have to specify the field name in the WHERE clause.

SELECT detail.avr_ari,;
iif(Detail.avr_wtg=.t.,'J','N') as WTG;
FROM general!detail;
WHERE avr_wtg=.T.


But why even use the IIF() if you only want the ones of a particular value?


SELECT detail.avr_ari, "J" as WTG ;
FROM general!detail ;
WHERE avr_wtg = .T.
Insanity: Doing the same thing over and over and expecting different results.
Previous
Reply
Map
View

Click here to load this message in the networking platform