This works, but i would like to remove the redundancy. Is there a way to merge the update with a single select statement so i don't have to use vars?
DECLARE
@OrgAddress1 varchar,
@OrgAddress2 varchar,
@OrgCity varchar,
@OrgState varchar,
@OrgZip varchar,
@DestAddress1 varchar,
@DestAddress2 varchar,
@DestCity varchar,
@DestState varchar,
@DestZip varchar
SELECT
@OrgAddress1 = OrgAddress,
@OrgAddress2 = OrgAddress2,
@OrgCity = OrgCity,
@OrgState = OrgState,
@OrgZip = OrgZip,
@DestAddress1 = DestAddress,
@DestAddress2 = DestAddress2,
@DestCity = DestCity,
@DestState = DestState,
@DestZip = DestZip
FROM
ProfilerTest.dbo.BookingDetails
WHERE
MyID=@MyID
UPDATE SHIPMENT
SET
OrgAddress1 = @OrgAddress1,
OrgAddress2 = @OrgAddress2,
OrgCity = @OrgCity,
OrgState = @OrgState,
OrgZip = @OrgZip,
DestAddress1 = @DestAddress1,
DestAddress2 = @DestAddress2,
DestCity = @DestCity,
DestState = @DestState,
DestZip = @DestZip
WHERE
MyID2=@ MyID2