Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2005
    Posts
    2

    Unanswered: change "column" names returned from function

    Hi

    I have a function that returns a cursor. These functions are used in our reporting tool, is there any way to give the returned cursor column headings.

    Below in stead of (expression) rather name

    E.g.

    execute function fn_rpl_style( 2005, 'W', 101, 999, 12, 31, 35, 1 ) ;

    returns

    (expression) (expression) (expression)
    ------------ --------------- -------------------
    350 4355 45656421
    350 4355 45656421
    350 4355 45656421


    Thanks All

  2. #2
    Join Date
    Mar 2004
    Location
    Netherlands
    Posts
    183
    Hi,

    Yes, this is possble burt only in newer releases of IDS, you need at leats IDS 9.40.

    A small example:

    create function myfunc(Pinput int) returning int as result;
    return (Pinput + 1);
    end function

    call example: execute function myfunc(4);

    output:

    result
    ====
    5

    This should do the job,

    Rob Prop

  3. #3
    Join Date
    Mar 2005
    Posts
    2
    Thanks, alas were not on that version yet.

Posting Permissions

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