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
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
[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
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
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
(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
.
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
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
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 = ;}
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
)~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
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
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
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@|
; 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
: 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
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
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
[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
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
20 matches
Mail list logo