oracle11g

Oracle automatically insert record in multirecord block part 2

元气小坏坏 提交于 2019-12-11 05:57:19
问题 My table looks like this: +-------------------+ |Name | +-------------------+ |Name1 | |Name2 | |Name3 | |Name4 | |Name1Jr | |Name2Jr | |Name4Jr | +-------------------+ My multirow block looks like: What I wanted to know is how can I insert a record that has the same name with Jr after I insert a name. For example, I inserted Name2, it will also insert Name2Jr into the multirow block. Like this: Note: I need to get the value of the automatically inserted data from database. I tried in WHEN

Change oracle display message

天大地大妈咪最大 提交于 2019-12-11 05:47:22
问题 I have written a procedure to check the file exists in the oracle directory. it is working fine. On screen i am printing message if file not exists in path, by using DBMS_OUTPUT.PUTLINE('MESSAGE HERE'); but after displaying message oracle printing default statement PL/SQL Procedure successfully completed . I don't want to display this on screen. 回答1: To suppress the message in sql*plus of successfully completed procedure use the following command. set feedback off 来源: https://stackoverflow

I get an ORA-01775: looping chain of synonyms error when I use sqlldr

ぐ巨炮叔叔 提交于 2019-12-11 05:44:26
问题 I apologize for posting a question that seems to have been asked numerous times on the internet, but I can't quite fix it for some reason. I was trying to populate some tables using Oracle's magical sqldr utility, but it throws an ORA-01775 error for some reason. Everywhere I go on Google, people say something along the lines of: "Amateur, get your synonyms sorted out" (that was paraphrased) and that's nice and all, but I did not make any synonyms. Here, the following does not work on my

How to pass schema name as parameter in stored procedure

可紊 提交于 2019-12-11 05:25:20
问题 I need to pass a schema name as a parameter to a stored procedure. But I end up with error ORA00942: table or view does not exist . I googled a lot but didn't find any solution. Actually in our application we are writing a Stored procedure (SP) in One schema and referring the same SP for all other schemas. Consider I have to find the stock of an item in a different schema (1 schema for 1 client). Then select * from abc.stock_table where itemid=xxx; In this query I want to replace abc with

How to work with PL/SQL Arrays or Collections as Parameters then JOIN them Together by Index

為{幸葍}努か 提交于 2019-12-11 05:18:19
问题 I am attempting to create a really simple procedure that creates an account or several accounts. In order to accomplish this I wanted the implementation of the Call that will be made to this Procedure to be as simple as possible. The Code behind the Procedure can be complex or simple but that's not entirely what I care about here as I'm approaching this first from the perspective of the User that will be making the Call to the create_account() Proc. Simple Call to Create an Account - As you

Saving pagination in Oracle Apex Interactive Report

一世执手 提交于 2019-12-11 05:14:31
问题 Recently I've come across the problem in Oracle Apex 4.2.0003 with saving pagination in Interactive Report. I have a page, in which there are two reports: the first one is Classic, and the second one is Interactive, at that they are working as "master-detail". Besides, Interactive report has both data from a view and HTML-elements like icons with links to modal or pop-up windows. All in the page works fine except one thing: refreshing of it leads to resetting the pagination of "detail"

Oracle Calling a job with arguments

 ̄綄美尐妖づ 提交于 2019-12-11 04:56:42
问题 I have a stored procedure parse_data which takes 3 arguments which are all NUMBER. I have created a program with three arguments and then a job that will run the stored procedure. The code looks like this: BEGIN dbms_scheduler.create_program(program_name => 'PARSE_PROGRAM', program_type => 'STORED_PROCEDURE', program_action => 'parse_data', number_of_arguments => 3, enabled => false, comments => ''); dbms_scheduler.define_program_argument(program_name => 'PARSE_PROGRAM', argument_name =>

Abort insert/update operation in trigger using PL/SQL

懵懂的女人 提交于 2019-12-11 04:54:25
问题 I am to write a trigger that checks some information that is inserted/updated, compare them with data from database and if they are not correct, stops whole operation. I wrote before trigger (for each) and then threw application exception if something was wrong, but it was not working, becouse I read from the table that was updated, so I get ORA-04091 error. And now I am wondering how to solve this? Now the only idea of mine is to write a before trigger that insert some necessary data into

Oracle (11g) compound trigger not updating CLOB data field

你离开我真会死。 提交于 2019-12-11 04:50:07
问题 I tried searching for answers to this but couldn't really find anything useful. Either there isn't or my searching capabilities took a knock. Regardless, here's my situation: I have a case where I've got 2 identical tables, Z_TEST and Z_TEST2. Call Z_TEST2 an audit table if you'd like. Both have 2 columns, ID (number) and CFIELD (CLOB). Z_TEST has a trigger which will either insert or update Z_TEST2 (in effect only the CLOB field). Scenario 1: If I create the following trigger on Z_TEST,

Oracle - Increment value

家住魔仙堡 提交于 2019-12-11 04:46:27
问题 I have a table holding customer invoice data. I am trying to find how many consequently months a particular transaction type is present on a customer’s invoice by creating a carryover counter. If the transaction is no longer present, the counter should reset to zero. Table: +------------+-------------+----------------+----------+ | Invoice_Id | Customer_id | Transaction_id | Sequence | +------------+-------------+----------------+----------+ | 253442 | 23334 | | 1 | | 253443 | 23334 | | 2 | |