in reply to Re: Multidimentional array help
in thread Multidimentional array help
my @dlrloc_array = qw(A100 A200 A300 A400 A500 A600 A700 A800); my $dlrgrp_name = 'RUSH'; my $dlrdiv = 'PB'; my $dlrcountry = 'USA'; my $runDOW = 'WEDNESDAY'; my $daysofsupply = 45; my $ordertype = 'SEASONAL'; my $plannercode = 'M63'; my $size = @dlrloc_array; if ( $size > 0 ) { my $table = 'pac.promo_rpt'; my @fields = qw( dlrcode dlrgroup division country planner ordertype daysofsupply run_dow sof_or_excel abc_co +des ); my $fields = join(', ', @fields); my $places = join(', ', ('?') x @fields); my $sql = "INSERT into $table ($fields) values ($places)"; for my $a_val ( @dlrloc_array ) { $sth->execute( $a_val, $ordtype ); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Multidimentional array help
by punkish (Priest) on Jun 01, 2007 at 03:39 UTC |