08-17-2017 12:52 PM
I create a table using a proc sql:
PROC SQL; CREATE TABLE A (B char(6) label = "BA"); QUIT;
For every rows, the column B is filled in with "PA".
Finally the column B of my table A has a length of 2.
I would like it to remain to 6 as I ask it to do...because in a next step I merge with another table which has more than 2 characters and otherwise it creates truncation problems.
Do you know how I could do it?
08-17-2017 01:24 PM
But why did you write 8? I want 6! ^^
Then change it to 6.
I tried it and the problem remains.
Show what you tried and what the 'problem remains' means. Explain in detail, preferably using the example/code we can run. It works in the demonstration code I presented so either you're not stating something that's important or doing something else that's changing it somewhere else.
The output here clearly shows the length is now 8.
|Alphabetic List of Variables and Attributes|
PROC SQL; CREATE TABLE A (B char(6) label = "BA" length=8); QUIT; proc contents data=a; run;