Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends
I have following data in a column
MAKE_MODEL
TOYOTA AURIS
TOYOTA AT-211
TOYOTA AT211
TOYOTA AQUA-DAA-NHP10
TOYOTA AQUA G HYBRID
TOYOTA AQUA
TOYOTA ALTEZZA
TOYOTA ALPHARD
I want to split it into two columns as shown below
MAKE | MODEL |
TOYOTA | AURIS |
TOYOTA | AT-211 |
TOYOTA | AT211 |
TOYOTA | AQUA-DAA-NHP10 |
TOYOTA | AQUA G HYBRID |
TOYOTA | ACQA |
TOYOTA | ALTEZZA |
TOYOTA | ALPHARD |
Kindly help me to do it in my data load script
Hi,
try below:
left(MAKE_MODEL,index(MAKE_MODEL,' ',1)-1) AS MAKE
mid(MAKE_MODEL,index(MAKE_MODEL,' ',1)+1) AS MODEL
Hope this helps
//Andrei
Hi
You can use subfield function. example subfield(MAKE_MODEL,' ' ,1) as MAKE, subfield(MAKE_MODEL,' ' ,2) as MODEL.
More info:
SubField(text, delimiter[, field_no ])
Thanks
Hi,
try below:
left(MAKE_MODEL,index(MAKE_MODEL,' ',1)-1) AS MAKE
mid(MAKE_MODEL,index(MAKE_MODEL,' ',1)+1) AS MODEL
Hope this helps
//Andrei
Hi
You can use subfield function. example subfield(MAKE_MODEL,' ' ,1) as MAKE, subfield(MAKE_MODEL,' ' ,2) as MODEL.
More info:
SubField(text, delimiter[, field_no ])
Thanks
Thanks Both of You