probleme with insert or update with the date of the day

One Star

probleme with insert or update with the date of the day

hello i want to insert or update into a table
when the join is realised i update informations
when it s a rejet i insert a new row into the table
i have a probleme with my job
it s the error message :
Starting job testdatemodifetcre at 14:17 18/02/2008.
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
This method must return a result of type Date
This method must return a result of type Date
at decisionel.testdatemodifetcre.testdatemodifetcre.tRowGenerator_1Process(testdatemodifetcre.java:1309)
at decisionel.testdatemodifetcre.testdatemodifetcre.tOracleInput_1Process(testdatemodifetcre.java:289)
at decisionel.testdatemodifetcre.testdatemodifetcre.runJob(testdatemodifetcre.java:1469)
at decisionel.testdatemodifetcre.testdatemodifetcre.main(testdatemodifetcre.java:1405)
Job testdatemodifetcre ended at 14:17 18/02/2008.
Community Manager

Re: probleme with insert or update with the date of the day

Hi
Which version of TOS did you use?
Can you show the setup value of parseDate method? If the preview can work in the tRowGenerator? what's the data type and expression of column of row3 on tMap?
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: probleme with insert or update with the date of the day

hi,
this is the image i use talend 2.2.3 r7292
One Star

Re: probleme with insert or update with the date of the day

i have changed the date pattern of the trow generator but i have also a error

tarting job testdatemodifetcre at 10:33 19/02/2008.
Exception in component tOracleOutput_2
java.sql.SQLException: ORA-00957: duplicate column name
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:543)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1028)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:2960)
at decisionel.testdatemodifetcre.testdatemodifetcre.tOracleInput_1Process(testdatemodifetcre.java:825)
at decisionel.testdatemodifetcre.testdatemodifetcre.runJob(testdatemodifetcre.java:1469)
at decisionel.testdatemodifetcre.testdatemodifetcre.main(testdatemodifetcre.java:1405)
Job testdatemodifetcre ended at 10:33 19/02/2008.
One Star

Re: probleme with insert or update with the date of the day

what are your database column name?
Because this kind of error comes from your oracle database server.
Can you send us a screenshot of your toracleoutput schema and a description of your table where you want to insert/update your data?
cheers
cahsohtoa
One Star

Re: probleme with insert or update with the date of the day

this is the decruption of my table for insert or update
CREATE TABLE TESTDATE
(
TEST VARCHAR2(10 BYTE) NOT NULL,
TEST2 INTEGER NOT NULL,
DATE_CRE DATE NOT NULL,
DATE_MODIF DATE
)
TABLESPACE TS_CREFIBASE_DATA
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
)
LOGGING
NOCACHE
NOPARALLEL;
One Star

Re: probleme with insert or update with the date of the day

in your INSERT(output) and in your UPDATE(output) you have to replace newcolumn and newcolumn1 (in the DB column) by DATE_CRE and DATE_MODIF
One Star

Re: probleme with insert or update with the date of the day

i don't understand ?
One Star

Re: probleme with insert or update with the date of the day

If you have a look to the images in your last post, in your schema you've let in the column "dbcolumn" the value newcolumn. You have to replace it by the name of your database column.
One Star

Re: probleme with insert or update with the date of the day

i have changed the the dbcolumn but i have always the same error
One Star

Re: probleme with insert or update with the date of the day

Exception in component tOracleOutput_2
java.sql.SQLException: ORA-00936: missing expression
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:543)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1028)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:2960)
at decisionel.testdatemodifetcre.testdatemodifetcre.tOracleInput_1Process(testdatemodifetcre.java:776)
at decisionel.testdatemodifetcre.testdatemodifetcre.runJob(testdatemodifetcre.java:1371)
at decisionel.testdatemodifetcre.testdatemodifetcre.main(testdatemodifetcre.java:1307)
Job testdatemodifetcre ended at 16:09 19/02/2008.
One Star

Re: probleme with insert or update with the date of the day

do you have exactly the same schema for the both output component, except that you use oracle?
One Star

Re: probleme with insert or update with the date of the day

i have found the solution, i have one job for the insert and an other for the update.
inj the end of the insert, the update run automatically
i have deleted the pb of same name of colonnes