BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Babloo
Rhodochrosite | Level 12
 
1 ACCEPTED SOLUTION

Accepted Solutions
s_lassen
Meteorite | Level 14

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.

View solution in original post

2 REPLIES 2
s_lassen
Meteorite | Level 14

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.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1246 views
  • 1 like
  • 3 in conversation