Good day. Please tell me how to correctly make a request to the database. There is a script:
my $dbqueryAllData = $db->prepare("select * ,sum(f6),sum(f7),sum(f8),sum(f9),sum(f10),sum(f11),sum(f12),sum(f13),sum(replace((f14),'+-','-')) from DPTDAT where f1 in (?,?,?,?...40000-120000штук...?,?,?,?) group by f1 order by f1"); $dbqueryAllData->execute(@rowPRODGRPs); How to make a request correctly, so as not to write a huge number of characters "?" Make queries in a cycle of several pieces? Or is there a way to fit all in one request?
Thanks to the comments @Mike The solution was found, where the meringue request is usual.
select * ,sum(f3),sum(f3),sum(f4),sum(f5),sum(f6),sum(f7),sum(f8),sum(replace((f9),'+-','-')) from PLSDAT group by f1 order by f1;
?how many records in the table are and how many of them are processed by the program at a time - Mike?accordingly, the query will return everything grouped and sorted. And if these numbers were originally taken from the same database, then it is worth thinking about combining the query that originally received them with this, into one single SQL query - Mike