Re: HELP: Assigning a high-length VARCHAR2 to a low-length one
From: <markp7832_at_my-deja.com>
Date: Tue, 18 Jan 2000 14:44:54 GMT
Message-ID: <861u92$7ks$1_at_nnrp1.deja.com>
Date: Tue, 18 Jan 2000 14:44:54 GMT
Message-ID: <861u92$7ks$1_at_nnrp1.deja.com>
In article <861dsa$o2p$1_at_news1.tele.dk>,
"Peder" <peder.pedersen_at_fillmbyen.com> wrote:
> Hello,
>
> Could anyone please help me with a small problem:
>
> I need to assign v1 to v2, where v1 is VARCHAR2 with a greater length
than
> v2. Is this possible? An error is raised when I attempt.
>
> If this is not possible, is there a way to extract the n leading
characters
> of a VARCHAR2 string?
>
> Thanks in advance,
>
> Peder
>
>
Use a substr function in your select:
select substr(column,start,length) from .....
DDC2> select substr('TOMMYBOY',1,3) from dual;
SUB
--- TOM The available list of functions and their usage is covered in the SQL manual. -- Mark D. Powell -- The only advice that counts is the advice that you follow so follow your own advice -- Sent via Deja.com http://www.deja.com/ Before you buy.Received on Tue Jan 18 2000 - 15:44:54 CET