SQL & PL/SQL :: Oracle 10g Express - Records As Object?

Jul 22, 2012

I am trying this below in oracle 10g express. how I can select data from the table?

CREATE TYPE Worker AS OBJECT (name VARCHAR2(25), dept VARCHAR2(15));
CREATE TABLE teams (team_no NUMBER, team_member Worker);
insert into teams
values ( 5 , team_member ( worker('a' , '2')))
DECLARE

[code]...

ORA-00933: SQL command not properly ended

View 6 Replies


ADVERTISEMENT

Application Express :: SQL Workshop - Object Browser - Not Showing All Constraints

Apr 15, 2013

I have a table with about 15-20 constraints and when I look up the tables constraints in SQL workshop, I can only see 10 constraints. Not sure if its a bug or I need to configure something, somewhere to make it show alll my constraints. I can see all constraints by querying the user_constraints view.

View 1 Replies View Related

PL/SQL :: Error In Modifying Object Value In Triggers Defined On Object Tables

Sep 26, 2012

While practicing with Triggers, the following error was encountered. An Object Type and an object Table are created.

create or replace
type typPerson is object
(id number,
firstname varchar2(30),
lastname varchar2(30)
[code].........

I executed the below insert statement, and I got the following error.

SQL> insert into person_obj_tab values (10,'Object1','From Trigger');
insert into person_obj_tab values (10,'Object1','From Trigger')
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Process ID: 4153
Session ID: 136 Serial number: 305
[code]......

SQL> insert into person_obj_tab values (10,'Object','Original');

1 row created.Question:

1) Trigger of version 1 did not report any error during compilation, but during DML execution, hangs for sometime and gives the above error.
2) Whether direct assignment of Objects of greater size is possible inside triggers built on object Tables?
3) Suppose an object contain multiple attributes (say more than 20), then how to assign them inside a trigger?

View 1 Replies View Related

TimesTen In-Memory :: OracleDataReader - Object Reference Not Set To Instance Of Object

Jan 25, 2013

I have a problem with executing oracleCommand.ExecuteReader() method. Whatever I try it always returns null and it won't create OracleData reader object. I'm using ODAC 1120320_x64 for .net 4.0 and timesten112241.win64. Don't sure what to do. Debugger is showing strange thing in OracleConnection object : ConnectionState = Closed, but output of ttStatus shows connection to TimesTen data store and ExecuteNonQuery() command works just fine with or without (in or out) parameters. But when I try to execute some query with multile output such as select *, I can't get any result.

I also have a strange problem with connection.Open() When I execute Open() i throws AccessViolationException that can be handled with [Handle ProcessCorruptedStateExceptions] attribute, but connection is established after that and my application works fine until I try to instance OracleDataReader object.

Here is the code:
OracleCommand select = null;
OracleDataReader reader = null;

