Hello,
I have a UDF([Name_Parser]) that accepts a name
('Mrs. Thurston Howell, IV' and returns the following
original: Mrs. Thurston Howell, IV
prefix: Mrs
firstName: Thurston
middleName:
lastName: Howell
suffix: IV
So the UDF is working fine.
---------------------------------------------------
DECLARE @TNAME varchar(50)
SET @TNAME = 'Mrs. Thurston Howell, IV'
SELECT * INTO #TempVariable1
FROM [dbo].[Name_Parser](@TNAME)
SELECT
original ( Full Name Field )
, prefix
, firstName
, middleName
, lastName
, suffix
FROM #TempVariable1
---------------------------------------------------
What I need to do is Perform an update on the User Table and take the Name data and pass it to the UDF, get the results and update the different fields and complete the update.
Any ideas on how this can be done?
What I have tried:
Everything that I can think of.
UPDATE dbo.USER
SET First_Name = firstName
SET Last_Name = lastName
I just do not know how to make this work.
Any constructive help would be greatly appreciated.