Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Insert data to table with a column value get from java code.

3579332Dec 4 2017 — edited Dec 5 2017

Hi guys.

I have a table with columns as below.

------------------------

ID NAME AMOUNT

------------------------

The NAME and AMOUNT column could be get from other table.

The ID column is returned by a java method with parameter (NAME,AMOUNT).

Like : api.getID(NAME,AMOUNT);

The api class is a jar package for now, and could be deployed as a web service in the future.

I want to create a KM to set the ID value when insert data to table.

But the sql in KM with Substitution API is like below:

----------------------------------------------------------------------------------------

insert into <%=snpRef.getTable("L", "COLL_NAME", "A")%>

  (<%=snpRef.getColList("", "[CX_COL_NAME]", ",\n\t", "","")%>)

values(<%=snpRef.getColList("", ":[CX_COL_NAME]", ",\n\t", "","")%>)

----------------------------------------------------------------------------------------

I have 2 questions here.

1.The method of "snpRef.getColList" used in "values" part is seems like a column list of source table.

Is there any way to set a expression to a certain column?

2.How can I get column's value from source table,not a column name.

So I can sent to java method and get return value.

Thank you.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 2 2018
Added on Dec 4 2017
1 comment
557 views