Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Just another Perl shrine
 
PerlMonks  

Re: Optimization/Efficiency Question

by techy (Scribe)
on Sep 13, 2003 at 09:30 UTC ( [id://291246]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Optimization/Efficiency Question

Grygonos,

I'm not sure with access, but with MySQL I would try something like (extremely untested):

my $updh = $dbh->prepare(q{ INSERT INTO report_printing_table (1,2,3,4,5,6,7,8,9,10,11,12,13) SELECT AuditID, Referrals.1, Referrals.2, Referrals.3, Referrals.4, Referrals.5, Referrals.6, Referrals.7, Referrals.8, Referrals.9, Referrals.10, Referrals.11, Referrals.12, FROM Referrals INNER JOIN States On (Referrals.10 = States.1) WHERE AuditID = ? }); foreach my $audit (keys(%$audits)) { $updh->execute($audit); } $updh->finish;

Looks like Access does support INSERTing based on SELECT, but thats just based off a quick google, not experience. Also, why are you selecting more columns than you insert? Or is the results of the select also needed somewhere below the snippet that was posted?

Thanks,

techy

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://291246]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.