RE: SQL- Insert problem

2004-08-13 Thread Reidy, Ron
You have a NULL (not the word NULL) in your statement. FYI - You should look into using bind variables. - Ron Reidy Senior DBA Array BioPharma, Inc. -Original Message- From: Shah, Urmil [mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 10:43 AM To: [EMAIL

RE: SQL- Insert problem

2004-08-13 Thread Shah, Urmil
me know. Urmil -Original Message- From: Reidy, Ron [mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 11:57 AM To: Shah, Urmil; [EMAIL PROTECTED] Subject: RE: SQL- Insert problem You have a NULL (not the word NULL) in your statement. FYI - You should look into using bind

RE: SQL- Insert problem

2004-08-13 Thread Reidy, Ron
[mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 11:07 AM To: Reidy, Ron; [EMAIL PROTECTED] Subject: RE: SQL- Insert problem I tried to use different methods to insert but all fails. 1) $sth=$dbh-prepare(insert into OPER_QUERY values ($a,$b,$c,$d) ) $sth-execute() or die; 2) $sth=$dbh

RE: SQL- Insert problem

2004-08-13 Thread Kong, Alan
Try the mothed 2 with non-numeric fields single-quoted. -Original Message- From: Shah, Urmil [mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 1:07 PM To: Reidy, Ron; [EMAIL PROTECTED] Subject: RE: SQL- Insert problem I tried to use different methods to insert but all fails. 1

RE: SQL- Insert problem

2004-08-13 Thread Reidy, Ron
He should use bind variables (method 3). - Ron Reidy Senior DBA Array BioPharma, Inc. -Original Message- From: Kong, Alan [mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 11:13 AM To: Shah, Urmil; Reidy, Ron; [EMAIL PROTECTED] Subject: RE: SQL- Insert problem

RE: SQL- Insert problem

2004-08-13 Thread Shah, Urmil
(0x49ea08)~INNER) - DESTROY= undef during global destruction Regards, Urmil -Original Message- From: Reidy, Ron [mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 12:16 PM To: Kong, Alan; Shah, Urmil; [EMAIL PROTECTED] Subject: RE: SQL- Insert problem He should use bind variables

RE: SQL- Insert problem

2004-08-13 Thread Hardy Merrill
. However, you should still look at bind variables. - Ron Reidy Senior DBA Array BioPharma, Inc. -Original Message- From: Shah, Urmil [mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 11:07 AM To: Reidy, Ron; [EMAIL PROTECTED] Subject: RE: SQL- Insert problem I

RE: SQL- Insert problem

2004-08-13 Thread Reidy, Ron
for this). - Ron Reidy Senior DBA Array BioPharma, Inc. 303.386.1480 -Original Message- From: Shah, Urmil [mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 11:29 AM To: Reidy, Ron; Kong, Alan; [EMAIL PROTECTED] Subject: RE: SQL- Insert problem Ok I tried to use method 3 and as I said

RE: SQL- Insert problem

2004-08-13 Thread Ronald J Kimball
Hardy Merrill [mailto:[EMAIL PROTECTED] wrote: Just in case the op doesn't make the connection, he needs to test his variables for undef before the execute, and if one is undef, then put null() in it, something like this: if (!defined($a)) {$a = ;} if (!defined($b)) {$b = ;}

RE: SQL- Insert problem

2004-08-13 Thread Hardy Merrill
Ronald J Kimball [EMAIL PROTECTED] 08/13/04 01:59PM Hardy Merrill [mailto:[EMAIL PROTECTED] wrote: Just in case the op doesn't make the connection, he needs to test his variables for undef before the execute, and if one is undef, then put null() in it, something like this: if

Re: SQL- Insert problem

2004-08-13 Thread Chris Sarnowski
)~INNER) - DESTROY= undef during global destruction Regards, Urmil -Original Message- From: Reidy, Ron [mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 12:16 PM To: Kong, Alan; Shah, Urmil; [EMAIL PROTECTED] Subject: RE: SQL- Insert problem He should use bind variables (method 3

RE: SQL- Insert problem

2004-08-13 Thread Reidy, Ron
See below ... - Ron Reidy Senior DBA Array BioPharma, Inc. 303.386.1480 -Original Message- From: Shah, Urmil [mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 1:02 PM To: Reidy, Ron; Kong, Alan; [EMAIL PROTECTED] Subject: RE: SQL- Insert problem Ok Here

Re: SQL- Insert problem

2004-08-13 Thread amonotod
From: Shah, Urmil [EMAIL PROTECTED] Date: 2004/08/13 Fri PM 04:42:54 GMT Need help in trying to insert an sql statement. As everyone else has been saying, you need to use placeholders. See my script below... Note that I tested with MSSQL, but Regards, Urmil Regards, amonotod #!perl

Re: SQL- Insert problem

2004-08-13 Thread amonotod
From: amonotod [EMAIL PROTECTED] Date: 2004/08/13 Fri PM 07:29:35 GMT Note that I tested with MSSQL, but Well, yes, I did test with MSSQL, but as you can see from the DBI connection string, I also tested with Oracle 9i... :-) amonotod -- `\|||/ amonotod@|

RE: SQL- Insert problem

2004-08-13 Thread Shah, Urmil
; Kong, Alan; [EMAIL PROTECTED] Subject: RE: SQL- Insert problem See below ... - Ron Reidy Senior DBA Array BioPharma, Inc. 303.386.1480 -Original Message- From: Shah, Urmil [mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 1:02 PM To: Reidy, Ron

RE: SQL- Insert problem

2004-08-13 Thread amonotod
: SQL- Insert problem See below ... - Ron Reidy Senior DBA Array BioPharma, Inc. 303.386.1480 -Original Message- From: Shah, Urmil [mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 1:02 PM To: Reidy, Ron; Kong, Alan; [EMAIL PROTECTED] Subject: RE

RE: SQL- Insert problem

2004-08-13 Thread Reidy, Ron
See below ... - Ron Reidy Senior DBA Array BioPharma, Inc. 303.386.1480 -Original Message- From: Shah, Urmil [mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 1:49 PM To: [EMAIL PROTECTED] Subject: RE: SQL- Insert problem Here is the code if it helps. I

RE: SQL- Insert problem

2004-08-13 Thread amonotod
From: Ronald J Kimball [EMAIL PROTECTED] Date: 2004/08/13 Fri PM 05:59:39 GMT Hardy Merrill [mailto:[EMAIL PROTECTED] wrote: Just in case the op doesn't make the connection, he needs to test his variables for undef before the execute, and if one is undef, then put Why does he need

RE: SQL- Insert problem

2004-08-13 Thread Reidy, Ron
[mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 2:04 PM To: [EMAIL PROTECTED] Cc: Ronald J Kimball; 'Hardy Merrill' Subject: RE: SQL- Insert problem From: Ronald J Kimball [EMAIL PROTECTED] Date: 2004/08/13 Fri PM 05:59:39 GMT Hardy Merrill [mailto:[EMAIL PROTECTED] wrote: Just

RE: SQL- Insert problem

2004-08-13 Thread Shah, Urmil
: RE: SQL- Insert problem Correct, but he he building dynamic SQL. The resulting insert statement's values clause looks like (v1,v1,,v4...); the problem is the ,,. This is why I suggested to use bind variables. - Ron Reidy Senior DBA Array BioPharma, Inc. -Original Message