Page 1 of 1

Hash File Sort

Posted: Mon Nov 27, 2006 9:14 pm
by SPA_BI
Hi,

I have noticed records are not stored in a sorted order in a hash file.

Is it possible to have the records sorted... or at least maintain ordering inside the hash file?

thanks,

SPA_BI

Posted: Mon Nov 27, 2006 10:41 pm
by narasimha
Here is a nice link

I guess you have to post this in the server forum :roll:

hi

Posted: Mon Nov 27, 2006 11:29 pm
by rachitha
Hi

We cannot do any sort operation in hash files only way is to use sort stage.If your src in ODBC stage then add ORDER by in your query.But you can apply any filter conditions in Hash file Stage: output->selection "here you can specify filter condition".

Thanks,
Rachitha.

Posted: Tue Nov 28, 2006 2:53 am
by ray.wurlod
It is not possible to prescribe storage order in a hashed file, for exactly the same reasons it is not possible to do so in a database table. The database controls where records are stored. In the case of hashed files, it's the hashing algorithm.

You can sort upon retrieval either by retreiving with an ORDER BY clause in a UniVerse stage, or with a BY clause in a Hashed File stage (on the Selection tab).

Of course, hashed files are principally used for key-based lookups, so the issue of sorting is moot.