I am fairly new to posting questions i greatly appreciate your support.
I wanted to write a proc to update my table testAd
.
A replace function could do it but I have almost a million records to update and I am trying to use stored procedure.
Could you have a look at what I have started? Thank you I appreciate it. I should come up with something by end of day today..a kind of tough situation. I tried the one below it doesn't seem to be working.
CREATE PROC [dbo].[testAd]
AS
DECLARE @ci VARCHAR (255)
UPDATE Stage.TestAdd
SET @ci=AddressOne
SET @ci= CASE @ci
WHEN 'Des Moines' THEN 'IA'
WHEN 'Seattle' THEN 'WA'
WHEN 'Pheonix' THEN 'Az'
WHEN 'Phx' THEN 'Az'
.
.
ELSE @ci
END