defjam90
10th April 2008, 12:03
Hi,
I am trying to remove the carriage return from text field , but I am unable to caputre the carriage return.I would like to make the text as a continous field & remove the carriage returns & replace it with letter "Z"
Here is the logic I am using.
txt = string(240)
select tttxt010.*
from tttxt010
where tttxt010._index1 = {:tibom010.txta} selectdo
txt = tttxt010.text
endselect
txt = PRINT LABEL AS FOLLOWS:"\n""RETROFIT 1482 TRANSDUCER"
\n = carriage return
End result(Required Output)
txt = PRINT LABEL AS FOLLOWS:"Z"RETROFIT 1482 TRANSDUCER"
I would like to remove the carriage return & replace it with "Z"
I have tried using several unix command using the shell option , but I am unable to remove the carriage return for ex rets = shell("sed 's/old/new/g' input.txt > output.txt",0)
Let me know the solution to over come the above problem.
I can easily do the replace using toad , using the following statment select replace (t$text,chr(10),'') from ttttxt010110 where t$ctxt = 184220
Unfortunately i cannot use this syntax with in a baan session
Let me know the solution to over come the above problem.
I am trying to remove the carriage return from text field , but I am unable to caputre the carriage return.I would like to make the text as a continous field & remove the carriage returns & replace it with letter "Z"
Here is the logic I am using.
txt = string(240)
select tttxt010.*
from tttxt010
where tttxt010._index1 = {:tibom010.txta} selectdo
txt = tttxt010.text
endselect
txt = PRINT LABEL AS FOLLOWS:"\n""RETROFIT 1482 TRANSDUCER"
\n = carriage return
End result(Required Output)
txt = PRINT LABEL AS FOLLOWS:"Z"RETROFIT 1482 TRANSDUCER"
I would like to remove the carriage return & replace it with "Z"
I have tried using several unix command using the shell option , but I am unable to remove the carriage return for ex rets = shell("sed 's/old/new/g' input.txt > output.txt",0)
Let me know the solution to over come the above problem.
I can easily do the replace using toad , using the following statment select replace (t$text,chr(10),'') from ttttxt010110 where t$ctxt = 184220
Unfortunately i cannot use this syntax with in a baan session
Let me know the solution to over come the above problem.