I just did as you suggested. And, sure enough - the fields ARE There -
with the names that I was using in the Select. Before you replied, I
just tried pulling out the Grp_Vndr field from the ORDER BY - only to
have it THEN give me the same error for the Ct_stage field!

-K-

-----Original Message-----
From: profoxtech-boun...@leafe.com [mailto:profoxtech-boun...@leafe.com]
On Behalf Of Richard Quilhot
Sent: Wednesday, September 21, 2011 5:03 PM

Run the second query without any "order by" clauses and then look at the
column names in the output.

Rick Q


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.

_______________________________________________
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/289ea162f5642645b5cf64d624c66a140b7ce...@us-ny-mail-002.waitex.net
** 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.

Reply via email to