× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Folks,
I don't know if the following can be done or not.
I'm reading a file, whose records contain SQL sentences like
"INSERT INTO xxxxx (fielda, fieldh, fieldx) VALUES ('aaaaa',18,'xyz');

I want to be able to
- parse that sentence,
- read the field names in a loop, into a variable that will contain one field name at a time
- read the new values in same loop, into a variable that will contain one value at a time


now comes the question:

I would have to do a lot of "case" sentences, or nested "if's" so that in the end I could either MOVE or EVAL each field to its new value. The question is: since I will have the field name as the value contained in a variable called "FieldName",
can I do some kind of Eval of the real field to the desired value, addressing the field by the name contained in FieldName?


I hope I made it clear enough.

Any examples or hints?
TIA

--
Antonio Fernandez-Vicenti
afvaiv@xxxxxxxxxx



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.