Unanswered: copying a record within the same table...
Hi. I would like to copy some records within the same table. what happens is we get very similar new cases in our office and we want to apply the same information from one client to the new client.
i looked at:
INSERT INTO ClientSpecs (ClientID, Spec1, Spec2, etc.)
SELECT Spec1, Spec2 from ClientSpecs WHERE ClientID=1234
but i want to use the new client id in place of the old client id. is there a way to do this? does this make sense? we're basically copying one client's file to a new client's file, except we need to use the new client's id.
UPDATE ClientSpecs destTble
SET destTble.Spec2 = (SELECT srcTbl.Spec2
FROM ClientSpecs srcTbl
WHERE srcTbl.ClientID = destTble.ClientID
AND srcTble.Spec1 = destTble.Spec1)
WHERE destTble.ClientID = '4567'
Retired Moderator at Xtreme VB Talk, for all of your Visual Basic needs.