Update Mass Data in Field?

From: Carlos Mennens <carlos(dot)mennens(at)gmail(dot)com>
To: "PostgreSQL (SQL)" <pgsql-sql(at)postgresql(dot)org>
Subject: Update Mass Data in Field?
Date: 2012-01-26 23:59:04
Message-ID: CAAQLLO5fHwYyjtzDs98VAn6FwMW3dnp+uRYYX7-H11OA-WBqnw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I'm new to SQL so I'm looking for a way to change several email
addresses with one command. For example everyone has a 'holyghost.org'
domain and I need to change a few 100 email addresses in the field
'emp_email'. I need to UPDATE employees table which has a COLUMN
'emp_email' and change %holyghost.org to %ghostsoftware.com.

I tried:

UPDATE employees SET emp_email = '%ghostsoftware.com' WHERE emp_email
LIKE '%holyghost.org';

It didn't update anything when I ran the command. Does anyone know how
I need to correct my SQL statement above to change everyone's email
address?

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Steve Crawford 2012-01-27 00:06:43 Re: Update Mass Data in Field?
Previous Message John Tuliao 2012-01-26 12:00:37 Query question