Codessentials

  • Increase font size
  • Default font size
  • Decrease font size
Home Coding tips Oracle Pipelined function as sql expression

Pipelined function as sql expression

If you have a pipelined function than you can call it in a select statement as follows:

select COLUMN_VALUE from table (aPipeLinedFunction(aParams));

Remarks:

  • The selected column MUST be COLUMN_VALUE
  • The selected value will be trimmed to 4000 characters! (1,2)
  • Length(COLUMN_VALUE) will give the actual lenght, even if it exeeds 4000 characters (2).

(1) if you want the part > 4000 you can create a select statement like this:

     select COLUMN_VALUE, substr(COLUMN_VALUE, 4001) from table (aPipeLinedFunction(aParams));

     This will give you parts 1..4000 and 4000..8000. Do not concatenate in the select statement as this will result in an error.

(2) testen on a 9i database.

 

Bookmark

AddThis Social Bookmark Button

Related Articles


Newsflash

If you like freeware, if you like what we do, why not support us?

It does not cost you anything! Click here to support us for free!