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.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.