SAS deals with translating things for you but it can be confusing. Among the many things that occur is data type conversion: SAS only has two (and only two) data types, numeric and character.
Writing sas code code#
SAS does this using a concept called "implict pass-through", which just means that SAS does the translation from SAS code into DBMS code. The idea is to try and relieve you (the user) from all the database specific details.
Writing sas code software#
The most critical thing to understand when using SAS to access data in Teradata (or any other external database for that matter) is that the SAS software prepares SQL and submits it to the database. I guess I'm just surprised the second query takes so long to process. I'm open to any thoughts or suggestions and please let me know if I can offer more detail.
![writing sas code writing sas code](https://i.ytimg.com/vi/V25tK30qunc/maxresdefault.jpg)
Writing sas code how to#
I'm not overly familiar with SAS so I'm looking for any advice on how to do this more efficiently or speed things up. Then I would look at every purchase for all customers who ordered pizza. For example, I could flag every customer who orders a pizza. The second looks at all activity, regardless of what's in 'someValue'. The difference is that the first query flags 'someValue'.
![writing sas code writing sas code](https://sasexamplecode.com/wp-content/uploads/2020/11/DROP_COLON_FINAL.png)
I'm wanting to sum values over time for the ID's: proc sql įor whatever reason, this takes a really long time. Next, I want to query this set of ID's against the big table, and problems ensue. This works in a matter of seconds and returns 90k ID's. Then, I use this subset to query the larger table again: proc sql For example, I query a large table (with tens of millions of records) for a small subset of ID's. My basic problem is writing efficient SQL queries in this environment. I don't have permissions to modify the underlying data, which is stored in 'Teradata'. I'm using SAS Enterprise Guide to write some programs/data queries. If I'm understanding correctly, it may be more efficient to make sure that all of my code is completely passed through rather than cross-loading.Īfter posting a question yesterday, a member suggested I might benefit from asking a separate question on performance that was more specific to my situation.
![writing sas code writing sas code](http://1.bp.blogspot.com/-XeKxQcNl7hc/UZv3xqMgKjI/AAAAAAAAAGs/OCnySliWFbg/s1600/logistic+NRRIDG+stepwise.png)