DATA Step, Macro, Functions and more

Hash Multiple Keys and Different Names

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 15
Accepted Solution

Hash Multiple Keys and Different Names

So I know that if I want to have multiple keys in a hash table I do the following:

     hh.DefineKey('Key1', 'Key2');

I also know that if my key in the dataset I'm matching the hash table to has a different name for the key I do the following:

     hh.find(Key: DiffName);

What I'm wondering is if you can combine the two?  Can you have a multiple key lookup and the names in the dataset you are matching to be different for both keys?

Thanks!

Jonathan


Accepted Solutions
Solution
‎09-21-2012 02:38 AM
Super User
Posts: 9,671

Re: Hash Multiple Keys and Different Names

NO. But you can use Hiter object to achieve this, but it is low efficient .

View solution in original post


All Replies
Solution
‎09-21-2012 02:38 AM
Super User
Posts: 9,671

Re: Hash Multiple Keys and Different Names

NO. But you can use Hiter object to achieve this, but it is low efficient .

Respected Advisor
Posts: 3,124

Re: Hash Multiple Keys and Different Names

Yes, if you mean something like:  hh.find(Key: DiffName1, key:diffname2); Try it out, you will see.

Haikuo

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 598 views
  • 0 likes
  • 3 in conversation