CREATE TABLE Table_1
(
col1 NUMERIC(16, 12)
)
INSERT INTO Table_1
SELECT col1
FROM table_2;
How to replicate above code in SAS using proc SQL? if the length of col1 from table 2 does not matches with
col1 NUMERIC(16, 12) the program should show an error message.
Is it achievable in SAS using proc SQL?
SAS has only one datatype for numbers: numeric (8 byte floating point, aka "real"). All numeric types defined in, say SQL, map to this; combining such datasets will work.
Only when you try to mix character with numeric, or character variables with different defined lengths, will you run into problems.
SAS has only one datatype for numbers: numeric (8 byte floating point, aka "real"). All numeric types defined in, say SQL, map to this; combining such datasets will work.
Only when you try to mix character with numeric, or character variables with different defined lengths, will you run into problems.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.