Desktop productivity for business analysts and programmers

Adding a column to an existing table with charter format

Accepted Solution Solved
Reply
Contributor
Posts: 64
Accepted Solution

Adding a column to an existing table with charter format

Hello,

 

I have an existing table that I want to add a blank column to. Below is an example of what it looks like right now. I don't know what to write out as the format if I'm trying to make it a character field and not numeric. 

 

proc sql;
alter table lib.metadata_match_test
add test char format=.;
quit;

 

Thanks!


Accepted Solutions
Solution
‎12-05-2017 12:14 PM
Super User
Super User
Posts: 9,855

Re: Adding a column to an existing table with charter format

Not the way I would do it, just add this into any other step in your process, bit of a waste having a step just to add an empty variable.  Anyway, strings are $ followed by a number refering to the length, e.g $20, means a string of length 20.

View solution in original post


All Replies
Solution
‎12-05-2017 12:14 PM
Super User
Super User
Posts: 9,855

Re: Adding a column to an existing table with charter format

Not the way I would do it, just add this into any other step in your process, bit of a waste having a step just to add an empty variable.  Anyway, strings are $ followed by a number refering to the length, e.g $20, means a string of length 20.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 116 views
  • 1 like
  • 2 in conversation