|We don't bite newbies here... much|
Re: Re: Uniion of 2 hashes don't work.by toadi (Chaplain)
|on Jan 10, 2003 at 13:20 UTC||Need Help??|
Well I actually did it on a other way...
- I had 2 queries from a db.
- I wanted to write the results in a csv(fixed order so tie).
- But in the first query i had a key login and if this key existed in second query I wanted the data from both queries as a union on one line in the csv.(both had common fields and unique fields to the both queries)
I solved it on db-level:
- I made a new table in oracle where i put the data from query one. Then do a insert or update(to login) with second query.(first i did it with tempory tables in memory, but dumped that idea).
- Finally I read out that table and make the csv.
This solution is also good for knowing on which day what data should be in that csv. If something went wrong with creating the csv and/or sending it to the outside party. I easily can redo this step, because of this table.
For the ones who would be interested hacked a small sample, how i could do it on perl-level:
So if the key exits, it will write over the needed values. If key not exits it wil make a new entry...
My opinions may have changed,
but not the fact that I am right