I full joined 2 tables first and then full joined a 3rd table, now I got 1000 more rows in the result. But when I added a where statement following the join process I can only get 200 more rows and it seems that some expected rows were filtered. I don’t know what I’ve done wrong. Answer Your where clause
Tag: sas
Problems with reserved field name ‘user’ in SAS Proc SQL
How do I select the user column from my table and not select the surprise ‘feature’ SAS added to their SQL syntax: Result: Bonus, the field name in the result table (if you create one) gets a temporary name… ie. something like _TEM001. Answer Use the name literal syntax, ‘<name>’n Name literals in other systems, such as in pass through:
SAS proc sql – is this the correct usage?
This works but wanted a health check as to if i have done this correct with proc sql connect to i.e do i need to have separate “select * from connection to’s”? Thanks Answer Since you are pulling from the same database just push the join into the database. While you are at it assign names to the variables when
SAS IOM Data Provider – Access Denied – SSIS connection [closed]
I’m looking for guidance into how to integrate with the SAS IOM Data Provider through SSIS. It works fine when using SAS software but when trying to connect using the SAS IOM Data Provider in SSIS I …
Convert day of year to date using proc sql in SAS
I have a day of year column and need to convert it to a date.I want to find the exact date that the insurance coverage began for every person. I also have a year column Have data: Want data: I searched up and find that the following command works in Oracle sql but does not work in SAS sql I
How to use prxmatch or alternative for below string in sas
I have multiple rows of strings I want remove and create new column with 25% and 20% and so on… From above string. How can I do that in SAS? The new column should flow 25% i.e percentage. So on…. Answer A single percentage value (or none) can be retrieved from a string using a pattern with a grouping expression
Creating Alias and setting Data Type to the newly created column withouth having to relist the alias again
USING SAS EG 7.13 I have a table where I’m creating a few alias columns that are compiled from concatenated strings gathered from other fields. I’M having trouble assigning the aliased columns a data …
SAS proc SQL: Extract number in front of the word ‘Month’ or ‘Months’
I want to extract a number from a string where it is directly followed by the word ‘Month’ or ‘Months’. The search should be case insensitive and the text to look in typically looks like No …
Defining number of decimals in teradata column during Select statement
In teradata proc sql in SAS Enterprise guide environment, I am trying to create a column by multiplying two fields, but I have been having overflow issue. How do I specify the number of decimals in …
how to pick the column with the highest value
I have a table with different possibilities of marital status (columns), how do I pick up the one with the highest value and keep the column name? For example, below is my original data set: data …