Skip to content Skip to sidebar Skip to footer

Stored Procedure Returns An Array; How To Use In Sql?

I am writing an accounting system backed by an h2 database. The tree of accounts is stored in the ACCOUNTS table, with the PARENT_ID column storing the links in the tree. To get t

Solution 1:

I'm unfamiliar with h2, but this page says you must place () around the array.

SELECT ID FROM ACCOUNTS WHERE ID IN (ANCESTOR_PKS(5))

Maybe you even have to add a subselect

SELECT ID FROM ACCOUNTS WHERE ID IN (SELECT ANCESTOR_PKS(5))

Post a Comment for "Stored Procedure Returns An Array; How To Use In Sql?"