Hello. I am having trouble with the Update SQL statement in sql analyzer. I am trying to change the lastname O'NEIL to
ONEIL.
Let me Explain:
Field Data
Last O'NEIL
I want to change Data to take the apostrophe from name:
Field Data
Last ONEIL
Here is my code:
Update cal.dbo.name
set last = Replace(last , "'", "")
where last LIKE 'O''NEIL%'
This is the error I get.
Server: Msg 1038, Level 15, State 3, Line 2
Cannot use empty object or column names. Use a single space if necessary.
ONEIL.
Let me Explain:
Field Data
Last O'NEIL
I want to change Data to take the apostrophe from name:
Field Data
Last ONEIL
Here is my code:
Update cal.dbo.name
set last = Replace(last , "'", "")
where last LIKE 'O''NEIL%'
This is the error I get.
Server: Msg 1038, Level 15, State 3, Line 2
Cannot use empty object or column names. Use a single space if necessary.