Substring/Trim

General
Enthusiast

Substring/Trim

Hi Leaders,

I got confused how i use substring and trim to get some data, here an example:

Col1                                          Col2                           Col3

1[device] Ipad Mini on line        1[device] ipad Mini       ipad Mini

1[device] ipad 4 on line            1[device] ipad 4           ipad 4

1[sof] MS Office | 123w4          1[soft] MS Office          MS Office

I have the col1 and i want to get col2 adn col3.

thanks in advance,

C B

2 REPLIES
Enthusiast

Re: Substring/Trim

 i can trim the first part till ] with :

SUBSTR(col1,INDEX (col1,']')+1) which it gives 'Ipad Mini on line'

but i cannot cut the last part 'on line' of the column.

Enthusiast

Re: Substring/Trim

i got it TDs : SUBSTR(col1, INDEX(col1, ']') +1,(INDEX(col1, 'Add') -1) - INDEX(col1, ']') )

Many tahnks

C B