oracle

fetch from function returning a ref cursor to record

I have a function in a package that returns a REF CURSOR to a RECORD. I am trying to call this function from a code block. The calling code looks like this: declare a_record package_name.record_name; cursor c_symbols is select package_name.function_name('argument') from dual; begin open c_symbols; loop ...

How do database naming conventions change for multitenant applications?

For multitenant databases, to you name tables differently based on: Whether the table will host multiple tenants or just rely on the exist of a tenant column If you support multiple "applications" such as salesforce.com, do you prefix the application name to the table? Do you try to keep the names the same across tables where it may no...

Can NVL Function be Cascaded?

can nvl() function be cascaded,...it was asked me in IBM interview .....and why???? ...

Character set mismatch

Hi All, I have a SQL statement like this: SELECT a.ColumnA, b.ColumnB || CASE WHEN TRIM(c.ColumnC) IS NOT NULL THEN ' (' || c.ColumnC || ')' ELSE '' END AS ClassName FROM TableA a INNER JOIN TableB b ON a.SomeColumn = b.SomeColumn INNER JOIN TableC c on a.SomeCol = c.SomeCol I'm getting an error "Character set mismatch" at the...

How to get the rowid back from an ExecuteOracleNonQuery in C#

I'm using an ExecuteOracleNonQuery in C# to INSERT a record into my Oracle database using a stored procedure but can't seem to get the ROWID to return. In C# ... using (OracleConnection oc= new OracleConnection(AppConfiguration.ConnectionString)) { OracleCommand myCommand = new OracleCommand("PKG_TEST.INSERT", oc); myComma...

No results from Oracle query in VB ASPX

New Why would a VB/ASPX page not return results for a query which runs fine with other Oracle clients? (Same username) Old The following code should first output the query and then execute it outputting a single exclamation point per record. However, it outputs the query (as it should), but does not return any rows (nor error). If I...

What is the difference between a hash join and a merge join (Oracle RDMBS )?

What are the performance gains/losses between hash joins and merge joins, specifically in Oracle RDBMS? ...

Oracle 11g Cold Restore?

Is there a way to restore an Oracle 11g instance from raw data files only? What is the minimum amount of information needed to reconstruct the config files? ...

Oracle data provider (ODP.NET) not listed in DbProviderFactories

I want to use the DbProvider class to construct a generic DAL component. This will be convenient when switching between different database providers. On a machine with Oracle 2.2 installed the Oracle provider ODP.NET is not listed when trying to list up all the database providers available on the machine. DataTable dtable = DbProvid...

Oracle SQL: Create Type Object with Reference to another?

Hey, I need some help ;) I got an Object object1 of the Type (id, ob1 REF object2, ob2 REF object2). These objects2 Types already exists, and I have to create a new object1 with references to the two differen object2 things. What I am trying right now: DECLARE t_ref REF object2; t_ref2 REF object2; BEGIN SELECT REF(*) INTO t_r...

Cheque Number problem

Hi Experts, I have a column called check_num (bank check number) as VARCHAR2 type in a payment_line table(Oracle). The requirement is "I have to search all those checks which numbers are greater than 12345. Please suggest how can I achieve this? ...

Oracle performance using functions in where clause

Hi In a stored procedure (which has a date parameter named 'paramDate' ) I have a query like this one select id, name from customer where period_aded = to_char(paramDate,'mm/yyyy') will Oracle convert paramDate to string for each row? I was sure that Oracle wouldn't but I was told that Oracle will. In fact I thought that if the param...

Oracle requests proxy

Hi I would like to monitor all the requests made to remote server. I was thinking to create a local proxy server, make all the requests to my local server and then server connects to remote server. There a millions of other ways to solve this, but currently there is no better solution for an big and old asp site and slow and old develo...

What's the syntax of calling a stored procedure in oracle

Little help needed here. I'm new to Oracle and i'm not understaning the the syntax of calling a store procedure that has a single in-out parameter. Any example please? ...

Is there a way to remotely deploy EAR to Oracle AS using maven?

Is there a way to remotely deploy an EAR after building it to Oracle AS? Remote deployment functionality exists for Eclipse, and I'm looking for something similar for maven2: http://download.oracle.com/docs/cd/E14545_01/help/oracle.eclipse.tools.weblogic.doc/html/conFeatureOverview.html#remoteDep ...

execute immediate over databse link

Is it possible to execute dynamic PL/SQL on a remote database via a databse link? I'm looking for something like: l_stmt := 'begin null; end;'; execute immediate l_stmt@dblink; The syntax above is obviously wrong, I get PLS-00201: identifier 'L_STMT@DBLINK' must be declared. It is possible to create a procedure remotely and then exe...

How do you strip leading spaces in Oracle?

I need to strip leading spaces from a column in Oracle. I've Googled but haven't found any answers except to write my own function which I'd like to avoid. What's the easiest way to accomplish this? ...

How to tie-out with VBA, Oracle, and Excel using INDEX & MATCH functions?

Hi, I am trying to create a program using VBA that queries my oracle database data (in this case pipelines) against a spreadsheet and produces an output of the tie-out on the same workbook (but on another sheet). I would like to use the INDEX and MATCH functions on the tie-out page but have trouble figuring it out. Here is what I have so...

How do I get the current year using SQL on Oracle?

I need to add the current year as a variable in an SQL statement, how can I retrieve the current year using SQL? i.e. BETWEEN TO_DATE('01/01/**currentYear** 00:00:00', 'DD/MM/YYYY HH24:MI:SS') AND TO_DATE('31/12/**currentYear** 23:59:59', 'DD/MM/YYYY HH24:MI:SS') ...

Microsoft Data Access Application Block Date type precision

We are working on an ASP.Net/VB.Net application using Enterprise Library for our data access (DAAB). We are trying to store DateTime values in an Oracle Date field. However, the precision is being lost. Currently only the year, month, and date are being stored. We need better precision than this. Oracle Dates are supposed to "includes...