RE: SQL table updates

2002-10-31 Thread Imtiaz ahmad
statement 'UPDATE cardlock SET TrkID=$TrkID, FuelCmp=$FuelCmp WHERE FuelCrd = $FuelCrd'; Otherwise, use the INSERT statement you have. - Original Message - From: "Scott Taylor" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 31, 2002 9:34 P

Re: SQL table updates

2002-10-31 Thread LRMK
use this querry 'update tablename set fieldname1=newvalue1,fieldname2=newvalue2 where somefield=something' - Original Message - From: "Scott Taylor" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 31, 2002 9:34 PM Subject:

Re: SQL table updates

2002-10-31 Thread Scott Taylor
At 08:06 AM 10/31/02, you wrote: One way. ? Of the 3 fields which is unique field..I'll assume FuelCrd.. after ..print "$FuelCrd, $TrkID, $FuelCmp\n"; .insert this my ($check) = $dbh->selectrow_array ("SELECT fuelCrd FROM cardlock WHERE fuelCrd = ?", undef,$F

SQL table updates

2002-10-31 Thread Scott Taylor
Hello all, Can anyone tell me how to make this code work, so that, if the record already exists, just update the values instead of creating a new record? open(InFile, "fuelcrd") || die "Can not open file: $!\n"; while(){ chomp; my ($FuelCrd, $TrkID, $FuelCmp) = split(/,/,$_);