select = new OracleCommand(selectStmt, connection);
select.CommandType = CommandType.Text;
try
{
reader = select.ExecuteReader(); // this line throws NullReferenceException
if (reader.HasRows)
{
[code]....

Just to mention, I tried it with different queries (pl/sql, plane sql, stored procedure) and all of them works fine in SQL Developer, but not in app.

View 10 Replies View Related

SQL & PL/SQL :: Oracle 10g - Update Records In Target Table Based On Records Coming In From Source

Jun 1, 2010

I am trying to update records in the target table based on the records coming in from source. For instance, if the incoming record is present in the target table I would update them in the target else I would simply insert. I have over one million records in my source while my target has 46 million records. The target table is partitioned based on calendar key. I implement this whole logic using Informatica. Looking at the informatica session log I find that the informatica code is perfectly fine but its in the update part it takes long time (more than 5 days to update one million records). find the TARGET TABLE query and the UPDATE query as below.

TARGET TABLE:
CREATE TABLE OPERATIONS.DENIAL_REGRET_FACT
(
CALENDAR_KEY INTEGER NOT NULL,
DAY_TIME_KEY INTEGER NOT NULL,
SITE_KEY NUMBER NOT NULL,
RESERVATION_AGENT_KEY INTEGER NOT NULL,
LOSS_CODE VARCHAR2(30) NOT NULL,
PROP_ID VARCHAR2(5) NOT NULL,
[code].....

View 9 Replies View Related

Find Dependent Object Details For Any Object

Dec 24, 2012

Is there any query to find the dependent object details for any object. Like if mview is built on a table, then i should be able to find the table name with out checking code of the mview. similar way for view and functions or procedures etc...

View 5 Replies View Related

Oracle Sys Object Invalid

Jun 21, 2013

Oracle sys object are Invalid,But database working fine. How to fix these problem, I don't have oracle support,

Database Dba_registry contain are All Valid.But sys object getting Invalid.

Oracle 10g 10.2.0.5 Standard

OWNERCOUNT(*)
MDSYS359
DMSYS24
PUBLIC147
CTXSYS3
OLAPSYS32
XDB 5
SYS 141

Dba_registry

COMP_IDSTATUS
APSOPTION OFF
SDOOPTION OFF
ODMOPTION OFF
AMDOPTION OFF
XOQOPTION OFF
OWMVALID
CATALOGVALID
CATPROCVALID
JAVAVMVALID
XMLVALID
CATJAVAVALID
RULVALID
EXFVALID
CONTEXTVALID
XDBVALID
EMVALID
ORDIMVALID

View 3 Replies View Related

What Object Oriented Extensions Are Supported By Oracle

Jan 13, 2007

"What object oriented extensions are supported by oracle?"

View 1 Replies View Related

Application Express :: Object Type As Application Level Variable

Jan 2, 2013

My question is, if I define an object type (create type ... as object ...) is it possible to hold a variable of this type as the session level? For example, if I am creating an order using multiple web pages, it would be much easier (and intuitive) to create and manipulate an order object than to hold the data in generic collections.

If that is not possible, is there some way to make a generic Apex collection appear more application specific? By this I mean some way to map the columns C001, C002, ... to more intuitive names such as CUST_NO and ORDER_DATE. I had considered possibly creating a view of the APEX_COLLECTIONS view which would rename the columns but then I would also have to create a bunch of instead of triggers if I wanted to update it as well.

View 2 Replies View Related

Forms :: Saving Excel Files As Object In Oracle?

Feb 13, 2012

How can we save Excel file as an objectin oracle. Like we can store image file.

View 1 Replies View Related

Forms :: Oracle Builder Object Navigator Reports

Nov 16, 2011

I am using Oracle Forms Builder 6i. When you open it, in the navigator tree:

- Forms - MODULE - Reports

I want to know what is the purpose of REPORT section in the Forms Builder.

View 6 Replies View Related

PL/SQL :: How To Access Type Object Variable Declared Inside Another Type Object

Mar 29, 2013

I have an Type-object typeObj1 that consists another Type-object typeObj2. this def has another Type-object typeObj3. how to access variable declared inside typeObj3. I have syntax below for each Type.

CREATE OR REPLACE TYPE typeObj1
AS OBJECT
   (
      SYSTEM_IDENTIFER                    VARCHAR2(50),
      PROCESS_TYPE                          VARCHAR2(50),
      abc                                            typeObj2
     
   )
/

[Code]...

/I have tried to access the type-object in where clause in following way

FROM TABLE(CAST(I_typeObj1 AS typeObj1)) ITTPRC,
......
Where
.......
AND (ADDKEY.ADDTN_INFO_KEY_TYP_NM IN (SELECT ADDTN_INFO_KEY_TYP_NM FROM TABLE(ITTPRC.abc)))

AND (ADTINF.ADDTN_RQST_TYP_VAL_DT  IN (SELECT ADDTN_RQST_VAL_DT FROM TABLE(     ITTPRC.def)) OR ITTPRC.def IS NULL )
AND (ADTINF.ADDTN_RQST_TYP_VAL_NUM  IN (SELECT ADDTN_RQST_VAL_NUM FROM TABLE( ITTPRC.def)) OR ITTPRC.def IS NULL )
AND (ADTINF.ADDTN_RQST_TYP_VALUE  IN (SELECT ADDTN_RQST_VALUE FROM TABLE( ITTPRC.def)) OR ITTPRC.def IS NULL )

In this way i am able to access the variable inside typeObj3. But problem is i am getting error "ORA-01427 single-row subquery returns more than one row" when i pass more that one typeObj2.

I passed the values like this in proc execution.

T_T_A_I_V  :=  typeObj3('asdasd',NULL,NULL),
                       typeObj3('String654',NULL,NULL),
                       typeObj3('abcdef',NULL,NULL));                                    
T_T_A_I_I  :=  typeObj2('CampusCode',T_T_A_I_V),
                          typeObj2('PlanNumber',T_T_A_I_V);

What i have done is removed typeObj3 from typeObj2, variables defined in typeObj3 are added in typeObj2 then i got ride of above error. is it correct

View 4 Replies View Related

Application Express :: Updating Records Within APEX?

Mar 11, 2013

I've created a system for managing football within APEX and it is at a stage now whereby the user can view any number of the tables through Reports and insert data into these tables through Tabular Forms. Its using triggers and sequences to allow for new primary keys to be generated each time within these Tabular Forms so I'm at a stage now where I'm really quite pleased with it..

The last thing I'm needing to do now is have it update certain fields when certain records are entered.

Clubs
clubId
clubname
gamesplayed
clubPoints
clubtotalgoals

Results

club1 (clubId foreign key from clubs table)
club2 (clubId foreign key from clubs table)
club1goals (the amount of goals, type Number)
club2goals (the amount of goals, type Number)
club1points (points earned, Type Number)
club2points (points earned, Type Number)

When filling out a result, the user will enter the following (as an example):

club1 - 1 (club with ID, 1)
club2 - 12 (club with ID, 12)
club1goals - 2 (the first club scored 2 goals)
club2goals - 0 (the second club scored 0 goals)
club1points - 3 (the first club picked up 3 points)
club2points - 0 (the second club picked up 0 points)

The result is then entered into the results table and what I am hoping to achieve at this stage is the following:

1) in the clubs table, the gamesplayed is incremented by 1 for both clubs as a result of playing this fixture

2) club1 has however many goals club1 scored added to its current clubtotalgoals field (in this case, it is of course 2)

