Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have a table called A, in this table there is a colum called NAME.
I'm trying to change in this colum all the strings 'lop' to 'pol' and storing them again under the colum NAME in the Table A.
A:
Load
*,
Replace(NAME,'lop','pol')
resident A;
This code does not give me the desired output.
How can I achieve this in the data editor ?
It's easily possible by using: Replace(NAME,'lop','pol') as NAME and specifying all other wanted/needed fields explicitly within the load.
Doing everything explicitly would be best practice. If you want to go a more lazy way by using a wildcard for the fields you need some extra efforts, for example:
X: Load *, Replace(NAME,'lop','pol') as X resident A;
drop tables A; drop fields Name; rename fields X to NAME;
Beside this I suggest to apply this transformation already in the origin load of A and not wasting resources by doing it within an extra step.
It's easily possible by using: Replace(NAME,'lop','pol') as NAME and specifying all other wanted/needed fields explicitly within the load.
Doing everything explicitly would be best practice. If you want to go a more lazy way by using a wildcard for the fields you need some extra efforts, for example:
X: Load *, Replace(NAME,'lop','pol') as X resident A;
drop tables A; drop fields Name; rename fields X to NAME;
Beside this I suggest to apply this transformation already in the origin load of A and not wasting resources by doing it within an extra step.