oracle10g

How to execute two command.ExecuteNonQuery() methods using single connection?

Hi, I am trying to invoke ExecuteNonQuery() method of two different objects of OracleCommand class. Both the objects use same connection object but have different commandText and parameters. I am using ODP.net, C# (.net 2.0 framework) and Oracle 10g. Code snippet is as follows : // OpenDatabaseConnection() methods checks and opens dat...

Oracle special characters

I have a query select * from table where name in ('52 T&M', '60 T&M'); The "&" is causing the query to expect a parameter. How do I qualify the "&" in the query to sting so that the query can find string with the "&" character in them? ...

Oracle 10g and Problem on Vista with visual studio 2010 installation

I am havng the following problem after installing oracle 10g on vista machine and running an asp.net application. Rather strange: One 2010 project on the same machine using the same database is able to work but the other that was converted to 2010 recently isnt working on the same machine. The error is : OCIEnvCreate failed with return...

Delete with Left Join in Oracle 10g

I have the following code that works fine in MS SQL Server: delete grp from grp left join my_data on grp.id1 = my_data.id1 and grp.id2 = my_data.id2 and grp.id3 = my_data.id3 and grp.id4 = my_data.id4 where my_data.id1 is NULL Basically, I want to delete all occurrence that can be found in grp and don't have any equivalence in my_data...

OC4J 10.1.3.1 - Failed to look up JNDI Location

I am using OC4J 10.1.3.1. (It can be accessed via http://localhost/em) A connection pool is created. A DataSource is created. In my servlet, I initiate jndiContext with parameters: jndiFactory=oracle.j2ee.rmi.RMIInitialContextFactory jndiUri=opmn://localhost:6003/home/default jndiUsername=oc4jadmin jndiPassword=ds12345 BUT, accor...

PLSQL error PLS-00302

I have created below procedure but its giving PLS-00302 error. Thanks in Advance :) ORA-06550: line 11, column 12: PLS-00302: component 'GET_LATEST_LSR_TRANSACTION' must be declared ORA-06550: line 11, column 3: PL/SQL: Statement ignored CREATE OR REPLACE procedure SEA_USER.Get_Latest_LSR_Transaction (tn IN VARCHAR2, pon OUT ...

Writing a query to kill a user session

Hi, I have to write a query which should do the following task select SID from v$session where username = 'some user' and if there is any SID by that particular username then kill that SID using the command below : alter system kill session 'sid'; What I have wrtten currently is the following : alter system kill session where...

database link in oracle 10g

I have two users System and jagan in oracle10g . I could display contents of table TAB (select *from tab) when i login as system.But i want same result when i login as jagan also.. database name is XE. Can somebody give me syntax to create database link from jagan to XE. ...

What is TAB in oracle10g why does not it display default table names for newly created user?

If I login as "system" then it shows default table names(select * from tab). But when I login as "jagan", if I run a query (select * from tab) it is not displaying...In order to display default tables from "jagan", what should I do? ...

How find the difference between two dates in oracle?

How to compare dates which are in different tables and find the difference between two dates? ...

How can I post updates (commits) in oracle db to SQL Server 2005

We have an application (BaaN) on Oracle Database. We also have an application that is on SQL Server 2005 which uses Oracle (BaaN) contents. Currently we cache all contents of the Oracle DB to SQL Server nightly through linked server from SQL Server to Oracle. Thought of using a trigger on Oracle db tables to write contents to Oracle t...

How can I round a decimal to the nearest even number in SQL?

Hi, I need to round a decimal in a sql query on Oracle 10g to the nearest even number. If the number is even, it should be returned. If the number is odd, the next even number should be returned. This is what I want: 8.05 should return 8.06, 3.48 should return 3.48 How can I do this? Thanks, Andrew ...

creating database in oracle10g

In mysql i can create a new database so easily just by writing a command. Mysql>create database database_name; In oracle 10g the default database name is XE. Can anybody tell command to create a new database other than XE ? I am using Linux(fedora-12). ...

SQL join and aggregate several tables

I have the following tables: users - userid - real name - other stuff roles - roleid - description - other stuff functions - functionid - description screens - screenid - description A user can have multiple roles, as controlled by the table user_roles - userid - roleid Each role can have either edit, view or no acce...

Oracle: importing data pump dump without knowledge dump file content.

Old approach for exporting/importing whole schema: exp user/pwdp@server FILE=export.dmp OWNER=user ROWS=Y imp newuser/pwd@server FULL=Y FILE=export.dmp New approach: expdp user/pwdp@server DUMPFILE=export.dp DIRECTORY=exportfolder However had a problem with importing: impdp newuser/pwdp@server DUMPFILE=export.dp DIRECTORY=exp...

Select three rows, two of them (grouped) unique, other filtered by another column (SQL)

First of all I am using Oracle 10g Express So there are three columns I want to select: [domain_name] [index_path] [collection_name] Now there are two columns that I want to be unique (as a group): [domain_name] [index_path] And then I want to select the row baised on when another column [gen_timestamp] is most recent. So my issue ...

Split column to multiple rows

Hi! I have table with a column that contains multiple values separated by comma (,) and would like to split it so I get earch Site on its own row but with the same Number in front. So my select would from this input table Sitetable Number Site 952240 2-78,2-89 ...

Can Oracle Reports 10g create a PDF with usable text fields?

I have an Oracle Reports 10g report, that pulls data from the database and saves the result as a PDF file on the user's PC. The users are requesting that the resultant PDF have a couple of text fields, so they can open the the PDF in Adobe Acrobat and type in some data (small amounts, like dates and filenames; not entire paragraphs or a...

reducing the time of scheduled job

Hi , I have written this scheduled job for the ORACLE DB which is run every second. Now in my schedule program what I want to do is to set the frequency to every 5 millisecond. BEGIN sys.dbms_scheduler.create_schedule( repeat_interval =>'FREQ=SECONDLY;INTERVAL=1', start_date => to_date('15:19 09/16/10...

How do I find which tables have foreign keys on my table?

Is there a query I can do to find which tables have foreign keys on a given table? Our DBA does not believe in (or understand?) "ON DELETE CASCADE", so I when I delete something from a table, I want to make sure I delete all the dependent stuff first. (Note, I don't need to find the tables programmatically, I can do that in SQL*Plus.) ...