Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Building a SQL statement on the fly
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Building a SQL statement on the fly
Miscellaneous
Thread ID:
00263324
Message ID:
00263324
Views:
68
I've got a class method that builds a SQL statement on the fly based on metadata. The field list has to be built dynamically before issuing the SQL call, as in:

SELECT &lcFieldList ;
FROM &lcTable ;
INTO CURSOR lvNormalized

The field list has to be dynamically built from a table of field mappings to normalize the data before moving it to a data warehouse. It all works fine, the hard part is done. But early on in testing I found that the lcFieldList variable can end up exceeding 254 characters, which generates an error. I've gotten around it in a cheesy kind of way, but I was wondering if anyone had any ideas on a more permanent solution.

TIA
Oct 31 = Dec 25
Next
Reply
Map
View

Click here to load this message in the networking platform