on 12-28-2016 3:00 PM - last edited on 02-03-2024 6:45 PM by postmig_api_4
I am trying to use nested table (or any collection type) in SAP Webi Freehand SQL but have not been able to find a way.
Below queries are validated successfully but no result object is returned, and I am unable to run the query.
Questions:
- Can I use collection types in FHSql (I know I can write stored procedure with cursor reference and execute in FHSql, but I don't have access to create sps)?
- In general, can I run query other than simple select, insert, etc. statement in FHSql?
Note: I know I can use WITH statements but it is limited, and I want flexibility to use cursor, collection, etc. for advance report writing. Creating Stored procedure is not an option as stated above.
QUERY1:
DECLARE
TYPE tblType IS TABLE OF Person%RowType;
tbl tblType;
BEGIN
SELECT *
BULK COLLECT INTO tbl
FROM DBTable
WHERE rownum<100;
END;
Query2:
DECLARE rows SYS_REFCURSOR;
BEGIN
OPEN rows
FOR
SELECT *
FROM DBTable
WHERE rownum<100;
END;
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.