‎2009 Dec 16 11:02 AM
Hello
I need to access twice the same table with the help of aliases.
I tried this
SELECT DISTINCT CHILD~NODENAME PARENT~NODENAME into table it_org_hierarki FROM /BI0/HORGUNIT AS CHILD
JOIN /BI0/HORGUNIT AS PARENT ON PARENT~NODEID = CHILD~PARENTID.
But I get an run-time error DBIF_RSQL_INVALID_RSQL.
How can I get what I'm looking for ? Isn't it possible to use an alias to access the same table twice in a SELECT?
‎2009 Dec 16 11:09 AM
‎2009 Dec 16 11:16 AM
Hi,
I think you are getting this error coz the internal table is over filled.
SELECT DISTINCT CHILD~NODENAME PARENT~NODENAME into table it_org_hierarki FROM /BI0/HORGUNIT AS CHILD
JOIN /BI0/HORGUNIT AS PARENT ON PARENT~NODEID = CHILD~PARENTID. "Use the WHERE clause and fetch only the records that you want
‎2009 Dec 16 11:33 AM
It's ok now.
I simply had a bad definition in my internal table. It didn't match with the 2 selected fields .
Sorry.
‎2011 Aug 02 6:46 PM
did you manage to solve this, I'm trying to read the orgunit hierarchy table to find all the child nodes under each parent orgunit, can some one guide me please?