Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select SQL
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00099059
Message ID:
00099071
Views:
19
Matthew,

Just build the whole select field list as one string:

lcFields = lookups.fldname1 + iif( lDoTwo, ", " + lookups.fldname2, "" )
select &lcFields ;
   from ...

>If I have a table that stores information about my lookup tables as follows
>
>tblname,fldname1,fldname2
>
>so one record would be
>
>state,code,desc
>
>My query to get all of the records out of states is as follows
>
>
>field1 = lookups.fldname1
>field2 = lookups.fldname2
>
>select &field1,;
> &field2;
> from (lookups.tblname) into cursor qry
>
>This works fine, but how can I still run this qry if the value of field2 is empty?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform