The H2 docs say: "A function that returns a result set can be used like a table."
I implemented such a function as a test: sql> SELECT * FROM powers(2, 8); exp | pow 0 | 1 1 | 2 2 | 4 3 | 8 4 | 16 5 | 32 6 | 64 7 | 128 8 | 256 (9 rows, 22 ms) So far, so good. Now, trying to use the results of calling the function as a table: sql> SELECT t.pow FROM powers(2, 8) AS t INNER JOIN powers_of_two ON (t.exp = powers_of_two.exp); Error: org.h2.jdbc.JdbcSQLException: Column "T.POW" not found; SQL statement : SELECT t.pow FROM powers(2, 8) AS t INNER JOIN powers_of_two ON (t.exp = powers_of_two.exp) [42122-196] Am I missing something? Or does this not work in H2? Thanks. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
