Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI,
I have a field it,s like as shown in image, I want to Replace marked values into ABC .please help me how can i achieve.
Use this
Replace(Value,(SubField(Value,'-',3)),'XYZ') as check1
it will give 3rd position
XYZ
Use this
Replace(Value,'555','ABC') as check
Hi,
T1:
LOAD * Inline [
Value
001-0525-04-555-121
001-0525-02-555-121
001-0525-01-555-121
001-0525-04-555-121
001-0525-02-555-121
001-0525-01-555-121
];
NoConcatenate
T2:
LOAD
RecNo() as Rec,
Replace(Value,'555','ABC') as check
Resident T1;
DROP Table T1;
Result:
HI Mahesh,
if i want replace 3rd position what can i do
Use this
Replace(Value,(SubField(Value,'-',3)),'XYZ') as check1
it will give 3rd position
XYZ
Thank you very much Mahesh,
what happens if your value field looks like:
555-0555-04-555-121 ???
you should try like this:
1:
LOAD * Inline [
Value
001-0525-04-555-121
001-0525-02-555-121
001-0525-01-555-121
001-0555-04-555-121
555-0555-04-555-121
];
NoConcatenate
2:
LOAD
*,
subfield(Value,'-',1)&'-'&subfield(Value,'-',2)&'-'&subfield(Value,'-',3)&'-'&Replace(subfield(Value,'-',4),'555','ABC')&'-'&subfield(Value,'-',5) as newValue
Resident 1; DROP Table 1;