I need to add records to a table that will be duplicates of other records except that only one value will be different.
So, adding records with FulID that already exists in table but making the FulQId = 229 in the all the new records.
I know I should probably use a CURSOR but I'm not sure how.
Heres what I have so far:
WHILE NOT (SELECT DISTINCT FulID FROM wkbFulResp WHERE FulQTypeId = 1) = Null
INSERT INTO wkbFulResp
SELECT FulRespId, FulRespStatus, FulId, FulQTypeId, '229' AS FulQId,
QuestionCatId, FulResp, RespComments, Created, CreatedBy,
FROM dbo.wkbFulResp WHERE FulId = FulId
In the Where clause the FulId should be the FulId in the current loop...
So, WHERE FulId = [The FulId in the current loop]
This is the best I can explain...