plsqldeveloper

diff local package with database package

安稳与你 提交于 2019-12-12 08:59:25
问题 I need somehow compare local version of pl sql package with the one that is stored in database. Are there any "easy" way to do it? Currently I download package from database, save it in some file and perform diff using some diff tool. That is a bit cumbersome, so I would like to have such feature in ide (pl sql developer is preferable). 回答1: Typically developers use versioning software to check differences, maintain version history, and help coordinate team development of code. PL/SQL code

How to improve oracle row_number in query

五迷三道 提交于 2019-12-12 05:29:24
问题 Table_A ------------------- A_id ------------------- 1 Table_B ------------------- B_id | A_id ------------------- 1 1 2 1 3 1 Table_C ----------------------------- B_id | Process_date ----------------------------- 1 20130101 12:20:01 2 20130101 12:10:01 3 20130101 13:00:01 How to retrieve the maximum process_date from Table_C with references of Table_A.A_id based on Table_C timing window. If I want to retrieve Table_C.b_id and max(process_date) in timing window 20130101 12:09:00 to 12:21:00

How to return a boolen in refcursor? [duplicate]

拟墨画扇 提交于 2019-12-12 04:59:22
问题 This question already has answers here : Is there any boolean type in Oracle databases? (10 answers) Closed 6 years ago . In the below procedure I need to return a boolean value by using refcursor CREATE OR REPLACE PROCEDURE gmmt_proc.co_col_preference_details_sp ( p_applcd IN VARCHAR2, p_rptname IN VARCHAR2, p_user IN VARCHAR2, p_out_col_pref OUT sys_refcursor, p_err_cd OUT NUMBER, p_err_msg OUT VARCHAR2 ) IS p_check BOOLEAN := true; p_val NUMBER; BEGIN BEGIN SELECT p3.col_grp_id INTO p_val

how can we get the value of of VARRAY from IN Parameter in procedure

半腔热情 提交于 2019-12-12 02:34:05
问题 I am new to PL/SQL... In Varray how can i get multiple value from IN parameter..... else Is there another ways to get the values... I want to interate the values through VArray... if any other options then its fine.. coding: CREATE OR REPLACE PROCEDURE dynamic_query_build( vr_plan_sku_id IN VARCHAR2 ) IS type plan_sku_id_array IS VARRAY(999) OF VARCHAR2(5000); plan_sku_id plan_sku_id_array; total INTEGER; vrx_plan_sku_id VARCHAR2(3000); BEGIN vrx_plan_sku_id:= REPLACE(vr_plan_sku_id,',',chr

PL/SQL (How to calculate the first and last day of any quarter of any year)

巧了我就是萌 提交于 2019-12-11 19:44:06
问题 I have one table, per_all_peopl_f , with following columns: name person_id emp_flag effective_start_date effective_end_date DOJ -------------------------------------------------------------------------------- ABC 123 Y 30-MAR-2011 30-MAR-2013 10-FEB-2011 ABC 123 Y 24-FEB-2011 27-FEB-2011 10-FEB-2011 DEF 345 N 10-APR-2012 30-DEC-4712 15-SEP-2011 There are many entries (1000+) with repeated data and different effective start dates. I have to calculate the Workforce headcount. That is, the

Function Created with compilation errors in Oracle with table / view doesn't exist

僤鯓⒐⒋嵵緔 提交于 2019-12-11 19:07:05
问题 I have created a function which is working on my local but giving compilation error while creating on specific user and schema. I have verified the tables and this function executed in my local machine and returning the values. but when I tried to log in to other user and tries to create the function, it's giving compilation error. `/*Get_Accountdetails Functions*/ create or replace function Get_Accountdetails(inpstr1 in varchar2,inpstr2 in varchar2) return get_acnt_type as v_ret get_acnt

Creating and calling PL/SQL functions

风格不统一 提交于 2019-12-11 16:51:53
问题 I'm new to PL/SQL. It's been on fine until now that is. I've the query this query which works fine. declare rec employees_practice%rowtype; sam taxObligations%rowtype; socialsecurity number; rentallowance number; transportation number; taxableincome number; incometaxliability number; netpay number; total number; totaldeductions number; begin for rec in (select * from employees_practice) loop socialsecurity:=(5.5/100)*(rec.salary); rentallowance:=(20/100)*(rec.salary); if(rec.Category='S')

How to unlock a row if i use FOR UPDATE clause

99封情书 提交于 2019-12-11 04:23:05
问题 In procedure if we use FOR UPDATE clause, it will lock particular row and allow only one client to update whereas other client can only fetch data in the same row at that time. My question is when will it unlock the row, what should we do to unlock the row while writing procedure? Take this example here I'm using FOR UPDATE clause for client_count, when ll it unlock that particular row in this procedure. create or replace PROCEDURE newprocedur(inMerid IN VARCHAR2,outCount OUT NUMBER) AS

PLS-00103 Error in PL/SQL Developer

假如想象 提交于 2019-12-11 04:12:23
问题 Note: I do not have this problem when using Oracle SQL Developer:: - But it is not the Standard here. So i must find a way to do this in PL/SQL Developer When attempting to use PL/SQL developer (PL/SQL Developer - the program) to dynamically drop tables then create new ones using a create statement I consistently run into the error: PLS-00103: ENCOUNTERED THE SYMBOL "/" THE SYMBOL "/" WAS IGNORED PLSQL This is due to the "/" at the end of the dynamic sql. If I remove the "/" from the end I

Passing Array parameter from C# to Oracle collection type of table

谁都会走 提交于 2019-12-11 03:35:35
问题 I have declare a collection Table and record in PLSQL Specification. type loan_recov_rec is record(v_prncpl_ed_cd number(3),v_prncpl_recov number (7),v_int_ed_cd number(3), v_int_recov,number(5)); type loan_recov_tbl is table of loan_recov_rec index by binary_integer; procedure pr_final_settlement(v_loan_recov_tbl in loan_recov_tbl); So, I pass the Array parameter from C# page cmd.ArrayBindCount = v_loan_recov_tbl.Length; Oracle.DataAccess.Client.OracleParameter P_loan_recov = new Oracle