🔒 This topic is solved and locked.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 09-25-2019 04:09 PM
(7861 views)
Hi - I am looking to list multiple values in one variable I want to include in a proc SQL table under a where statement. The code listed below did not work. What am I missing/doing wrong? Thank you!
proc sql;
create table largesmall_&date_input. as select
&date_input. as asofdate,
mainbank,
mainbankid,
loansize,
sum(lst12mn_count) as lst12mn_count,
sum(lst12mn_grsapproval) as lst12mn_grsapproval
from lenders_&date_input.
where mainbankid='A363289' or 'A108430' or '6606272' or '5521965' or '7022337' or '5521965'
or 'A491999' or 'A200760' or '7062401' or 'A331210' or 'A055698' or '7021510'
or 'A070130' or 'A058410' or '7021510'
group by 1,2,3,4
;
quit;
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
where mainbankid in ('A363289', 'A108430', '6606272', '5521965' '7022337', '5521965' 'A491999', 'A200760', '7062401', 'A331210', 'A055698', '7021510', 'A070130', 'A058410', '7021510')
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
where mainbankid in ('A363289', 'A108430', '6606272', '5521965' '7022337', '5521965' 'A491999', 'A200760', '7062401', 'A331210', 'A055698', '7021510', 'A070130', 'A058410', '7021510')
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I knew it was going to be something simple... Thank you! I am just beginning to learn SAS. I appreciate the help
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
No problem! Don't forget to start exploring the SAS documentation at documentation.sas.com. Many answers can be found there too and quicker.