DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: view column length problem

  1. #1
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204

    view column length problem

    table "test" has col1 which is varchar2(10)

    create view testv as (select substr(col1,1,3) firstthree from test);

    desc testv
    Name Null? Type
    FIRSTTHREE VARCHAR2(9)

    Why is this varchar2(9) instead of varchar2(3)?
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Dunno, but you could ...
    Code:
    Create view TESTV
    As
    Select
       Cast(SubStr(col1,1,3) As Varchar2(3))
          firstthree
    from
       test
    /
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  3. #3
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    Dude, you've got a BIG brain!

    This was a deal breaker. THANK YOU!
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

  4. #4
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Deal breaker eh? I'll send an invoice.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width