oracle10g

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

Recreate index after delete-load

喜夏-厌秋 提交于 2019-12-12 02:24:26
问题 I have a table where I created an index to get a better perfomance on my queries. Sometimes some rows are deleted from that table and load some new ones. My questions are: If I have an index, then delete and load some data from file, should I recreate the index? If so, how can I recreate that index? should I drop it and create a new one? UPDATE The system loads data from files (through SqlLoader) and in the table I have a column called `idFile and the queries we are executing are based on

oracle forms builder pl/sql - access a column that is dervied from other columns

我们两清 提交于 2019-12-12 02:09:17
问题 I have a view in my database that has a bunch of fields derived from other information in the database, this is how the view is defined: create view patient_account_view AS select patient.p_mrn, p_fname, p_lname, ammount_paid, quantity*item_cost + repeats*item_cost "ammount_owing", (quantity*item_cost + repeats*item_cost) - ammount_paid "balance" from patient_account, patient, diagnosis, prescribed_treatment, items_used, item, perscription where patient.p_mrn = diagnosis.p_mrn AND patient

Group By with MAX(TIMESTAMP) [duplicate]

给你一囗甜甜゛ 提交于 2019-12-12 01:54:57
问题 This question already has answers here : GROUP BY with MAX(DATE) [duplicate] (6 answers) Closed 5 years ago . I have a table showing letter id with year and created timestamp.I have to list the latest timestamp for every year. For example: This is my DATA. Letter ID YEAR TIMESTAMP 1411 2013 17-NOV-14 09.18.01.000000000 AM 1412 2013 16-NOV-14 09.18.01.000000000 AM 1413 2013 15-NOV-14 09.18.01.000000000 AM 1414 2013 14-NOV-14 09.18.01.000000000 AM 1415 2013 13-NOV-14 09.18.01.000000000 AM 1416

problem with timer in oracle form

前提是你 提交于 2019-12-12 01:51:35
问题 I am working on an application that created by oracle forms(6i). I try to use timer in one of my forms every thing was fine during testing and I move my form to production. when I move to production when I open my form, I try to access to another form when my form was opened I faced with problem. unfortunately, I don't know why my menu not working correctly, I mean my menu open another form when this form is running. there isn't any relation between menu and that form, kindly please advise me

How to group by week of the year dates or day dates that start on Sundays in oracle 10?

白昼怎懂夜的黑 提交于 2019-12-12 01:39:43
问题 Given a table: day_date (form of yyyy-mm-dd) column2 column3 I want to group the data by weeks, and the start of each week goes from Sunday to Saturday, but I want to display the day_date. I have looked around all over, and I'm rusty on my SQL. Thanks! 回答1: Assuming that day_date is a datetime field and that you want to display the start of the week as the grouping field, try a query of the form: select TRUNC(day_date)-TO_NUMBER(TO_CHAR(day_date,'D'))+1 week_start_date, MAX(column2), MAX

Oracle 11g Express error: ORA-12505, TNS: listener does not currently know of SID given in connect descriptor

故事扮演 提交于 2019-12-12 01:12:13
问题 I am facing problem with Oracle 11g Express hosted on Linux Centos 6.4. This server is relocated from one place to another, this relocation changes the IP of server. We have changed the IP in tnsname.ora and listerner.ora files. After these changes when we are trying to connect to database instance from server we are getting error “Connected to idle instance”. If we are trying it to connect from client using SQL developer we are getting error “Status : Failure -Test failed: Listener refused

Get ID of last inserted row and use it to insert into another table in a stored procedure

匆匆过客 提交于 2019-12-12 00:44:35
问题 I have the following stored procedure which we use to insert data into a table: CREATE OR REPLACE PROCEDURE mySproc ( invoiceId IN NUMBER customerId IN NUMBER ) IS BEGIN INSERT INTO myTable (INVOICE_ID) VALUES (invoiceId); END mySproc; / What I am trying to do is to get the last inserted ID (this is the primary key field on myTable and auto incremented using a sequence) and insert it into another table, I have tried the following but could not get it working: CREATE OR REPLACE PROCEDURE

How to select values within a column

最后都变了- 提交于 2019-12-12 00:19:59
问题 Apologies for sharing little information than needed. Should have provided the entire thing. Here's it. we are sending pre-check patching information from many DB's via a tool to some logs on another server, that server has the main DB which will store this info for comparing later on. We are using the tags "<>" to make our statements unique for identification. The logfile info will look like this: StepLog:Info: dbname instance_name hostname objnames and so on.. From the database on that

EXECUTE IMMEDIATE with USING clause giving errors

寵の児 提交于 2019-12-11 23:18:34
问题 All, I am very new to stored procedures in general but I am struggling especially with those in Oracle. I have created a very simple example of what I am trying to accomplish and I am still getting the same error with this simplified version. The example stored procedure is as follows: CREATE OR REPLACE PROCEDURE ashish_test AUTHID CURRENT_USER IS BEGIN DECLARE v_tab VARCHAR2(50); v_strSQL VARCHAR2(50); BEGIN v_strSQL := 'SELECT * FROM :1'; v_tab := 'ex.emp'; EXECUTE IMMEDIATE v_strSQL USING