Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: SQL question

Re: SQL question

From: Jan Pruner <jan_at_pruner.cz>
Date: Wed, 21 Nov 2001 09:13:32 -0800
Message-ID: <F001.003CAE71.20011121085649@fatcity.com>

Or if id is number
update table
  set column_name=TO_NUMBER(substr(TO_CHAR(column_name),-4,4))

JP

On Wed 21. November 2001 17:45, you wrote:
> Fawzia
>
> How about:
>
>
>
> update table
> set column_name=substr(column_name,-4,4)
>
>
>
> Tom Mercadante
> Oracle Certified Professional
>
>
> -----Original Message-----
> Sent: Wednesday, November 21, 2001 11:04 AM
> To: Multiple recipients of list ORACLE-L
>
>
>
> Hi,
>
> Can you tell me if its possible to write some sql to change some data.
> Basically I need to run a scritp to change data of column: id from 12345678
> to the last four digits. Is this possible to do in sql/plsql??
>
> Any advice/hints would be greatly appreciated
>
> Rgds
>
> Fawzia
>
>
> **********************************************************************
> Information in this email is confidential and may be privileged.
> It is intended for the addressee only. If you have received it in error,
> please notify the sender immediately and delete it from your system.
> You should not otherwise copy it, retransmit it or use or disclose its
> contents to anyone.
> Thank you for your co-operation.
> **********************************************************************

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jan Pruner
  INET: jan_at_pruner.cz

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed Nov 21 2001 - 11:13:32 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US