Re: Another simple DBI question: INSERT a NULL (MSODBC)?

2004-05-06 Thread Jenda Krynicky
From: "McMahon, Chris" <[EMAIL PROTECTED]> > Hello again... > I'm getting the hang of this, but now: > > $sql = qq{INSERT INTO table VALUES ($port,333,,,0); While you could use $sql = qq{INSERT INTO table VALUES ($port,333,NULL,NULL,0); you should not do it this way. First thing ... y

Re: SOLVED. RE: Another simple DBI question: INSERT a NULL (MSODBC)?

2004-05-06 Thread Dani Pardo
On Wed, 5 May 2004, McMahon, Chris wrote: > > Actually needs the text "NULL". "undef" doesn't work. Apologies-- I > hope somebody else needs this information someday. > > $sql = qq{INSERT INTO table VALUES ($port,333,,,0); $sth = Hi Chris, better/easier use this: $SQL="INSERT INTO table(fiel

SOLVED. RE: Another simple DBI question: INSERT a NULL (MSODBC)?

2004-05-06 Thread McMahon, Chris
Actually needs the text "NULL". "undef" doesn't work. Apologies-- I hope somebody else needs this information someday. -Chris -Original Message- From: McMahon, Chris Sent: Wednesday, May 05, 2004 2:23 PM To: [EMAIL PROTECTED] Subject: Another simp

Another simple DBI question: INSERT a NULL (MSODBC)?

2004-05-06 Thread McMahon, Chris
Hello again... I'm getting the hang of this, but now: $sql = qq{INSERT INTO table VALUES ($port,333,,,0); $sth = $dbh->prepare($sql) or die "Could not prepare $sql\n"; $sth->execute() or die "Could not execute $sql\n"; ...fails with "Incorrect syntax near ','" error, b

RE: Simple DBI question

2004-05-05 Thread Bob Showalter
McMahon, Chris wrote: > Can anyone suggest DBI syntax to capture the result of > > SELECT DISTINCT column1 FROM table WHERE column2= -1 > > into an array? Just a hint would help... my @results = $dbh->selectcol_array('select ...'); -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Simple DBI question

2004-05-05 Thread Ashish Srivastava
Hi Chris, Try this: #!/usr/bin/perl # Purpose: Perl script for testing Oracle Database Connection # First setenvironmental variable BEGIN { # Comment ORACLE_HOME variable if running on window $ENV{ORACLE_HOME} = '/usr/orasys/8.1.7'; $ENV{TWO_TASK}= 'mydbname'; } use strict;

RE: Simple DBI question

2004-05-05 Thread B. Fongo
nt: Wednesday, May 05, 2004 12:46 AM ||> To: [EMAIL PROTECTED] ||> Subject: Simple DBI question ||> ||> ||> Hello... ||> My first DBI script was simply an inventory of columns in ||> tables. ||> Now I'm struggling with my second DBI script, and finding the ||>

Simple DBI question

2004-05-05 Thread McMahon, Chris
Hello... My first DBI script was simply an inventory of columns in tables. Now I'm struggling with my second DBI script, and finding the CPAN docs tough going. Can anyone suggest DBI syntax to capture the result of SELECT DISTINCT column1 FROM table WHERE column2= -1