SQL Loader to split a string base on certain requirements into a new field

39 Views Asked by At

I have a flat file that contains a list of people's name. I need to split the last name into a new column when executing sql loader.

Here's the tricky part. I need to split out the surename if it's uppercase base on the following scenarios.

Original Name Surename split
THOMAS Young THOMAS
SMITH Lucas (A.K.A Luca SMITH) SMITH
Dan bin Islam bin Al-BALUSHI BALUSHI
James GORDON-LOPEZ GORDON-LOPEZ
0

There are 0 best solutions below