Re: Database Queries (gurus - Help needed)

From: <ericl_at_community.net>
Date: 1995/08/19
Message-ID: <413mq7$8tt_at_odin.community.net>#1/1


In article <DDH3Es.Fp3_at_pfizer.com>, ywu <ywu.pfizer.com> wrote:
>
>Hi,
>
> try to do
>
> update table_name set name=substr(name,3,10)
>
> if your table looks like
>
> table_name(name varchar2(10))
>
> good luck !
>
>
>Yong,
>

It looks like you are trying to update your column with 2 non-existant characters.

The syntax for substr is:

substr(column,beginning character, number of characters)  

To update name with the last 8 characters of name you would use:

update table_name set name = substr(name,3,8)

I hope that this helps

Eric Received on Sat Aug 19 1995 - 00:00:00 CEST

Original text of this message