ODP.NET :: Can Multiple Calls Execute Within Single Oracle Session

May 8, 2013

Can multiple ODP.NET calls potentially execute within a single Oracle session due to connection pooling?

How can I test/observe this behavior?

We have an IIS application that uses one connection string for all logged in users and call aspx pages.

View 1 Replies


ADVERTISEMENT

SQL & PL/SQL :: How To Avoid Multiple Function Calls

Jul 23, 2013

I have a function that is being called three time using UNION and wanted to know if this can be improved to just one call while incorporating all the table joins.

select field1,fdate,fname,username,stepnum from (
SELECT M.FIELD1,
TO_CHAR (M.FIELD_DATE, 'MM/DD/YYYY HH24MISS') AS FDATE,
M.FIELDNAME AS FNAME,
M.USERNAME,

View 10 Replies View Related

SQL & PL/SQL :: Replacing Multiple Calls To Function By Table Joins

Dec 15, 2010

The following query calls the function get_meter_desc 8 times.

SELECT iu.instd_unit_id, iu.fk_cust_id, bill_cd,
iu.mfg_prod_cd, iu.mfg_prod_seq_no, ccequip.fk_mkt_cd,
eff_tmstmp, cust_ord_id, ord_dt, iu.xnac_co_cd,
iu.xnac_div_cd, smmr_wvr_cd, warr_expn_dt,
iu.auto_replen_ind, iu.ms_stat_cd,
inst_dist_id, instn_dt, iu.last_auto_dt,
iu.replen_freq_vlu, cpc_pln_cd, std_sply_ind,
emcv_total_qty, tot_actl_cpy_qty, init_emcv_tot_qty, ms_tran_cd,
[code]...

How can I replace the function call by the join in the main query?

View 19 Replies View Related

Windows / .NET :: Multiple Oracle ODBC Drivers In Single Database

Jan 9, 2013

I work in a large bank in a department that produces reports for different areas of the bank. By and large, we use Microsoft Office products to interface with our Oracle databases.Recently, we had two new databases come online that use Oracle 11g - we were not using any 11g databases before this point. We have two other databases that we use that run on Oracle 10g.

Up until the two new databases were brought in, our reporting was done from systems that used 10g and 9I. We all ran the Oracle 9I driver to connect to them, and it worked very well without issue. With the addition of the 11g databases to our reporting pool, we have been forced to upgrade our ODBC connections to the 11g driver, and it has not gone well at all. I had one query that typically ran in 30 minutes take +13 hours+ to run yesterday. Speed is not the only issue, either; we have sporadic ODBC call fails, crashes, and other general failures to deal with.

Our Oracle DBAs have been trying to solve the issue, but have not yet found a solution, and each day that this goes on we fall further and further behind, as I have daily time-sensitive reports to send out that depend on this data.

One of our DBAs said she read somewhere that Oracle had not included MS Access support in the 11g driver, and that the errors were due to the imperfect connection that the driver created. I don't know of there's any truth to that, but it would provide an explanation for our troubles. We have to use Access for our reporting, as over 90% of our existing reports and processes use Access, and having to change over everything at once is just not feasible.

Is there any way to force the 9I and 11g ODBC connections to coexist, so that we don't have to use the 11g driver for our 10g databases? Or is there a better 11g driver available?

View 2 Replies View Related

PL/SQL :: Single Long Connection Vs Multiple Short Connections To Oracle Server

Oct 8, 2012

A DB server (Oracle 11g) on Linux will support a Web Application Server (Java based) for hosting a public web site.For sending multiple INSERT statements over from the Java Server to Oracle Server, I have two ways to do it:

1) Wrap those insert statements together and send it over with one connection to Oracle

2) Send each insert statement separately to Oracle. As the result, multiple insert statements are sent and accordingly multiple connections to Oracle are needed.

Advantage of option 1 is just using one Connection. Disadvantages are that Oracle will then need to parse the statement string into multiple separate insert statements, and then loop through them to execute each. This may be costly in CPU sense.

