Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Please assist
I have a string of text that if it contains the word XYZ, need to display as ABC in a Chart Table
Please assist
Regards
Marcus
sorry.. it should be the other way round,
Load
replace(yourfield,'xyz','abc') as yourfield ,
//
Hi
if(namefield=XYZ,ABC)
try this,
=If(FieldName='XYZ','ABC',FieldName)
Did you mean like this,
Load
replace(yourfield,'abc','xyz') as yourfield ,
//
sorry.. it should be the other way round,
Load
replace(yourfield,'xyz','abc') as yourfield ,
//
Thank you very much - worked like a charm
Could I please ask you a further question, Should I wish to replace any fields that contain XY* with ABC, how would I do this?
Thanks
Like this?
Load
F1 as from,
if(len(mid(F1,index(F1,'xy')))>2,mid(F1,1,(index(F1,'xy')-1))&'abc'&mid(F1,index(F1,'xy')+3),F1) as to
;
LOAD * INLINE [
F1
hi xyz
hello xy
xyz
xyt qweqw
];
Thanks,