calvinsinger
Programmer
Hi,
I would appreciate some help on this.
Problem: Is there fast way I can take the output of a select statement (from several tables) and directly turn it into a Perl Hash ? I want to be able to define the format of the Hash, it cannot be just any simple hash, but a Nested Perl Hash.
I know one can use DBI and get some hash directly, but I also read that it is not recommended if good performance is desired. I also do not if I choose the Hash Format I desire.
I was wondering if the following method is possible. First I produce the desired XML using SQL Server Select Statement with FOR XML EXPLICIT. Execute a stored procedure, (from within Perl) containing this SQL statement using Perl DBI. Then I somehow transfer this XML to Perl (I do not know how to do that though). Next I use perl's XML::Simple Module to turn the XML into a Perl Hash. Thus I get a Perl Hash of my choosen format. If this method will be any faster, I am not sure. I Also would prefer not to have to first create an XML file and then make Perl read the XML file.
Thank you.
Calvin
I would appreciate some help on this.
Problem: Is there fast way I can take the output of a select statement (from several tables) and directly turn it into a Perl Hash ? I want to be able to define the format of the Hash, it cannot be just any simple hash, but a Nested Perl Hash.
I know one can use DBI and get some hash directly, but I also read that it is not recommended if good performance is desired. I also do not if I choose the Hash Format I desire.
I was wondering if the following method is possible. First I produce the desired XML using SQL Server Select Statement with FOR XML EXPLICIT. Execute a stored procedure, (from within Perl) containing this SQL statement using Perl DBI. Then I somehow transfer this XML to Perl (I do not know how to do that though). Next I use perl's XML::Simple Module to turn the XML into a Perl Hash. Thus I get a Perl Hash of my choosen format. If this method will be any faster, I am not sure. I Also would prefer not to have to first create an XML file and then make Perl read the XML file.
Thank you.
Calvin