While the option 2 may have quicker execute of each insert statement, but will need to create multiple connections.If the number of users is known and stable (such as intranet), I would prefer option 1; while for the internet there could hundreds concurrent users at the peak, I lean towards the option 2.

View 2 Replies View Related

SQL & PL/SQL :: Structure Schemas Within Single Oracle Instance To Support Multiple Project Development

Jan 24, 2013

The best way to structure my schemas within a single Oracle instance to support multiple project development. At the moment, within an Oracle instance I have Area_Dev and Area1_Test schemas, with the intention that Project Xv1.0 would use Dev schema for development and Test schema for testing.

Lets say I want to start on Project Xv2.0 development while I am still finalizing Project Xv.10 development what is the best way of accommodating that, without creating individual schemas for each project?

View 3 Replies View Related

Install Multiple Versions Of Oracle Databases 10GR2 And 11GR2 In A Single Node?

Oct 28, 2010

ORACLE DBA
EXPERTS

�I can install multiple versions of Oracle databases 10GR2 and 11GR2 in a single node using a unique Oracle ASM single instance?

View 6 Replies View Related

PL/SQL :: Merge Multiple Rows Into Single Row (but Multiple Columns)

Oct 17, 2012

How to merge multiple rows into single row (but multiple columns) efficiently.

For example

IDVal IDDesc IdNum Id_Information_Type Attribute_1 Attribute_2 Attribute_3 Attribute_4 Attribute_5
23 asdc 1 Location USA NM ABQ Four Seasons 87106
23 asdc 1 Stats 2300 91.7 8.2 85432
23 asdc 1 Audit 1996 June 17 1200
65 affc 2 Location USA TX AUS Hilton 92305
65 affc 2 Stats 5510 42.7 46 9999
65 affc 2 Audit 1996 July 172 1100

where different attributes mean different thing for each Information_type. For example for Information_Type=Location

Attribute_1 means Country
Attribute_2 means State and so on.

For example for Information_Type=Stats

Attribute_1 means Population
Attribute_2 means American Ethnicity percentage and so on.

I want to create a view that shows like below:

IDVal IDDesc IDNum Country State City Hotel ZipCode Population American% Other% Area Audit Year AuditMonth Audit Type AuditTime
23 asdc 1 USA NM ABQ FourSeasons 87106 2300 91.7 46 85432 1996 June 17 1200
65 affc 2 USA TX AUS Hilton 92305 5510 42.7 46 9999 1996 July 172 1100

View 1 Replies View Related

PL/SQL :: How To Set Multiple Parameters In One EXECUTE IMMEDIATE Sql

Jun 26, 2012

I want to set both nls_language and nls_date_language, and set them as different languages. fnd_global.set_nls_context() doesn't work. So I think maybe I can use the EXECUTE IMMEDIATE, and add them together into one statement.

View 7 Replies View Related

Execute Immediate Command For Multiple Rows?

Mar 25, 2007

I have to build a select query but its where conditions will be retrieved from a table. I was told that the execute immediate command can handle it.

lets say i have this:

string_var:= 'select field1, field2, field3
from mytable
where' ' || i.condition_selection || ';'

If the above select resuls in a single row, i could do this:

EXECUTE IMMEDIATE string_var INTO var_field1, var_field2, var_field3;

In my case the select will return multiple rows. How do I proceed ?

View 4 Replies View Related

Client Tools :: Execute Multiple SQL Files In BAT File

Nov 27, 2012

Is it possible to execute multiple sql files in one .bat file?for single sql file it is working properly.

.bat file
-------------------------------

sqlplus /nolog @ c: est01.sql

View 5 Replies View Related

PL/SQL :: Procedure To Execute Multiple Statements As A Batch Script

Jul 16, 2012

here's my question.