3) club1 has however many points club1 earned to its current clubPoints field. (In this case it would be 3)

View 2 Replies View Related

Application Express :: Adding All Records In Report Parameter

Aug 8, 2012

I am trying to create a report parameter using an lov. You be able to pick one item or return All

The source for my lov is

SELECT l.extkey||' - '||l.longdescr a,  l.clocid b
from udm_cloc l, udm_cust c, udm_lde lde
where l.custid = c.custid
and c.ldeid = lde.ldeid
[code].......  

But I keep getting an error
'LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.

View 6 Replies View Related

Application Express :: Displaying All Records In A Tabular Form On Single Page

Aug 27, 2010

After setting up a data entry page,The logic in my page requires that all the records in my tabular form should be displayed .The tabular form is based on a collection, and the user selects rows through a checkbox.Any reload of the page due to pagination will break the logic, as some calculation and display events occur during page load, based on the previous page.

I need to display about 25 rows.I have changed the report attribute to display 50 rows, but it displays rows only up to the bottom of the screen, i.e. 11 rows.

Unfortunately I only just added some new rows and saw this behaviour else I would not have gone that way, as I expected APEX to display all rows if required.

View 19 Replies View Related

Application Express :: How To Create Radio Groups Dynamically Based On Records In A Table

Nov 29, 2012

below requirement..

We have certain records like SQL, PL/SQL, Reports, Forms, OAF etc in a table. We wanted to capture rating for each of these criteria. So we want a form to be displayed dynamically..

SQL 1 2 3 4 (1,2,3,4 represent radio buttons)
PL/SQL 1 2 3 4
Reports 1 2 3 4
Forms 1 2 3 4
OAF 1 2 3 4

If we add another row, XMLP in that table additional radio button should be displayed automatically..

View 4 Replies View Related

SQL & PL/SQL :: Passing Values From Oracle Object Type To PLSQL Type

Mar 8, 2013

I have created the below types and oracle objects.

create or replace type T_EMA_NP_SETDEL_RESP_REC as object
(
respCode number,
respDesc varchar2(255)
)

create or replace type T_EMA_NP_RANGE_LNPTICKET_TAB AS TABLE OF T_EMA_NP_RANGE_LNPTICKET_REC
create or replace type T_RANGE_TICKET_TAB AS TABLE OF T_RANGE_TICKET_REC

The following types are created in the Package specification

type t_resp_rec IS RECORD
(
resp_code number,
resp_desc varchar2(255)
);
--
subtype t_ema_lnpticket is T186_IN_REQ_PARAMETER.T186_EMA_LNPTICKET%TYPE; -- Number
type t_ema_lnpticket_tab is table of t_ema_lnpticket index by binary_integer;

I have the following two procedures

PROCEDURE getEMAReturnResponse(
p_in_call_request_id IN number,
p_ema_resp_rec IN t_ema_np_setdel_resp_rec,
p_ema_range_lnpticket_tab IN t_ema_np_range_lnpticket_tab,
p_endof_event IN varchar)

