Re: converting chars to varchar2's. Please help

From: Saad Ahmad <sahmad_at_mfa.com>
Date: 1995/08/16
Message-ID: <40thco$efp_at_homer.alpha.net>#1/1


DINESH PUNJABI (dpunjabi_at_nyx10.cs.du.edu) wrote:
> Greetings,
> a view containing varchar2 fields. The tables used to build the view contain
> char fields. Is there a way to convert this to a varchar2 (like within
> a select statement).
> -----------------------------------------------------------------------------
> Sample test:
> SQL> desc dinesh_test
> Name Null? Type
> ------------------------------- -------- ----
> COL1 NUMBER(38)
> COL2 CHAR(10)
> SQL> select * from dinesh_test;
> COL1 COL2
> ---------- ----------
> 12345 HELLO1
VARCHAR2 columns don't store the trailing spaces. Just do a rtrim ( COL2) ...

--
**************************************************************
*                          Saad Ahmad                        *
*                          McHugh Freeman & Associates, Inc. *
*                          Ph:  (414) 798-8606 Ext. 457      *
*                          Fax: (414) 798-8619               *
*                          E-Mail: sahmad_at_mfa.com            *
**************************************************************
Received on Wed Aug 16 1995 - 00:00:00 CEST

Original text of this message