Hi,
I need to Insert the new columns to the table , i have already 200 records in the table.
The requirement is only add the new values based "version values." The idea is add new values and do not replace the existing column values.
Table Name : VersionManagement
i have maintained 12 w and 12,, then i should have 152w and 152. Do not replace the exising columns. Instead add this new value .
Id is Unique Numbeer (NEWID ( )), NameID from Other Tables.(Reference Key).
could you please help me, how add the new values..
INSERT INTO VersionManagement (
Deleted,
ID,
NameID,
Version
)
SELECT [deleted],
newid(),
NameID,
CASE
WHEN Version = '12'
THEN '152'
ELSE '152w'
END
FROM VersionManagement
WHERE Version IN (
'12',
'12w'
)