RE: Reading hash arrays in the order it was written

2008-11-19 Thread Brian Raven
Fish, David wrote: Hello! The problem I am having is I am pulling data from a table in a certain order and loading it into the hash array but when I read the hash array it comes out in a different order than it is written. What I have done as a work around, is the read the data from a file

RE: Reading hash arrays in the order it was written

2008-11-19 Thread Steve Howard (PFE)
Not inherent in the hash. You could store the ordinal value as one of the values in a hash of arrays, and then sort on that when you retrieve the values, but there is really no way to guarantee the order in which it will be retrieved from the hash is the same order in which it was inserted. To

Re: Reading hash arrays in the order it was written

2008-11-19 Thread p sena
Hi, I think the key's of the midtlinfo hash are not seen/get in the order you have populated it before, if iam not wrong. If so then a customized compare func could applied (on same terms when ordering by certain columns from tbl was done) while reading from the hash. Cheers/ --- On Wed,

Re: Reading hash arrays in the order it was written

2008-11-19 Thread Foo JH
Fish, David wrote: Hello! The problem I am having is I am pulling data from a table in a certain order and loading it into the hash array but when I read the hash array it comes out in a different order than it is written. What I have done as a work around, is the read the data from a file