go ahead... be a heretic | |
PerlMonks |
Re: sql and hash confusionby lostjimmy (Chaplain) |
on Mar 19, 2009 at 19:42 UTC ( [id://751848]=note: print w/replies, xml ) | Need Help?? |
If you used Data::Dumper to look at your hash, you might be able to see more easily why things were screwing up. The first key you end up with is 1/5/2009 3:55:30 PM, which has a value of "Login". That's not what you want. You want to strip off the date beforehand. I imagine that the dates are an important piece of information, so I don't think you'll want to get rid of them outright. And anyway, even if you did get rid of the dates, you'll have problems putting this into a hash. Hashes can only have one value per key, and your values repeat for each login record, so you'll just overwrite the first set of values. If this is always the format of the data, then you could do something like the following:
I haven't used Win32::ODBC, but hopefully someone else can help you out with that part. Update: And if you really need it in a hash:
In Section
Seekers of Perl Wisdom
|
|