Where condition with multiple variables

Accepted Solution Solved
Reply
Contributor
Posts: 44
Accepted Solution

Where condition with multiple variables

I am trying to pull records that are equal to 'Unknown' and DRG =469. What is wrong with my where statement?

 

 

select count(desy_sort_key) from etl.inp_claims_lds2013_2016 where Age_Range='Unknown' and clm_drg_cd ='469';

 

LOG BELOW

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
61
62 select count(desy_sort_key) from etl.inp_claims_lds2013_2016 where Age_Range='Unknown'
______
180
62 ! and clm_drg_cd ='469';

ERROR 180-322: Statement is not valid or it is used out of proper order.

63
64 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
77


Accepted Solutions
Solution
‎03-13-2018 01:39 AM
Regular Contributor
Posts: 213

Re: Where condition with multiple variables

Do you have "proc sql;" before and "quit;" after your select-statement?

View solution in original post


All Replies
Solution
‎03-13-2018 01:39 AM
Regular Contributor
Posts: 213

Re: Where condition with multiple variables

Do you have "proc sql;" before and "quit;" after your select-statement?
Contributor
Posts: 44

Re: Where condition with multiple variables

Posted in reply to error_prone
late night programming ... thanks
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 84 views
  • 0 likes
  • 2 in conversation