PROCEDURE Return_Response(p_in_call_request_id IN number,
p_ema_resp_rec IN t_ema_resp_rec,
p_ema_lnpticket_tab IN t_ema_lnpticket_tab,
p_endof_event IN varchar2)

getEMAReturnResponse Procedure:

Accessed by Java application to pass the values. Should call the Return_Response procedure and pass the values received from Java.

Return_Response Procedure

The p_ema_lnpticket_tab is a sort of array that can have multiple values. Please see the example of values. Has all the business rules and validation that should be adhered.

Example of Vaules
p_in_call_request_id = 1
p_ema_resp_rec = 12345, 'Operation Failed'
p_ema_lnpticket_tab = (1,2,4,5)
p_endof_event = Y

View 2 Replies View Related

PL/SQL :: Passing Values From Table Type To Oracle Object Type

Mar 8, 2013

I have created the below types and oracle objects.

create or replace type T_SETDEL_RESP_REC as object
(
respCode number,
respDesc varchar2(255)
)
--
create or replace type T_EMA_NP_RANGE_LNPTICKET_REC as object
(
ticket number
)
create or replace type T_RANGE_TICKET_TAB AS TABLE OF T_RANGE_TICKET_REC

The following type is created in the Package specification

type t_resp_rec IS RECORD
(
resp_code number,
resp_desc varchar2(255)
);

I have the following two procedures

Procedure getResponse(p_call_request_id IN number, p_resp_rec IN t_setdel_resp_rec,
p_range_ticket_tab IN t_range_icket_tab, p_endof_event IN varchar)

PROCEDURE ProcessResponse(p_call_request_id IN number, p_resp_rec IN t_resp_rec,
p_ticket_tab IN t_ticket_tab, p_endof_event IN varchar2)

The get Response procedure is a wrapper procedure exposed to Java to pass values. The Process Response procedure is a main procedure where all logics and business rules are handled.

The Problem is:

How can I pass the values from get Response procedure to Process Response procedure. So that rules and validations are applied. Please note the p_ticket_tab may have many ticket numbers corresponding to p_call_request_id.

Values E.g. :
p_call_request_id = 1
p_resp_rec (1234, 'Error found')
p_range_ticket_tab (1,2,3,4,5)
p_endof_event = 'Y'

View 7 Replies View Related

Reports & Discoverer :: Object Alignment In Oracle Reports

Oct 25, 2011

I am unable to properly align two objects in the layout editor in Oracle Reports. The form report I am trying to design must be perfect and I need to highlight a particular report object (data item) by adding a narrow box (boilerplate) next to it on the left hand side, which is filled with a contrasting colour and contains an asterisk.

The problem is this: I cannot seem to align them properly (horizontal stack, align top). Even if I use the 'size objects' option to make them exactly the same vertical size, the align option stated above does the horizontal stack, but vertically they are not aligned - nor can I manoeuvrings the boilerplate box into place manually.

View 1 Replies View Related

Express Edition (XE) :: Oracle Express E 10g Or 11g RPM Package For Linux 32x

Oct 18, 2012

I would like to install Oracle Express Edition on Linux. I have some troubles on x64 architecture of Linux with win32 progs that runs via wine. And I need Oracle for developing. So, I would like install x32 Oracle Express Edition, but I can't find it anywhere. Is it exists.

Why is Oracle Express Edition 32x exist for windows, but there is not Oracle Express Edition 32x for Linux? We are using widely Oracle 10g. And there is many special difference with 11g. But there is no anywhere 10g version. Where can I download it (for Linux)?

View 2 Replies View Related

SQL & PL/SQL :: Oracle 9i / 10g - Remove Duplicate Records?

Nov 11, 2010

I have a query which pulls data from emp view

select am_obj_emp_obj(empno,ename,sal,deptno,service) from
(select empno,ename,sal,deptno ,service from emp_vw where 1=1 and rownum < 2000 and service in ('MAN','SACH','SACL','KACL'))
WHERE SAL = (SELECT MAX(SAL) FROM EMPS_VW WHERE DEPTNO = deptno or sal is null)
union all

[code]...

This query is pulling 12 records of which 6 records are coming from the first query and the same 6 records is coming from the second query after union all Here am_obj_emp_obj is the object type and emp_vw is the view

Now I wanted to remove the duplicate records.When I implement the union operater it is giving me error.

