I solved my problem and thanks for the tips and help.
I basically added a second cursor that does the following:
- Grab the Combined Full Name field and put it in a temporary variable.
- Checks the header by running the instruction to check Mr, Mrs, etc. otherwise enter an empty string in Title.
- Update name Crop the name of the combined full name
- Check the surname by RIGHT (@TempName, CHARINDEX ('', REVERSE (@TempName)) - 1) and suppose that it is a surname.
- Update Trim surname and replace it with the combined full name
- To the left of the name to the left of LEFT (@TempName, CHARINDEX ('',
@TempName + '') -1) - Update name for name and replace with its associated full name
- Everything else is placed in the middle name.
The bit is long, but in 99.9% of cases in my database it is formally processed.
If you want the code above let me know.
Thank you for your time.
Naxos source share