Skip to Main Content

SQL & PL/SQL

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Selecting Column based on variable passed

JanGLiJun 12 2018 — edited Jun 12 2018

Hi,


This is my query:

insert into qa_results_interface@EBS

(

process_status,

organization_code,

plan_name,

decode(qa_results_stage.mon,'Jan',qa.character14,'Feb',qa.character15,NULL)

)

values (select

3,

'FFL',

'HYPERION_CAPEX_WB',

MON

from qa_results_stage

where product = 'CAPEX Additions');

I am passing variable (month name like Jan and Feb) passed on the variable passed i have to select a the table in which i have to insert data. I am trying to achieve this using decode but i am unable to do so.


Need expert opinion.


Regards

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 10 2018
Added on Jun 12 2018
2 comments
282 views