Create an UPDATE 'SET' clause from a (possibly multiple row) SQL source and passed values. The metatable is used to format the column data as expected by the back end table. FieldValList is in the format 'fieldname',fieldvalue, ...
INSERTS cope with 255 columns, however because UPDATES do a pass for the set row and value row they have an effective limit of 127 columns when updating column-from-column When there are more than 127 columns, we can split the insert into two parts using SplitResultString=true, and the second part of the result is passed back in SecondResultString For each column in the destination table, the following is applied :
- if not in the list of passed values,
- if DefaultInsertUnlisted=true, take column val from SQLFromSource with same column name (assume exists)
- if DefaultInsertUnlisted=false, skip column (if column not nullable and has no default value, then flag error)
- if passed, insert the value passed into SET assignment for that column
- if field name preceded with +, SET column val to column in SQLFromSource(same column name if passed value "", passed value otherwise)
- if field name preceded with -, skip column (if column not nullable, then flag error)