On Tue, 20 Mar 2012 06:46:53 -0000, "nathanelrick" <[email protected]> wrote: > hello, > > Select > Field1, > (select ...) AS MyFIELD2 > IIF(MyField is null, select ...., Null) As MYField3 > From > .... > > it's not work, it's say unknow "MyField" > but if i replace MyFIELD2 by Field1 it's work ... > > is their any workaround to make this SQL work ?
I don't see a MyField in that query. Also: you can't reference fields by an alias that is defined in the same (sub)query. If you want to do that you will need to wrap the first query in another query. In that query you will be able the reference the field by alias. Mark