ORA-22950: cannot ORDER objects without MAP or ORDER method.

View 5 Replies View Related

PL/SQL :: Oracle 10.2.4.0 - How To Divide Set Of Records Into Groups In SQL

Jun 11, 2012

I am using 10.2.4.0 of oracle. I am having one requirement, in which i have to divide the set of records into certain groups , so that they can be executed partly but not in one run.

So in the 'SELECT' clause itself i want to assigns particular value (may be 1 )to first 50000 records then another value(may be 2) to next 10000, like wise. And again the total count of records will also varry time to time , if the total count of record set is less than 10000 , then it should only assign '1' to all the records. i will set the group values (1,2,3...) as another column itself.

View 4 Replies View Related

Oracle Function To Retrieve Records Randomly?

Jun 19, 2013

I need function to pick the record from DB random manner.

For example
, say we have 500 records and input value to the function is 5 means, it should display the records randomly between 1 to 5

If user inputted value is 10 means, it should display one record between 1 to 10.

View 1 Replies View Related

Error While Bulk Updating Records In Oracle Using XML

Aug 13, 2010

I am trying to bulk update records in oracle using XML , front end is vb.net.Now the problem when i updating for 1000 - 5000 records on my development server. Its getting updated.

But when we are updating on the production server for 100000-200000 records , we receive error

"ORA-01460: unimplemented or unreasonable conversion requested "

View 1 Replies View Related

Compare Records In A Table In Both Oracle - MSSQL?

Jan 13, 2009

I am trying to compare records in a table in both Oracle and MSSQL database against a single standard dataset in my test case. However, I'm getting different results for each when I sort using a "order by".

select COL1 from TABLE1 order by COL1

In MSSQL, I get:
COL1
=====
A
A.
A++
A++.

In ORACLE, I get:
COL1
=====
A
A++
A++.
A.

I mean, oracle result some what makes sense, because "." has bigger ascii value than "+". But is there anyway to make the ORACLE sort order look exactly like MSSQL result?

View 1 Replies View Related

SQL & PL/SQL :: Skipping Of Records - Oracle External Table?

Sep 24, 2011

I have a flat file on an unix system.The file is required to be loaded through Oracle External Table.

Issue:
Not sure how to skip the first record when loading through Oracle External Table.How to suppress data while loading through External Table.

Requiremen syntax where in I can skip the first record. syntax for suppressing values in columns that are not required. How the same needs to be handled in case of Number datatype and Varchar2 datatype. Example - In case of Number can it be replaced with 0 and for datatype can be same be replaced with NULL.

View 9 Replies View Related

SQL & PL/SQL :: Procedure To Delete Records / Count Number Of Records Has Been Deleted

Feb 21, 2011

I have written the following PL/SQL procedure to delete the records and count the number of records has been deleted.

CREATE OR REPLACE PROCEDURE Del_emp IS
del_records NUMBER:=0;
BEGIN
DELETE
FROM candidate c
WHERE empid in
(select c.empid
from employee e,
candidate c
where e.empid = c.empid
and e.emp_stat = 'TERMINATED'
);
[code]....

View 6 Replies View Related

Server Utilities :: Oracle 9i - Load Remaining Records?

Nov 25, 2011

In a flat file 50000 records are there.In that some of the records having special charcters.From that special character record the remaing records are not loading to oracle tables. to load the remaining records,after the record which is having special characters.The data is loading using sql*loader

View 3 Replies View Related

SQL & PL/SQL :: Performance Tuning For Oracle Tables With Million Of Records

Mar 11, 2013

Ways for improving the Table performance which holds million of records for oracle. Currently we have partitioning and indexing but it doesn't seem to work.

View 2 Replies View Related

Performance Tuning :: How Oracle Organizes Records In Partitions

Mar 9, 2012

I have a question regrading how oracle fetches record in case of partitioning...

we have a table of nearly 6 crores of records.. that table has several columns among which the DBA has given the range partition on COL1 and hash subpartition on COL2...

CREATE TABLE ORDER_BOOK
(CUST_ID NUMBER(10),
ORDER_DATE DATE,
...........,
...........,
...........)
PARTITION BY RANGE (CUST_ID)
SUBPARTITION BY HASH (ORDER_DATE)
[code]........

I want to know how the rows will get organised in the tablespaces...the DBA didn't mention any tablespace name in the main partition and he has mentioned the tablespace names only in the subpartition template. so how the records will get organised.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved