Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Location
    india
    Posts
    23

    Unanswered: help with a query

    Hi,
    I have a table test with the following columns and data.

    TEST :
    -----
    a adate bdate
    1 1/1/04 2/1/04
    2 3/1/04 4/1/04
    3 5/1/04 6/1/04

    I want the output as follows :
    1,1/1/04,2,4/1/04

    or

    2,3/1/04,3,6/1/04

    ie i want a,adate,a(the next record), bdate for that row

    Is there any query which will achieve the above?. Please help.

    Thanks.

  2. #2
    Join Date
    Dec 2004
    Posts
    19
    set term off
    set trims on
    set pages 0
    Set Linesize 5000
    set feedback off

    spool c:\1.txt;

    Select 'a'||chr(44)||'adate'||chr(44)||'bdate' FROM DUAL;

    SELECT
    a||chr(44)||adate||chr(44)||bdate from test;

    spool off;


    Quote Originally Posted by sching
    Hi,
    I have a table test with the following columns and data.

    TEST :
    -----
    a adate bdate
    1 1/1/04 2/1/04
    2 3/1/04 4/1/04
    3 5/1/04 6/1/04

    I want the output as follows :
    1,1/1/04,2,4/1/04

    or

    2,3/1/04,3,6/1/04

    ie i want a,adate,a(the next record), bdate for that row

    Is there any query which will achieve the above?. Please help.

    Thanks.

Posting Permissions

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