03-10-2016
paulschm
Fluorite | Level 6
Member since
03-01-2016
- 6 Posts
- 5 Likes Given
- 0 Solutions
- 0 Likes Received
-
Latest posts by paulschm
Subject Views Posted 3005 03-01-2016 09:06 AM 3025 03-01-2016 08:54 AM 4834 03-01-2016 08:49 AM 3032 03-01-2016 08:44 AM 3036 03-01-2016 08:37 AM 4844 03-01-2016 08:29 AM -
Activity Feed for paulschm
- Liked Re: PROC SQL CREATE TABLE with additional running-number-column for LinusH. 03-01-2016 09:28 AM
- Posted Re: PROC SQL CREATE TABLE with additional running-number-column on SAS Procedures. 03-01-2016 09:06 AM
- Liked Re: PROC SQL CREATE TABLE with additional running-number-column for LinusH. 03-01-2016 09:03 AM
- Posted Re: PROC SQL CREATE TABLE with additional running-number-column on SAS Procedures. 03-01-2016 08:54 AM
- Posted Re: Set all missing values as 'NA' even in columns whose format allows for one character only on SAS Data Management. 03-01-2016 08:49 AM
- Liked Re: PROC SQL CREATE TABLE with additional running-number-column for LinusH. 03-01-2016 08:49 AM
- Posted Re: PROC SQL CREATE TABLE with additional running-number-column on SAS Procedures. 03-01-2016 08:44 AM
- Liked Re: PROC SQL CREATE TABLE with additional running-number-column for LinusH. 03-01-2016 08:44 AM
- Liked Re: Set all missing values as 'NA' even in columns whose format allows for one character only for Astounding. 03-01-2016 08:40 AM
- Posted PROC SQL CREATE TABLE with additional running-number-column on SAS Procedures. 03-01-2016 08:37 AM
- Posted Set all missing values as 'NA' even in columns whose format allows for one character only on SAS Data Management. 03-01-2016 08:29 AM
-
Posts I Liked
Subject Likes Author Latest Post 1 1 1 1 1
03-01-2016
09:06 AM
I remember Uhm, sorry but I have never even heard inner and outer query. Do you mind suggesting it as an example once more?
... View more
03-01-2016
08:54 AM
Hmm, the moment I run this: PROC SQL;
CREATE TABLE want AS
SELECT DISTINCT var1, var2, var3, monotonic() as running_no
FROM have;
QUIT; the DISTINCT counts every single running number as a distinct combination of those variables and just gives back the entire dataset "have" with an added running-number-column.
... View more
03-01-2016
08:49 AM
Thanks, sounds promising! I am sorry though, I cannot follow you on everything. If I were to add a LENGTH statement, wouldn't I be changing the LENGTH of all variables? Because that would not be okay, as only those who are <2 characters long need to be changed to 2 characters. Also, what does $trouble do? Thanks
... View more
03-01-2016
08:44 AM
I just appreciate short code. But yeah, I read about that function while googling. However, I could not get it to work in terms of creating a table. Could you give an example code?
... View more
03-01-2016
08:37 AM
Hi, I am using PROC SQL to create a table with the distinct variable combinations I am interested in: PROC SQL;
CREATE TABLE want AS
SELECT DISTINCT var1, var2, var3
FROM have;
QUIT; However, I would like to add a column to that created table with a running number (and not use a subsequent data step to do so). Is there an elegant way to do that? Thanks
... View more
03-01-2016
08:29 AM
Hey there, as the title says, handling many large and heterogeneous datasets has its difficulties. When applying this: DATA &name.;
SET &name.;
ARRAY ch(*) _character_;
DO _n_ = 1 TO dim(ch);
ATTRIB ch(_n_) INFORMAT=$32. FORMAT=$32.;
ch(_n_) = coalescec(ch(_n_), 'NA'); /*replace empty cells with NA*/
ch(_n_) = tranwrd(ch(_n_), "Unknown", 'NA'); /*replace "Unknown" entries with NA*/
ch(_n_) = tranwrd(ch(_n_), '.', 'NA'); /*replace dots with NA*/
END;
RUN; I am confident that all empty cells, all "Unknown" and all dots get replaced by an "NA". However, sometimes only an "N" instead of "NA" will appear in a certain column since it is formatted to not have more than that one character. Is there a way to solve this issue elegantly? Maybe even a whole different approach? Thanks
... View more