Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored Procedure Help 1

Status
Not open for further replies.

pyttviper

MIS
May 15, 2001
37
0
0
US
What i want to do is Update a field in a table with new information without deleting the old info.

i retrive a record set from a query and set variables for each selected field then pass through the RS and inserts those values into another table. i want to update a field in a second table with one of the values but not overwrite the information in that field but add to it. i think that i can do the appending in the SP then overwrite the field.
something like:
Code:
@updateNotes = @Notes + @Type --where @type is the appending info
--Then 
Update Asset SET Notes = @updateNotes Where identifier = @identifier
 
How about
UPDATE Asset SET Note = RTRIM(Note) +
(SELECT <TheTypeInfoField> FROM <TheOtherTable>
WHERE <SomeCriteriaIsTrue>)
WHERE <IdentifierCriteriaIsTrue> JHall
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top