Loading ...
Sorry, an error occurred while loading the content.

Re: Updating part of a string

Expand Messages
  • hiramtiro
    Arnie and Peter, thank you very much for the help (and for the tips)!! ... should ... the more ... intended solely for SQLQueriesNoCode@yahoogroups.com If you
    Message 1 of 4 , Jun 1, 2006
    • 0 Attachment
      Arnie and Peter, thank you very much for the help (and for the
      tips)!!



      --- In SQLQueriesNoCode@yahoogroups.com, "Arnie Rowland" <arnie@...>
      wrote:
      >
      > Yes, quite possible.
      >
      > Try
      >
      > UPDATE Bikes
      > SET Name = replace( Name, 'OLD', 'NEW' )
      > WHERE ... --if criteria are needed to keep from
      > --changing the entire table.
      >
      > The 2 items to be exchanged do not have to have the same number of
      > characters. However, be sure that 'OLD' is not part of a word that
      should
      > not be changed.
      >
      > - Arnie Rowland
      >
      > "I am a great believer in luck, and I find that the harder I work,
      the more
      > I have of it." - Thomas Jefferson (1743-1826)
      >
      >
      > -----Original Message-----
      > From: SQLQueriesNoCode@yahoogroups.com
      > [mailto:SQLQueriesNoCode@yahoogroups.com] On Behalf Of hiramtiro
      > Sent: Wednesday, May 31, 2006 9:06 PM
      > To: Arnie
      > Subject: [SQLQueriesNoCode] Updating part of a string
      >
      > Hello,
      >
      > If anyone can help me...
      >
      > I have a table, and I want to update it, correcting some data.
      > Example:
      >
      >
      > BIKES
      > ----------
      > Name
      > ----------
      > BIKE OLD 1
      > BIKE OLD 2
      > BIKE OLD 3
      >
      > And I want to update all of them to (switching the "OLD" on the
      > string to "NEW"):
      > BIKE NEW 1
      > BIKE NEW 2
      > BIKE NEW 3
      >
      > Is it possible?
      >
      > Thanks!!
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      > Disclaimer - May 31, 2006
      > This email and any files transmitted with it are confidential and
      intended solely for SQLQueriesNoCode@yahoogroups.com If you are not
      the named addressee you should not disseminate, distribute, copy or
      alter this email. Any views or opinions presented in this email are
      solely those of the author and might not represent those of Westwood
      Consulting, Inc. Warning: Although Westwood Consulting, Inc has
      taken reasonable precautions to ensure no viruses are present in
      this email, the company cannot accept responsibility for any loss or
      damage arising from the use of this email or attachments.
      > This disclaimer was added by Policy Patrol:
      http://www.policypatrol.com/
      >
      >
      > [Non-text portions of this message have been removed]
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.