실무에서 데이터를 다루다 보면 필연적으로 결측 데이터를 만나게 됩니다. 핑계 없는 무덤이 없다는 속담이 있듯, 데이터가 결측인 이유도 정말 다양합니다. 특별한 경우에만 값이 있는 경우, 서버 장애로 관측되지 않은 경우, 응답자가 응답을 거부하는 경우, 데이터 구조가 바뀌면서 새로운 컬럼이 추가된 경우 등등 너무 다양하죠? 오늘 포스팅에서는 이와 같은 결측치를 처리하는
Tag: SQL
SAS expert Leonid Batkhan presents the %embed macro function as a way to embed both “foreign” and SAS native code from a file into a SAS program, preventing clutter in your code.
SAS SQL handles missing values differently than the ANSI standard for SQL. PROC SQL follows the SAS convention for handling missing values: numerical missing values are always interpreted as less or smaller than all nonmissing values. My first blog showed that missing values can be troublemakers in non-grouped descriptive statistics.
SQL (Structured Query Language) is the most widely used programming language for relational databases worldwide. No other programming language produces more hits for a web search than SQL and interest is growing rapidly. In June 2010, Google showed 135 million hits versus 586 million hits in June 2020. SQL is
SQL is an important language for any programmer working with data. In SAS Cloud Analytic Services (CAS) you can execute SQL queries using the fedSQL.execDirect CAS action! Welcome back to my SAS Users blog series CAS Action! - a series on fundamentals. I've broken the series into logical, consumable parts.
The term "fuzzy matching" describes a method of comparing two strings that might have slight differences, such as misspelling or a middle initial in a name included or not included. One of my favorite functions to compare the "closeness" of two strings is the SPEDIS (spelling distance) function. Have you
In honor of Valentine’s day, we thought it would be fitting to present an excerpt from a paper about the LIKE operator because when you like something a lot, it may lead to love! If you want more, you can read the full paper “Like, Learn to Love SAS® Like”
One great thing about being a SAS programmer is that you never run out of new things to learn. SAS often gives us a variety of methods to produce the same result. One good example of this is the DATA step and PROC SQL, both of which manipulate data. The
With the release of SAS Viya 3.3, you now have the ability to pass implicit SQL queries to a variety of SQL data sources, including Hive. Here's what happens as users write SAS compliant SQL code.
Stellen Sie sich vor, Sie sind frühmorgens mit dem Auto „ab in den Urlaub“ gefahren. Durch vorausschauende Routenplanung sind Sie den größten Staurisiken glücklich ausgewichen und nähern sich bei geschätzten 38°C der letzten Landesgrenze vor Ihrem Urlaubsziel. Die ganze Familie sitzt mit ausgelassener Stimmung im vollgepackten Auto. Die Kinder auf
IT folks love SQL (Standard Query Language). Once you know how to program in SQL, you can work with almost any database because it is a standard. However, SQL is NOT a standard for doing analytics. The SAS programming language pre-dates SQL and even though SAS does SQL, SQL does not
Wow did the summer fly by! Now that grad school is over, it’s about time to resume the “it’s all about the data” series. In the last several posts, I tried to lay a foundation for understanding how SAS stores and manages data for use in business intelligence and analytic
Many SAS Enterprise Guide users practically live in the Query Builder. For those who understand their data tables, the Query Builder provides a tremendous amount of flexibility to pull and manipulate data. The Query Builder produces SQL programs behind the scenes, which translates well for database-centric work. Sometimes a complex
To optimize a Structured Query Language (SQL), the database professional must befriend this order and perhaps even embrace it. Who is your best friend? I’m talking about the order in which SQL processes your statements. Simply put, in what order does SQL do your work? (From my previous post you
Last week I attended a meeting of the Toronto Area SAS Society. (Okay, I didn't just attend; I was a presenter as well.) This user group meeting contained a feature that I had never seen before: "Solutions to the Posed Problem". Weeks before the meeting, an "open problem" was posted
The project that I'm currently working on requires several input data tables, and those tables must have a specific schema. That is, each input table must contain columns of a specific name, type, and length in order for the rest of the system to function correctly. The schema requirements aren't
Earlier this week I described a common programming pattern in the SAS macro language. The pattern sets up a loop for processing each distinct value of a classification variable. The program uses the PROC SQL SELECT INTO feature to populate SAS macro variables. The effect: you can roll your own
This is the fifth post in the SASonality series. In this week’s post, I’ve interviewed Rick Langston, a man most SAS users have met or read about. He’s been with SAS for 30 years and attended nearly every SUGI/SAS Global Forum. In the photo at the right, Rick is the
I saw a suggestion arrive from a SAS customer who would like to see the IN operator extended to allow ranges of date values. For example, you can currently write a program that checks for values IN a collection or range of numbers: data check; if x in (1:10) then
Does your SAS code lack energy? Are your macros not 'mending'? Is your data out of sorts? Not to fear, because here at SAS Global Forum, we have emergency treatment for your SAS code. The new Code Doctors section allows you to bring your problematic SAS programs to a SAS