Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: how to add a date when inserting data?

Re: how to add a date when inserting data?

From: Jerry Preston <g-preston1_at_ti.com>
Date: Sun, 9 Mar 2003 19:32:42 -0600
Message-ID: <b4gpvr$fv5$1@tilde.itg.ti.com>


Thanks for the ideas, but I still get execution failed, missing comma.

Jerry

"Anurag Varma" <avdbi_at_hotmail.com> wrote in message news:FVPaa.79161$gf7.17666818_at_news4.srv.hcvlny.cv.net...
> In perl the $varname within single quotes is not resolved.
> You are using bind variables in most .. why not in the date column also?
> my $sqll="insert into twroot.EE_SPARES_SHOP ( STATUS, SITE,
> CUSTOMER_CONTACT, CUSTOMER_E_MAIL,
> TTC_REPRESENTITIVE,
> SYSTEM_TYPE, SYSTEM_NAME, TEST_HEAD,
> SYSTEM_SERIAL_NUMBER,
> PART_NUMBER, PART_TYPE, PART_DESCRIPTION,
> BOARD_SERIAL_NUMBER,
> QTY, FAILURE, TUI_REV, CAL_DIAGS_REV,
> DIAG_THAT_FAILED,
> RESULTS_FILE, RMA_NUMBER, WEB, DATE_RECEIVED
> )
> values( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?,
> ?, ?, ?, ?, to_date( ?, 'MM/DD/YY' )";
> $sth = $dbh->prepare( $sqll );
> die $dbh->errstr if $dbh->err;
> $rv = $sth->execute( $Status, $Site, $Customer_Contact,
> $Customer_e_mail, $TTC_Representitive, $System_Type,
> $System_Name, $test_head,
> $System_Serial_Number,
> $Part_Number, $Part_Type, $Part_Description,
> $Board_Serial_Number, $Qty, $Failure,
> $TUI_Rev,
> $Cal_Diags_Rev, $Diag_that_Failed,
> $Results_File, $RMA_NUMBER,
$YES,$date_received
> ) ||

>

> Anurag
>

> "Jim Kennedy" <kennedy-downwithspammersfamily_at_attbi.com> wrote in message
> news:8JKaa.21855$eG2.3859_at_sccrnsc03...
> > 1. Use 4 digit years. (that isn't the problem)
> > try it in sqlplus and see if it works.
> > Jim
> > "Jerry Preston" <g-preston1_at_ti.com> wrote in message
> > news:b4f1td$7fl$1_at_tilde.itg.ti.com...
> > > Hi!
> > >
> > > I keep getting an error, missing comma on the insert statement. I am
> lost
> > > and do not understand what is wrong with the following code:
> > >
> > > my $sqll="insert into twroot.EE_SPARES_SHOP ( STATUS, SITE,
> > > CUSTOMER_CONTACT, CUSTOMER_E_MAIL,
> > >

TTC_REPRESENTITIVE,
> > > SYSTEM_TYPE, SYSTEM_NAME, TEST_HEAD,
> > >
> SYSTEM_SERIAL_NUMBER,
> > > PART_NUMBER, PART_TYPE, PART_DESCRIPTION,
> > >

BOARD_SERIAL_NUMBER,
> > > QTY, FAILURE, TUI_REV, CAL_DIAGS_REV,
> > > DIAG_THAT_FAILED,
> > > RESULTS_FILE, RMA_NUMBER, WEB, DATE_RECEIVED
> > > )
> > > values( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?,
> ?,
> > > ?, ?, ?, ?, to_date( '$date_received', 'MM/DD/YY' )";
> > > $sth = $dbh->prepare( $sqll );
> > > die $dbh->errstr if $dbh->err;
> > > $rv = $sth->execute( $Status, $Site, $Customer_Contact,
> > > $Customer_e_mail, $TTC_Representitive, $System_Type,
> > > $System_Name, $test_head,
> > $System_Serial_Number,
> > > $Part_Number, $Part_Type, $Part_Description,
> > > $Board_Serial_Number, $Qty, $Failure,
> > $TUI_Rev,
> > > $Cal_Diags_Rev, $Diag_that_Failed,
> > > $Results_File, $RMA_NUMBER, $YES
> > > ) ||
> > >
> > > Thanks for your help,
> > >
> > > Jerry
> > >
> > >
> >
> >

>
> Received on Sun Mar 09 2003 - 19:32:42 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US