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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax problem - please help

Status
Not open for further replies.

SkyHigh

Technical User
May 30, 2002
309
0
0
CA
Hi Folks

There is something wrong in the 2nd last line because of which the insert statement is not coming out right, can someone please help me
Thanks

my $SQL_Insert ="INSERT INTO summary VALUES ('" .
$LastDayOfMonth . "', " .
$summrow{'id'} . ',' .
$summrow{'alimit'} . ',' .
$summrow{'mlimit'} . ',' .
$summrow{'threshold'} . ',' .
"NEXTVAL('_seq_summary_'),' .
$summrow{'ttsls'})";
 
This is how it shows up in the error logs of the database if it helps you guys to help me
Thanks


,NEXTVAL('_seq_monthly_invoice_no_'),' .
0)
From backend> E
From backend> "ERROR: parser: unterminated quoted string at or near "' .
0)" at character 168
 
I'm really not sure, but maybe change the last to lines to this?

"NEXTVAL('_seq_summary_')".','.
$summrow{'ttsls'});
 
The line is expecting your NEXTVAL var to be fully quoted as in the code sent by chazoid. Your original code quotes the NEXTVAL var and the last var together.

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top