Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
70 views

This might be related to this question, but in my current SAS Viya Stable 2024.12 environment I encounter an empty Error Message and the SAS Studio session context breaks, while trying to do a SELECT ...
DOver's user avatar
  • 1
0 votes
1 answer
106 views

What I encountered I'm programming with Flows in SAS Studio in the ViyaCloud. While trying to load large Tables from a PostgreSQL Database I encountered the following error combination: Two Error Pop-...
DOver's user avatar
  • 1
0 votes
0 answers
50 views

I would like to calculate distances from each point to every other point in Python and I want to do it with a loop. I have a solution with proc sql and I tried it with Python but I got different ...
Kristián Óvári's user avatar
0 votes
2 answers
163 views

I have recently discovered the cool SQL Server group by cube function that summarize the result without a lot of coding. Does SAS have the same without appending a lot of proc summaries. Sample code:...
Lizelle Van Der Walt's user avatar
0 votes
1 answer
56 views

The macro below (the into :&count is causing issues). Although it doesn't show an error, later when I call salescount, it's clear the macro was not assigned properly "Apparent symbolic ...
Jont's user avatar
  • 37
0 votes
3 answers
139 views

I have to do a condition in SAS Guide if the SYSERRORTEXT is blank or not, but the code that I created is giving me only the value 0, indicating that the code is not good, even I received the e-mail. ...
fercs89's user avatar
0 votes
1 answer
97 views

I'm trying to run a proc sql macro that contains multiple conditions strung together. Is there a way to correct the code below for the 2nd macro (rn_cnt) or is there a better approach? Background: ...
Jont's user avatar
  • 37
0 votes
2 answers
93 views

I am working on a yearly table for claim cases. the goal is for each existing claim, there should be one row at the end of each year to reflect the situation of that claim case.for example claimA has ...
Zhengxi Jiang's user avatar
0 votes
1 answer
115 views

I need to join on ~today (or an arbitrary date in the past for checking) to a large lake based table using SAS/proc sql. I'm struggling because the lake table uses hardcoded text columns for dates. I ...
Simon Butler's user avatar
0 votes
1 answer
25 views

I am trying to make this code work but for some reason it gives me a lot of duplicates. Table1 has 75k records and I would like to get data from Table2 against each row. Please help me: proc sql; ...
siddop3's user avatar
0 votes
1 answer
161 views

I am trying to merge two tables with below code: proc sql; create table test as select a.*, b.* from aaa a left join bbb b on a.id=b.id and a.date1<=b.date2; quit; But the output shows blanks in ...
siddop3's user avatar
0 votes
2 answers
388 views

I have a SAS table sastable that I'm joining with a column from a SQL database to create a new table. However, I need to filter the sql.data with a date column from sastable. sastable.date is already ...
Groverside's user avatar
-1 votes
1 answer
137 views

Can you write a code in Proc SQL in SAS where we have to add a new column named StudentName to Student table which can be blank Can you provide a example scenario Like what are the steps to do that ...
user's user avatar
  • 1
-1 votes
1 answer
674 views

I have standard sql code which I need to use in SAS Proc SQL, however that code contains a lot of iterations of windowing functions like Over Partition By. I wanted to know if SAS allow that if not ...
LondonUK's user avatar
  • 517
-1 votes
1 answer
46 views

Why are these two queries not giving the same result? PROC SQL; CREATE TABLE NAME_MATCHING AS SELECT t1.\* FROM WORK.table1 t1 WHERE t1.names contains name1 OR t1.names contains name2 OR t1....
Afonso Garcia's user avatar
0 votes
1 answer
95 views

Given a script below, for each team, the top earner for players that have at least 30 assists; proc sql; create table basketball_summary as select team, salary, first(case when nAssts >= 30 then ...
Macosso's user avatar
  • 1,511
1 vote
1 answer
63 views

I have the following dataset Id com typ cust bu tar item item_sufx part line dtn_cd 10 ARF 3 2585 12 100 4587 800 1 1 1 10 ARF 3 2585 12 100 4587 800 1 2 1 10 ARF 3 2585 12 100 4587 800 1 3 2 22 XYZ 3 ...
Rogue258's user avatar
  • 135
0 votes
1 answer
259 views

I want to create a three indicators for a variable. I have a dataset that looks like this:- ID Group Color 1763 A Red 1763 A Yellow 6372 B Red 0498 A Red I want to ...
B K's user avatar
  • 59
0 votes
1 answer
101 views

I have 4 tables; PREFIX, FORENAME, MIDDLENAME, SURNAME. With an common column "row_num". I am taking the fuzzy matched scores out of each table, name PFX_SCR etc... This is my current code: ...
sassane's user avatar
  • 55
0 votes
1 answer
101 views

I have the following dataset Id com typ cust bu tar item item_sufx part line dtn_cd geo_con sign 10 ARF 3 2585 12 100 4587 800 1 1 1 ZL-UK-23 + 10 ARF 3 2585 12 100 4587 800 1 2 1 ZL-US-22 - 10 ARF 3 ...
Rogue258's user avatar
  • 135
0 votes
2 answers
196 views

I need to write code that performs the same action over and over, but using a different macro variable name each time. I've done this before, but can't quite remember the syntax. Summary: I need to ...
D Baldwin's user avatar
0 votes
1 answer
104 views

I have this table: data MyTable; input Household age gender $ flag; datalines; 1 45 male married 1 35 female married 2 50 female married 2 52 male married 3 32 male child 3 50 male married 3 ...
Kristián Óvári's user avatar
0 votes
1 answer
366 views

I have a table with the following type of data FISCAL_YEAR MTH Month_Name FY2018 6 JUN FY2017 5 MAY FY2022 10 OCT I want to get current fiscal year (i.e. FY2023 for this instance but FY2024 next year) ...
Rogue258's user avatar
  • 135
1 vote
2 answers
527 views

I am working with catx function in sas enterprise guide. When I want to concatenate 2 columns I am using catx('-',column1,column2) It works fine but when both column1 and column2 are null it still ...
sra's user avatar
  • 167
0 votes
1 answer
84 views

I have a dataset with two name variables. I want to compare both names, but excluding the last word from them before the comparison. This is because sometimes married people change their last names. ...
LuizZ's user avatar
  • 1,042

1
2 3 4 5
17