>>I need to change the following SQL Insert such that if the cursor cViewName does not have a column FIELD1 (or any other), this column IS NOT included in the expression. >>Here is an example:
>>
>>INSERT INTO (cViewName) (FIELD1, FIELD2, FIELD3) VALUES ( "", "", 0.00 )
>>I know I can do it with an IF ENDIF condition but I wonder if it can be done in one line.
One older-fashioned solution would be to create an object with field1,field2... properties, or memvars, that then get GATHERed. That'll work whether fields exist or not.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us."
-- Shakespeare: Coriolanus, Act 1, scene 1