I am using a repeat loop to iterate over a list of field names and then using an array to set up an SQL statement.
It looks something like this:
Code: Select all
repeat for each item columnName in tableColumns
put & "'" & aDBColumns[columnName] & "'" & ","after theColumnValues
end repeat

So, is it possible to do something like?:
Code: Select all
repeat for each item columnName in tableColumns
if columnName is last item then
put "'" & aDBColumns[columnName] & "'" after theColumnValues
else
put "'" & aDBColumns[columnName] & "'" & "," after theColumnValues
end if
end repeat

Anyone know of the/a way to do this?
cheers