Select A.ORG_CODE, A.ACCOUNT_NO, LOGO, DELINQUENCY 1, DELINQUENCY 2, DELINQUENCY 3, DELINQUENCY 4, DELINQUENCY 5, DELINQUENCY 6, DELINQUENCY 7, DELINQUENCY 8, DELINQUENCY 9, DELINQUENCY 10, DELINQUENCY 11, DELINQUENCY 12, DELINQUENCY 13, BLOCK CODE _ 1, BLOCK_CODE_2, DATE_BLOCK_CODE_1, DATE_BLOCK_CODE_2, DATE _LAST_PMT, B.REFINANCE_ ACCT, B.REFINANCE DATE FORMAT=DATE9. FROM ACCT_LIST_PERF A LEFT JOIN VW_xx_REF_NODUP B ON A. ACCOUNT_NO=B . ACCOUNT_NO;
I want to know it the FORMAT=DATE9. only for B.REFINANCE DATE or for other var before B.REFINANCE DATE?
You probably need first to inspect your SAS log. Variable names like DELINQUENCY 1 don't comply with SAS naming conventions. The SAS log will return some sort of error.
As for your question: This needs a bit more explanation. We can't know anything about your source tables and variables based on what you share.
You can't have space in variable names.
In addition
B.REFINANCE DATE FORMAT=DATE9.
is invalid, as you can have only one variable name between the commas in SQL, this is two variable names REFINANCE and DATE. FORMAT=DATE9. refers to only the one variable (once you fix the name) between the commas.
As far as the larger picture, your code probably produced many many errors in SAS. You either ought to fix them before you come here, or if you don't know how to fix them, then you need to ask about those errors.
Hello @HeatherNewton
If you have a variable B.Refinance_date (B.refinance date is not correct. It implies two separate variables) and want to display in the date9. format, then the use of Format=date9. as shown in your code will work.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.