Hi Bjorn,
>
>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 ?
To access Calculated columns, use the HAVING clause.
Although in this case, I'd use WHERE avr_str = .T.
HTH,
Bill Armbrecht
VFP MCP