John,
I wanted to use an IIF() but wasn't sure how to make the IIF() search the table to see if a field is located in it. When I say field, I mean field name, the entire column. I am doing the search for the field like this.
COPY STRUCTURE EXTENDED TO holdtbl
SELECT 0
USE holdtbl
SELECT holdtbl
SCAN
IF(holdtbl.field_name = "c_ordrcode")
lcorder = "c_ordrcode"
ELSE
lcorder = "O_rec_id"
ENDIF
ENDSCAN
drop table holdtbl
So if C_ordrcode is in the table then I want the c_ordercode printed, otherwise I want the O_rec_id printed.
See what I mean?
Brent Knight
Progressive Impressions International
Bloomington, IL
Wise men talk because they have something to say; fools, because they have to say something.
-Plato