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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.