Run the second query without any "order by" clauses and then look at the column names in the output.
Rick Q quilh...@gmail.com On Wed, Sep 21, 2011 at 4:55 PM, Kurt Wendt <kurtwe...@waitex.com> wrote: > OK - I am getting this error - and it just does NOT seem to make sense. > This is the Clip of code: > > SELECT *, Vendor1 as Grp_Vndr FROM Cuttkt ; > > WHERE &XFILTER ; > > INTO CURSOR Temp_Cut1 READWRITE > > SCAN > > REPLACE Grp_Vndr WITH > IIF(Ct_stage="2",Vendor2,IIF(Ct_stage="3",Vendor3,Vendor1)) > > ENDSCAN > > SELECT * FROM Temp_Cut1 ; > > ORDER BY Temp_Cut1.Ct_stage, Temp_Cut1.Grp_Vndr, ; > > DTOS(Temp_Cut1.Complete), Temp_Cut1.Ticket ; > > INTO CURSOR Temp_Cut READWRITE > > > > The 1st Select works. And, the Scan/Replace works. It's the 2nd Select > that fails. The error is: > > SQL: Column "Grp_Vndr" is not found. > > > > It does NOT make sense that its not found - since I created the field in > the 1st Select - and I was even able to do all the Replaces in the SCAN > loop without a problem! > > > > So - what gives? Can anyone gimme a clue??? > > Thanks, > > -K- > > > > Senior Developer > > Waitex Information System, Inc. > > P Save a tree. Don't print this e-mail unless it's really necessary. > > > > > > --- StripMime Report -- processed MIME parts --- > multipart/alternative > text/plain (text body -- kept) > text/html > --- > [excessive quoting removed by server] _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CADaZP2nh9g2CXTCC2NjxsF=dj0t1cm+zln4ooog8o_yn5di...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.