Seems to be no one is skilled in SQL for these functions?
Well I’m adding to this message what I’ve discovered, so hopefully someone could read this and help the community
I’ve found a document in which is described the use of COLLECT, FUSION, INTERSECTION functions in SQL.
Exactly, these functions comes from SQL 2003
The document is available here:
http://www.sigmod.org/publications/sigmod-record/0403/E.JimAndrew-standard.pdf
I quote verbatim: “Additionally, the union, intersection, and difference of two multiset values are supported, as well as three new aggregate functions to create a multiset from the value of the argument in each row of a group (COLLECT), to create the multiset union of a multiset value in all rows of a group (FUSION), and to create the multiset intersection of a multiset value in all rows of a group (INTERSECTION).”
Okay, I’m trying to recreate the same piece of code of that document, but I am getting an error.
Here is my database:
https://mega.co.nz/#!REB1QS5Y!VH1vmqrVmeOa4dtA3Sl8luR00DggV0CEvlUl8qWn1L0
Here is the piece of code I’m writing:
SELECT
COLLECT( "Nombre" ) "AllNames",
FUSION( "Hobby" ) "AllHobbies",
INTERSECTION( "Hobby" ) "CommonHobbies"
FROM "tbl_HOBBIES"
The error I am getting is:
SQL Status: S1000
Error code: -33
Access is denied: COLLECT in statement [SELECT COLLECT( “Nombre” ) “AllNames”, FUSION( “Hobby” ) “AllHobbies”, INTERSECTION( “Hobby” ) “CommonHobbies” FROM “tbl_HOBBIES”]
If someone with SQL skills could tell me what am I doing wrong? I’d really appreciate that.
Cheers