SQL Server update statement

I need to update a part of a field with a value.

If a field has a value of ListID = xValue
and field.title = 'This is more stuff $4.125 Million U'

and  ListPrice gets updated from 4125000.00 to 3975000.00
I need the otehr field to be updated to

field.title = 'This is more stuff $3.975 Million U' where listid = xValue

Larry Bristersr. DeveloperAsked:
Who is Participating?
 
dqmqConnect With a Mentor Commented:
Not sure what  you are asking.  Seems like you want to change the SQL, not update the table.
0
 
David ToddSenior DBACommented:
Hi,

Please post a create statement for your table.

How are you updating things at present? Via a procedure or direct from code?

Regards
  David
0
 
Larry Bristersr. DeveloperAuthor Commented:
dtodd
blah...blah...blah...
begin
update tblListingInput
set ListPrice=@price
where ListID=@ListID
end

I then need to replace that string in tblMarketing.adTitle where ListID = @ListID and mktID = @mktID
0
 
Larry Bristersr. DeveloperAuthor Commented:
and Via a procedure
0
 
Larry Bristersr. DeveloperAuthor Commented:
Let me try and clarify...

One tabel stores a dollar figure that is used in many places.

Another table stores an Advertising Title that is used specifically for a partivular issue(s)

When the asking sale price is changed I'm going to updae this Advertisint Title for the listing.

HOWEVER...everthin in that Ad Title can be edited after the first "build".  

All I want to do is grab the string out of the middle that pertains to the dollar amopunt and update THAT with the new sales price.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.