Skip to content
Advertisement

Tag: sas

How do I find the 4th record in SQL/ SAS PROC SQL?

Initially I tried including a sample SAS Table here but I can’t get the script to line break where it should – Appreciate if you can let me know how to manually insert the line break when typing in the text editor, thanks My question: For SAS PROC SQL – How can I return the 4th highest record (that is,

select a numeric column as string

Is it possible to select a numeric column as string with proc sql in sas ? for exemple i have this table (table_1): id_1, id_2 and id_3 can be numeric or string. i want to create a table (table_2) where these three columns should have string as type I wrote this code : But it doesn’t works Answer The best

Convert SAS proc sql to Python(pandas)

I rewrite some code from SAS to Python using Pandas library. I’ve got such code, and I have no idea what should I do with it? Can you help me, beacase its too complicated for me to do it correct. I’ve changed the name of columns (for encrypt sensitive data) This is SAS code: This is my try in Pandas:

Join Multiple Table based on a condition

I have data where i need to join to different tables based on a condition, month. I am using proc sql. Currently I am using However, this is not working. Any help greatly appreciated. Answer You could do this in a single query, using conditional joins: Note that you should not have several tables to store the same data over

How do I do NOT CONTAINS?

I’m having difficulties with a question on an assignment and writing the correct query. I’ve been at it for days, and it’s due soon. I’m trying to show all project numbers that do not contain employee id’s of 114 and 113 (the application designers). Looking at the table data, I can see without writing code that the project numbers are

Wrong data type notification between in operator in SAS

When I run the following code in SAS, I was told that the data type between ‘not in’ were different and can’t procede to run. But I’ve already used ‘input’ to convert the data type, so I don’t know what’s going wrong. NOTE: DAT and EGDAT are not from the same table and have different original data type. Answer Either

Advertisement