I think the problem is that you renamed the identifier to inboxforcommunicationid in your subquery named "d", meaning that you should refer to it as d.inboxforcommunicationid, not d.identifier in the join clause.
I think the problem is that you renamed the identifier to inboxforcommunicationid in your subquery named "d", meaning that you should refer to it as d.inboxforcommunicationid, not d.identifier in the join clause.
From the log:
ERROR: CLI describe error: [IBM][CLI Driver][DB2/LINUXX8554] SQL0206N "D.IDENTIFIER" is not valid in the context where it is used.
SQLSTATE=42703
For your code:
select distinct identifier as inboxforcommunicationid,name as afdeling from qis.rpinboxforcommunication where identifier
55 ! in ('00000000001','10000000000','10000000001','10000000003')) as d
56 on a.inboxforcommunicationID=d.identifier
Put the two together and you will see that in the select block, you take a variable called identifier as new variable inboxforcommunicationid. But later on you use d.identifier, which is not in the select clause. Thus d.identifier is not valid where you have used it.
The log tells you problems in your code.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.