简体   繁体   中英

Fetching from the Results of Table Functions

I use a function and pipeline its return values. I call the above function as:

SELECT * FROM TABLE(FUNC(params)) ORDER BY somecolumn;

It returns the results as a 1 x 4 table, and I tried using cursors to retrieve them. But is shows an error, saying that a cursor is only for fieldnames or column names and not for type .

Is it still possible to use cursors for the same, or is there any other way to retrieve the individual fields.

I think this is what you want?

SELECT MyTable.Column1, MyTable.Column3, etc
FROM TABLE(FUNC(params)) MyTable
ORDER BY somecolumn;

To access specific columns, just alias the table.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM