Is it possible from sql to use SAS as an object? And if so how?
I was recently tasked with Data Profiling and sitting next to me is a SAS developer, who just has to run a couple of functions, to do what has taken me days (and I haven't finished!). If I could call out to SAS and run the SAS functions it would be great. I have looked on the net and can see SAS calling out to SQL but not the other way round. Technically I'm probably not up to this but I don't want this to hold me back... so any help would be great.
I'm going to leave the communication to SAS from SQL for now, but I had a look at another thread 'Cursor or temp table' which seemed appropriate, I'm well aware coming from Foxpro to SQL I have a lot to learn.
I was tasked with data profiling on our warehouse and so set to writing some generic functions to gather some basic statistics on the dml layer. (Looked at what SAS could provide and it was just over the top)
1. How many nulls
2. Frequency on values
3. Min & Max values
I gathered the database info from information_schema, added an extra column to tag the tables and columns I was interested in and then used this to run the MAX(), MIN() and COUNT(*) functions and then stored the results to a table.
My questions are: I'm I missing something, could I have done this without a cursor? 2) Would it have been faster and better to create a temp table and then skipped thru that? 3) I couldn't have done all this in a select could I?