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

Thread: address varchar2(175)

  1. #1
    Join Date
    Jul 2001
    Posts
    334

    address varchar2(175)

    Hi,
    I have a table and column name is address varchar2(175).
    I am developing a developer/2000 Form and I wants to display 5 lines with the width 35 instead of 1 line.
    e.g
    Addr1__________________
    Addr2__________________
    Addr3__________________
    Addr4__________________
    Addr5__________________


    Please help me to resolve this.
    Thanks.

  2. #2
    Join Date
    Sep 2001
    Location
    NJ, USA
    Posts
    1,287
    SQL> select 'addr'||rpad('_',35-length('addr'),'_') field_val,
    length('addr'||rpad('_',35-length('addr'),'_')) len from dual;

    FIELD_VAL LEN
    ----------------------------------- ----------
    addr_______________________________ 35

    SQL>

  3. #3
    Join Date
    Jul 2001
    Posts
    334
    Hi,
    Where I will type this SQL?

  4. #4
    Join Date
    Feb 2001
    Posts
    203
    select
    substr(address,1,35),
    substr(address,36,75),
    substr(address,76,105),
    substr(address,106,140),
    substr(address,141,175)

    into :block.addr1,:block.addr2,:block.addr3,:block.addr4,:block.addr5

    from table;

    For example you have a form with 5 columns, And one button called
    "Find".

    right Click on find button and select plsql and select
    "when button pressed" trigger and write this sql in that.
    put "begin" at the sql code front and "end" at the last.

    When ever you click the button, The plsql code will retrieve the data
    into the 5 address fields, In above sql code change ":block." with
    your block name.

    Good Luck.

    Sree.
    sree

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