Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a requirement to find a string from the data base and represne in a table.
Input data :
Data :
ABC1230
dfg ABC11 th
yur ABC435000 mm
kk ABC76859 ndf ght ii
I need to find the string Which start from ABC.
Expected Output:-
data
ABC1230
ABC11
ABC435000
ABC76859
You help will be highly appriciated
Thanks!
D J
This is the working expression
If(Index(VAL,'ABC')>0,
If(Index(Mid(VAL, Index(VAL,'ABC')),' ') > 0,
Mid(VAL, Index(VAL,'ABC'), Index(Mid(VAL, Index(VAL,'ABC')),' ')),
If(Index(Mid(VAL, Index(VAL,'ABC')),' ') = 0,
Mid(VAL, Index(VAL,'ABC')),
'---'
)
)
,'---'
)
You could try
KEEPCHAR(data,'ABC0123456789') AS Data
This is the working expression
If(Index(VAL,'ABC')>0,
If(Index(Mid(VAL, Index(VAL,'ABC')),' ') > 0,
Mid(VAL, Index(VAL,'ABC'), Index(Mid(VAL, Index(VAL,'ABC')),' ')),
If(Index(Mid(VAL, Index(VAL,'ABC')),' ') = 0,
Mid(VAL, Index(VAL,'ABC')),
'---'
)
)
,'---'
)
Or try
TRIM(PURGECHAR(data,'abcdefghijklmnopqrstuvwxyz')) as [New Data]
KeepChar is not working because it will return all the character in that string .
Thanks
D J
May be like:
Input:
Load SubField(data, ' ') as NewData From <>;
Output:
Load
NewData
Resident Input Where WildMatch(NewData, 'ABC*') ;
Drop table Input;
See attached
You could also try