I guess I'm missing something here. Perhaps someone can explain...
I wanted to remove columns that start with "Column" (i.e. columns that didn't have names in the file). This is my solution, based on a previous thread:
resize(@props_to_remove,0);
for #i in 1 .. NumProperties()
loop
if IthPropertyName(#i) RLIKE '^Column'
then
append(@props_to_remove, IthPropertyName(#i)); end if;
end loop;
RemoveDuplicates(@props_to_remove);
Remove(@props_to_remove);
This works, but what I don't get is why the following simpler solution didn't: (I'm guessing I didn't get quotes right...)
FOR #i IN REVERSE 1 .. NumProperties()
LOOP
IF IthPropertyName(#i) RLIKE '^Column' THEN
remove(IthPropertyName(#i));
END IF;
END LOOP;
Anyone care to enlighten me?