(I'm using PL/SQL Developer with Oracle 10g)

I have an table 'tbcontrol' where for each row I can have one or more sql statements (DML or DDL) in an column.

Example:

task | sql_scripts
1 | create table t1 (c1 number); insert into t1 (c1) values 100;
2 | create table t2 (c2 number); alter table t1 modify c1 not null default 0;
3 | alter table t2 modify c2 not null default 0; alter table t1 add c10 varchar2(10); create table t3 (c3 number not null default 0;

I need to create a procedure where I can pass an task number to execute the sql statements which are in the column 'sql_scripts'. Something like this:

create or replace sp_run_scripts (v_task number)
is
v_scripts varchar2(2000);
begin
select sql_scripts into v_scripts from tbcontrol where task = v_task
execute immediate v_scripts;
end;

But, here I'll have some problems:

- The script will have semicolons (EXECUTE IMMEDIATE doesn't support);
- If I put a begin/end like a PL/SQL script, I can only run DML statements because DDL statements have implicit commit.
- I can't use a cursor for execute each statement at a time because the scripts have multiples-rows. Even if I search for semicolons to 'separate' the scripts in the cursor (using SUBSTR and INSTR functions), I'll have problems with the semicolons between '' (quotations marks).

Now, I admit I'm lost.

Is there another way to make this process work?

View 20 Replies View Related

Single To Multiple Records

Sep 18, 2013

I have a table as col_1 number,col_2 varchar2(10)

col_1 col_2
1 abcdefghijkl

what i want is i've to split

col_1 col_2
1 abcdefghij
1 kl

View 4 Replies View Related

SQL & PL/SQL :: Getting Multiple Rows To Single?

Mar 24, 2010

I have records:

owner company
A X
A Y
A Z
B X
B Y
C X

owner companyX companyY companyZ
A 1 1 1
B 1 1 0
C 1 0 0

How do I write the SQL?

View 2 Replies View Related

PL/SQL :: Multiple Records In Single Row?

Jul 8, 2013

I want to insert multiple records in a single row. Example:  I have a below query  

select '"'||c1||'","'||c2||'","'||c3||'"'from (select 'ABC' as C1,'ZYX' as C2,'TEST' AS c3from dual unionselect 'A1' as C1,'a2' as C2,'A3' AS c3from dual)

And I want to insert the above 2 records in table T1 as a single row as below: 

"A1","a2","A3""ABC","ZYX","TEST" Column1"A1","a2","A3""ABC","ZYX","TEST"

View 6 Replies View Related

PL/SQL :: Multiple Row Convert Into Single Row

Jan 4, 2013

How do I convert multiple rows into single row data. For example.....

I am looking for oracle query for below table output that would have a sql query output as query output below.

I was trying with connect by but was unable to prepare query.

Table output_
   ---------------------------
    ID      TYPE        VALUE
    ---------------------------
    1012    1           2
    1012    6           77
    1015    1           1
    1015    6           78
    1018    1           2
    1018    6           79

Query output_

    ----------------------------   
    ID      VALUE1      VALUE2
    ----------------------------
    1012    2           77
    1015    1           78
    1018    2           79

View 5 Replies View Related

SQL & PL/SQL :: Replace Multiple Value In Single Column?

Jun 7, 2011

I am facing some problem, while fetching the result that I want to. I have a table with name "test", there are two columns:

"id" type int
"text_data" type varchar2(2000)

Sample Data:
ID TEXT_DATA
------- ------------
10 Hi Deepak, My designation id is dsha21. Thanks Rohit

Now I tried to replace the value for "Deepak","dsha21" and "Rohit" using nested replace function and I succeded but that was for static. Now while creating SQL procedure where I am going to make the values of "Deepak","dsha21" and "Rohit" some static variables. I want to pass the values to be replaced with static parameter.

If I give you simple example of my requirement that would be example of a sms send to all customers by a telephone company. Content is same only the Name of customer is replaced everytime.

View 10 Replies View Related

SQL & PL/SQL :: How To Convert Single Row Into Multiple Rows

Feb 28, 2012

CREATE TABLE T1 ( id NUMBER,
START_date DATE,
end_date DATE,
end_date1 DATE,
end_date2 DATE,
end_date3 DATE,
LEVEL1 number
)
/

[Code]...

I have data in the first table as mentioned above I need to insert multiple rows into the second table for the same ID depends on the level, If it is level 1 then two rows for same ID first reocrd start_date as the start_date and end_date as end_date from the table t1 for second record start_date is end_date in t1 and end_date for this record is end_date1 column in table t1.

If the level is 3 then the table t2 should have four records for one id and the phase is the value for each record for one ID for example in level 3 we have 4 records for one id and phase should be 1,2,3,4.

View 3 Replies View Related

SQL & PL/SQL :: Multiple Selects In Single Query

Apr 10, 2012

how does this query execute? what kind of a query is this called?

mysql> select ename,(select dname from dept where deptno=e.deptno ) as dname -> from emp e;

+--------+------------+
| ename | dname |
+--------+------------+
| SMITH | RESEARCH |
| ALLEN | SALES |
| WARD | SALES |
| JONES | RESEARCH |
| MARTIN | SALES |
| BLAKE | SALES |
| CLARK | ACCOUNTING |
| SCOTT | RESEARCH |
| KING | ACCOUNTING |
| TURNER | SALES |
| ADAMS | RESEARCH |
| JAMES | SALES |
| FORD | RESEARCH |
| MILLER | ACCOUNTING |
+--------+------------+
14 rows in set (0.00 sec)

View 8 Replies View Related

SQL & PL/SQL :: Transform Single Row Into Multiple Rows?

Mar 22, 2013

writing the sql, to transform a single row into multiple rows. I am trying to create multiple rows based on a value of a column in the table.In the below example, I am trying to create the rows based on the 'Col2' values. find the below example:

Original table data:

Col1 Col2 Col3 Col4

Row1 a1 a,b,c 01 ON
Row2 b1 d,e,f 02 OFF
Row3 c1 g,h 03 ON

I want the above table to be transformed into below:

Col1 Col2 Col3 Col4

Row1 a1 a 01 ON
Row1 a1 b 01 ON
Row1 a1 C 01 ON
Row2 b1 d 02 OFF
Row2 b1 e 02 OFF
Row2 b1 f 02 OFF
Row3 c1 g 03 ON
Row3 c1 h 03 ON

View 2 Replies View Related

SQL & PL/SQL :: Multiple Tasks For Single SR - Over Partition By

Jan 27, 2012

I have a scenario where the requirement is to create a "SEQ NO". Based on the 'Tasks' & it's creation date. Where there are multiple 'tasks' for a single SR.

The following example will make it clear
SR TASK Created on SEQ NO
11009 2345 14/10/1988 12:15:17 1
11009 2346 14/10/1988 12:15:57 2
11234 - - -

If there is a SR which has no task then the SEQ NO should be 0. And the seq no should be in the order of the created on field & if 2 tasks are created at the same time i.e suppose 2345 & 2346 have the same time stamp then the SEQ no should be 1,2 respectively n not both as 1.

View 5 Replies View Related

PL/SQL :: Converting Multiple Column In Single?

Apr 9, 2013

need to create a table with single column by using select statement with multiple columns
For Ex- i have 1 row with 10 columns (may be more than 10) like
'A','B','C','D','E','F','G','H',I','J'
i written sql like
select 'A','B','C','D','E','F','G','H','I','J' from dual

result is - 'A','B','C','D','E','F','G','H','I','J' with 10 columns

Now i need output lik this using SQL
Text
------
'A'
'B'
'C'
'D'

[code]...

sort out this problem.

View 6 Replies View Related

PL/SQL :: Multiple IF Else Statement In A Single Select?

Oct 17, 2012

I want to run multiple IF Else statements in a single select SQL, each statement is one SQL operating on the same table, what is the best way to write this select SQL query ? If it is PL/SQL, when i get the result from the first IF statement I will skip the remaining execution, and so on..

View 9 Replies View Related

PL/SQL :: Single Query Return Multiple Value

Sep 6, 2012

I have a sql query as below :

select order_number,
(select decode(hcp.contact_point_purpose,'ABC',hcp.email_address,'CDE',hcp.email_address,null)
from hz_contact_points,
hz_parties hz
WHERE hz.party_id=hcp.owner_table_id) Email
FROM oe_order_headers_all h
WHERE h.order_number='102'
....................
..............

Actually the problem i am facing is the inner select query is returning multiple row , so my main query is erroring out, i need to capture the multiple row.

In the above example the inner decode statement returning two mail address, I need to capture that, but while executing the whole query it is erroring out as saying single query returns multiple values. capture multiple values

View 3 Replies View Related

Application Express :: Re-execute Single SQL Report On Multi-Report Page

Oct 25, 2013

I have a Page containing 3 reports and I was wondering if it is possible to re-execute only one of the these reports using a button or preferably a Select List which allows me to choose which of the 3 reports I wish to 'refresh/re-execute'. I may be totally wrong here but I assumed that choosing the option to submit a Page will cause all regions to refresh i.e. re-execute the SQL queries they are 'based on'.

View 6 Replies View Related

Fetching Multiple Rows For Single Column

Jun 25, 2012

I am trying to write a script where a particular post code from a table is having more than 3 telephone numbers.Both the columns are in the same table. How to fetch.

Table is P_Order
Columns are DELIVERY_POSTCODE and TEL_NO...
Condition DELIVERY_POSTCODE has more than 3 TEL_NO

View 1 Replies View Related

Forms :: Single Datablocks Used In Multiple Frame

Sep 26, 2010

I have created tab canvases in the tab canvas there is three tab pages.and i have been used one datablock(use the datablock wizard) all the table column(items) is displayed only in the single tab pages--frames.for example

datablock--items_1.

tabcanvases--tabpages_1--frames_1--display all datablock item.
--tabpages_2--frames_2--none to display.
--tabpages_3--frames_3--none to display.

so i want to display datablock in all the three frames.

View 3 Replies View Related

SQL & PL/SQL :: Multiple Submit Button In A Single Form

Jul 21, 2011

My current system have 1 submit button with single form. This submit button will call *file_content.upload*.

htp.p('function on_submit() {');
htp.p('...the rest of my code here..');
htp.p('document.forms[0].submit();');
htp.p('return true;');
htp.p('}');
htp.p('<form enctype="multipart/form-data" method="post" action="file_content.upload">');
htp.p('...the rest of my code here..');
htp.p('<input type="button" id="btn_Submit" value="Submit" onclick="on_submit()"></form>');

My question is, i want to enhance this by adding additional 1 submit button with value "Save". But this new "Save" button will call/trigger different file. This new button will call *file_content.update*. How to accomplish this and how to differentiate these 2 button?

htp.p('<input type="button" id="btn_Submit" value="Submit" onclick="on_submit()"> 
<input type="button" id="btn_Save" value="Save"></form>');

View 12 Replies View Related

SQL & PL/SQL :: Get Single Row From Multiple Duplicate Values Of One Field?

Sep 10, 2012

CREATE TABLE prim_tbl
(id NUMBER,--- id is not primary key here
description VARCHAR2(30));

INSERT ALL
INTO prim_tbl VALUES (1,'aad')
INTO prim_tbl VALUES (1,'aads')
INTO prim_tbl VALUES (2,'bb')
INTO prim_tbl VALUES (2,'cc')
INTO prim_tbl VALUES (2,'dd')
SELECT * FROM dual;

I want to select the ids only one time, i.e my output will have only two rows: one row with id as 1 and other row with id 2 whatever be the description.

desired output sample:

Quote:1, aad
2, bb

I used:
select distinct(id),description from prim_tbl;

but it did not give the required result.How can I get it??

View 6 Replies View Related

SQL & PL/SQL :: Select Multiple Values Into Single Column

Oct 5, 2011

I have following tables with data as under:

table1: table2:
column1 (char) column1 (char) column2 (num)
A A 10
B A 20
C B 15
D C 12
E D 25
D 9

I need to generate output as :

column1 column2
A A10, A20
B B15
C C12
D D25,D9
E null

Is there anyway to achieve this thru simple SELECT ...and if not, then thru any PL/SQL construct..?

View 5 Replies View Related







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