Hi, I am a newbie to Informix and this forum, so, the more hand-holding, the better, as long as your hands are not sticky.
I wrote a function, StoogeFunk, that uses FOREACH against systables and syscolumns, to concatenate in a string the list of fields in a table (the name of which is passed as a function parameter). I surround with CAST/VARCHAR(30) the date fields, for reasons I dare not explain. So, I come to a point where I have in a string, SelectString, the equivalent of:
SELECT Name, CAST(DOB AS VARCHAR(30)) AS DOB, ShoeSize FROM Stooges
My function simply returns that LVARCHAR string (and it is a long one, due to many fields). That result-text SELECT works fine in a query window.
1. ) Now, instead of returning that string (a simple "RETURN SelectString;" line before "END FUNCTION;"), I want to execute the string, returning from the function a nice, big, juicy bunch of records. I imagine something like an EVAL:
How may I reach that dream?
2.) If the above is impossible, could I call the SelectString-result function externally?
How would that be workable?
Thanks in advance for washing your hands and helping out!