Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help please --- triming zero on text field 1

Status
Not open for further replies.

lmcate2

IS-IT--Management
Aug 28, 2001
49
US
I am new to Perl. I have an Access DB that has a text field called AgencyID and when I use the insert command it trims the 00 and I need to have the leading zero to the left. Like 00343478 not 343478

$db2->Sql("Insert Into TempAgencyOpenClosedPortal (TransRecordID, CCRANumber, AgencyName, InventorySourceName, NumberOfNights, SellRate, PaymentCheckAmount, AgencyID)
Values ($TransRecordID, '$CCRAAgencyID', '$AgencyName', '$InventoryName', $Nights, $SellRate, $PaymentCheckAmount, $AgencyID)");
 
Silly question, but have you tried putting apostrophes around "$AgencyID"? Like thi:

Code:
$db2->Sql("Insert Into TempAgencyOpenClosedPortal (TransRecordID, CCRANumber, AgencyName, InventorySourceName, NumberOfNights, SellRate, PaymentCheckAmount, AgencyID)
                Values ($TransRecordID, '$CCRAAgencyID', '$AgencyName', '$InventoryName', $Nights, $SellRate, $PaymentCheckAmount, [red]'[/red]$AgencyID[red]'[/red])");

Trojan
 
thanks, again.. I told you I am new to PERL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top