Apply a transformation in a column

Hi,

I need to transform a column from:
'7998776
'8127712
'0128172
'1827300

To:
7998776
8127712
0128172
1827300

I can’t use a loop because there are a lot of entries.

Thank you,
Maria

Hi @mmarcos

How about this expression?

Dtinput.AsEnumerable().Select(Function(a) Dt.Clone.LoadDataRow({a.Field(OF String)("Column name").ToString.Replace("'","")},False)).CopyToDataTable

Regards
Gokul

1 Like

Another method @mmarcos

DtRead.AsEnumerable.Select(Function(r) DtRead.Clone.LoadDataRow({System.Text.RegularExpressions.Regex.Replace(r("Column Name 1").ToString,"'",""),r("Column name 2"),r("Column name 2")},False)).CopyToDataTable

Regards
Gokul

Should I use invoke code?

@mmarcos

just use it in assign activity

yourfinaldt=above expression

It’s not working. I am using c#

Hi

Have a view on this document for more insights
It has got an example to do with invoke code using c#

Cheers @mmarcos