How to type_castt a function in a view Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: How to type_castt a function in a view

  1. #1
    Join Date
    Jun 2001


    When I use a function in a view it results in a varchar2(4000)
    type. I would like to type cast it to varchar2(10)

    create or replace view aview as
    select afunction(tab.number) T_Type,tab.*
    from atable tab;

    How can do that?


  2. #2
    Join Date
    Dec 2000
    Ljubljana, Slovenia
    Why not use SUBSTR?

    select SUBSTR(afunction(tab.number),1,10) T_Type,tab.* from atable tab;
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

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