0

How can we separate one column value having comma as delimiter using Ampscript. Example : We have hello, world in ABC Data Extension in Column "Name" I want to separate both of them using Ampscript. As a result, put hello in column "ID" and world in column "Name".

1 Answer 1

4

You can use BuildRowSetFromString. It basically creates a rowset from a String using a delimiter.

You should use something like:

%%[
Set @queryparams = BuildRowsetFromString(@ColumnValue,',')
for @i = 1 to Rowcount(@queryparams) do
Set @row = Row(@queryparams, @i)
Set @value = Field(@row,1)
]%%

You can then use @value values in your UpdateData or UpdateDE depending on the context (Landing page or Email).

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .