• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » tOracleOutput -> append an existing value in database

#1 2012-06-26 06:04:19

guymage
Member
Registered: 2009-02-26
Posts: 17

tOracleOutput -> append an existing value in database

Hi,

In update mode in a tOracleOutput , is there any option to append a value with an existing value in database ?

the coresponding SQL request would be:

Code:

 update myTable set aColumn = acolumn || 'hello' WHERE id = 123

Thanks !

Last edited by guymage (2012-06-26 06:07:35)

Offline

#2 2012-06-26 07:05:39

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: tOracleOutput -> append an existing value in database

Hi

Code:

update myTable set aColumn = acolumn || 'hello' WHERE id = 123

What do you mean "append a value"?
I see you use "||" here. But I am confused...

Regards,
Pedro


Only Paranoid Survive.

Offline

#3 2012-06-26 07:27:17

guymage
Member
Registered: 2009-02-26
Posts: 17

Re: tOracleOutput -> append an existing value in database

I think aggregate is a better word wink

If in my database, the column acolumn get the value "I say "

after

Code:

update myTable set aColumn = acolumn || 'hello' WHERE id = 123

it will get "I say hello".


Nevermind, I think I will use a tOracleRow for that

Offline

#4 2012-06-26 07:31:41

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: tOracleOutput -> append an existing value in database

Hi

Why don't do this update in tOracelOutput?
InputComponent-->tMap-->tOracleOutput

In tMap, modify the expression of the column 'acolumn' like row1.acolumn+"hello" and set the filter condition of out1 like row1.id == 123.

Regards,
Pedro


Only Paranoid Survive.

Offline

#5 2012-06-26 22:32:22

guymage
Member
Registered: 2009-02-26
Posts: 17

Re: tOracleOutput -> append an existing value in database

If you do the aggregate in a tmap, it means that you need to do a select before to get the value in database.

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » tOracleOutput -> append an existing value in database

Board footer

Powered by FluxBB