oracle

confusion about using types instead of gtts in oracle

I am trying to convert queries like below to types so that I won't have to use GTT: insert into my_gtt_table_1 (house, lname, fname, MI, fullname, dob) (select house, lname, fname, MI, fullname, dob from (select 'REG' house, mbr_last_name lname, mbr_first_name fname, mbr_mi MI, mbr_first_name || mbr_mi || mbr_last_name fullnam...

Generate a GUID in Oracle

Is it possible to auto-generate a GUID into an Insert statement? Also, what type of field should I use to store this GUID? Thanks! ...

SSRS - Oracle DB, Passing Date parameter

Using SSRS with an Oracle Database. I need to prompt the user when running the report to enter a date for report. What is the best way to add in the parameter in my SSRS Report. Having problem finding the right date format. under the "Report Parameter" menu, I have setup the Report Parameters using the DateTime Datatype. Keep gettin...

If don't own proprietary database engine, what is best way to convert database to mysql?

I work for a very small company. I was recently faced with the question of whether there is a good way to convert a proprietary database to a MySQL database without owning the proprietary database engine e.g. if one is given a large oracle database file (or choose your favorite proprietary database engine format), but doesn't have a lice...

How to reclaim storage for deleted LOBs

I have a LOB tablespace. Currently holding 9GB out of 12GB available. And, as far as I can tell, deleting records doesn't reclaim any storage in the tablespace. (This was by the simple method of monitoring storage -- queries against user_extents, which is about all I'm allowed as a non-DBA) I'm getting worried about handling further proc...

can oracle types be updated like tables?

I am converting GTT's to oracle types as explained in an excellent answer by APC. however, some GTT's are being updated based on a select query from another table. For example: UPDATE my_gtt_1 c SET (street, city, STATE, zip) = (SELECT src.unit_address, src.unit_city, ...

oracle query returns 4 duplicates of each row

I am running an Oracle query. It seems to work except that it returns 4 duplicates of each result. Here is the query: Select * from ( Select a.*, rownum rnum From ( SELECT NEW_USER.*, NEW_EHS_QUIZ_COMPLETE.datetime FROM NEW_USER, NEW_EHS_QUIZ_COMPLETE WHERE EXISTS ( select * from NEW_E...

Oracle multiset, collection and records

Can anybody Explain me why records are required. Can't we perform the same operation in pl/sql using loop and all. Also when multiset, records query can be used i.e. in which type of situation and which one will be the preference. ...

What datatype in oracle would map to a Java int?

What type in Oracle (10 Express Edition) would be the "same" as a Java int? ...

Getting "too many rows" error inside a "for" cursor loop

I have a trigger that contains two cursors loops, one nested inside the other like this: FOR outer_rec IN outer_cursor LOOP FOR inner_rec IN inner_cursor LOOP -- Do some calculations END LOOP; END LOOP; Somewhere in this it is throwing the following error: ORA-01422: exact fetch returns more than requested number of rows ...

Getting data from the next row in Oracle cursor

Hi, I'm building nested tree and I need to get data for the next row in cursor, using Oracle. And I still need current row, so looping forward is not a solution. Example: OPEN emp_cv FOR sql_stmt; LOOP FETCH emp_cv INTO v_rcod,v_rname,v_level; EXIT WHEN emp_cv%NOTFOUND; /*here lies the code for getting v_next_level*/ if...

org.hibernate.MappingException: No Dialect mapping for JDBC type: 2002

Hi at all, I'm having a issue trying to get working a JPA nativeQuery. I'm having a org.hibernate.MappingException: No Dialect mapping for JDBC type: 2002 when a try to do a nativeQuery and get a geometry field type. I use oracle and org.hibernatespatial.oracle.OracleSpatial10gDialect. The geom fields is mapped as: @Column(name="geo...

What's the Correct name for a Association table (many to many relationship)

What's the Correct or most popular name for a Association table? I've heard Lookup,associative,resolving,mapping and junction table so far? Thank you in advance;-) ...

How can I get values from one table to another via similar values?

I have a table called excel that has 3 columns, name, id, and full_name. The name part is the only one I have and I need to fill id and full_name. The other table that contains the data is called tim_pismena and has 2 columns that I need, id and pismeno_name (the actual names are not important, but i'm writing them just for clarity). In...

How do I unwrap PLSQL?

How do I unwrap PLSQL functions/procedures written in Oracle 9.2? ...

How to prevent "parameter PLSQL_DEBUG is deprecated" compiler warning in Oracle SQL Developer

When I execute a package body DDL statement SQL Developer warns, Warning: PLW-06015: parameter PLSQL_DEBUG is deprecated; use PLSQL_OPTIMIZE_LEVEL=1 How can SQL Developer be configured to not use PLSQL_DEBUG? PLSQL_DEBUG is set to false in an sql*plus session using the same connection details, > show parameters plsql NAME ...

Table choosing algorithm

Below I'm using simple example, real tables are bigger, I cannot store devices in one table, I can not merge device1 and device2 tables. I have three tables: device1, device2, computer(device3), device1 and device2 have id from the same sequence, device3 is computer. Table device3 can be connected with device1 and device2 (many-to-many)...

The report you requested requires further information (Oracle database)

Hi, I have a simple application in C# (Visual Studio 2005) that display a Crystal Reports report (Crystal Reports X1 R2). When I compiled the application it appears the following message: The report you requested requires further information. I want to set the connection info in the code so the application doesn't ask the user for the da...

Oracle custom sort

The query... select distinct name from myTable returns a bunch of values that start with the following character sequences... ADL* FG* FH* LAS* TWUP* Where '*' is the remainder of the string. I want to do an order by that sorts in the following manner... ADL* LAS* TWUP* FG* FH* But then I also want to sort within each name in...

SQL Express vs SQL Plus

Hi, I'm wondering what the difference is if any between SQL Express and SQL Plus. I know SQL Plus is used with Oracle but not sure if SQL Plus is a modification of SQL Express or a totally different installation. Thanks ...