06-29-2011 05:48 PM
I am a fairly new user to SAS and have discovered some issues I can't get my head around. I am working with a huge transactional data set.
I first created a data set that included a hashed customer identifier along with a new purchase column that was sorted in descending order. I became curious with the observation that came to the top of this list. So, I was interested in revealing the rest of the variables from the original data set that went along with this top customer's purchases (SKUs, date/time of purchase, etc).
Here's an example of what I entered (I'm just looking for the first entry for now since this is a huge data set and takes a long time to run.)
proc sql inobs=1;
where <identifier> like "3B342DC8";
The result every time is not an error code but a blank results page.
The hashed customer identifier is of type hexadecimal and I'm wondering if that's what's causing my problems. I have also tried the contains statement as well as % and _ to solve this issue and find out if there are any wild cards that I can't see. No luck.
06-29-2011 06:21 PM
Have you tried = and check the length of the character variable in your customer identifier and actual table. Your actual variable in the dataset could have trailing spaces perhaps?
Could you explain how you created your hash identifier as well and how it maps to the old dataset?
06-29-2011 11:52 PM
Thank you Reeza and data_null_:!
Reeza - I forgot to mention that I had tried = first and checked the length of the customer identifier in the actual table, and concluded there were no trailing spaces in my first post. I also wouldn't have been able to explain how the identifier was hashed because someone else had done it before me and sent it to me that way.
Data_null_: - I knew I was missing something small and somewhat obvious but I could not find the answer to why this was happening anywhere, and it was the x following the quoted string.
Thanks again to you both for quick replies to my vague post.
Need further help from the community? Please ask a new question.