PL/SQL
Hi All,
Database Version: 11.2.0.3.0
We have requirement below:
From the java application one of our database procedure will be called, and one of the input parameter for the procedure is part_number and it can contain multiple values, so the java sends the part numbers with comma as the separator. we will be receiving all the values into a single variable.
Now i need loop through these part numbers one after the other, but as of now all the part number are in a single variable, How can i achieve this.
Example
l_part_num VARCHAR2(500):='9HH131-187','9HH131-188','9HH131-189';
Thanks and Regards
Srinivas
Use Collections to store the Comma Separated data.
set serveroutput on;
begin
proc('abc,def,ghi,jkl');
end;
create or replace procedure proc(p_inp in varchar2)
is
type typ is table of varchar2(10);
vals typ;
begin
select regexp_substr(p_inp, '[^,]+', 1, level)
bulk collect into vals
from dual
connect by level <= length(p_inp) - length(replace(p_inp, ','));
for i in 1..vals.count loop
dbms_output.put_line('Val :: ' || vals(i));
end loop;
end;
anonymous block completed
Val :: abc
Val :: def
Val :: ghiI will still recommend to correct the design by incorporating correct datatypes. See an example by Tom Kyte,
Passing an Array from java to Oracle.
Similar Messages
-
Logical Operations in SQL decode function ?
Hi,
Is it possible to do Logical Operations in SQL decode function
like
'>'
'<'
'>='
'<='
'<>'
not in
in
not null
is null
eg...
select col1 ,order_by,decode ( col1 , > 10 , 0 , 1)
from tab;
select col1 ,order_by,decode ( col1 , <> 10 , 0 , 1)
from tab;
select col1 ,order_by,decode ( col1 , not in (10,11,12) , 0 , 1)
from tab;
select col1 ,order_by,decode ( col1 ,is null , 0 , 1)
from tab;
Regards,
infan
Edited by: user780731 on Apr 30, 2009 12:07 AM
Edited by: user780731 on Apr 30, 2009 12:07 AM
Edited by: user780731 on Apr 30, 2009 12:08 AM
Edited by: user780731 on Apr 30, 2009 12:08 AM
Edited by: user780731 on Apr 30, 2009 12:09 AMexample:
select col1 ,order_by,case when col1 > 10 then 0 else 1 end
from tab;
select col1 ,order_by,case when col1 <> 10 then 0 else 1 end
from tab;
select col1 ,order_by,case when col1 not in (10,11,12) then 0 else 1 end
from tab;As for testing for null, decode handles that by default anyway so you can have decode or case easily..
select col1 ,order_by,decode (col1, null , 0 , 1)
from tab;
select col1 ,order_by,case when col1 is null then 0 else 1 end
from tab; -
Unable to capture the parameter values from a PL/SQL procedure
hi.
i'm trying to capture the parameter values of a PL/SQL procedure by calling inside a anonymous block but i'm getting a "reference to uninitialized collection error" ORA-06531.
Please help me regarding.
i'm using following block for calling the procedure.
declare
err_cd varchar2(1000);
err_txt VARCHAR2(5000);
no_of_recs number;
out_sign_tab search_sign_tab_type:=search_sign_tab_type(search_sign_type(NULL,NULL,NULL,NULL,NULL));
cntr_var number:=0;
begin
rt843pq('DWS','3000552485',out_sign_tab,no_of_recs,err_cd,err_txt);
dbms_output.put_line('The error is ' ||err_cd);
dbms_output.put_line('The error is ' ||err_txt);
dbms_output.put_line('The cntr is ' ||cntr_var);
for incr in 1 .. OUT_SIGN_TAB.count
loop
cntr_var := cntr_var + 1 ;
Dbms_output.put_line(OUT_SIGN_TAB(incr).ref_no||','||OUT_SIGN_TAB(incr).ciref_no||','||OUT_SIGN_TAB(incr).ac_no||','||OUT_SIGN_TAB(incr).txn_type||','||OUT_SIGN_TAB(incr).objid);
end loop;
end;
Error is thrown on "for incr in 1 .. OUT_SIGN_TAB.count" this line
Following is some related information.
the 3rd parameter of the procedure is a out parameter. it is a type of a PL/SQL table (SEARCH_SIGN_TAB_TYPE) which is available in database as follows.
TYPE "SEARCH_SIGN_TAB_TYPE" IS TABLE OF SEARCH_SIGN_TYPE
TYPE "SEARCH_SIGN_TYPE" AS OBJECT
(ref_no VARCHAR2(22),
ciref_no VARCHAR2(352),
ac_no VARCHAR2(22),
txn_type VARCHAR2(301),
objid VARCHAR2(1024))............We don't have your rt843pq procedure, but when commenting that line out, everything works:
SQL> create TYPE "SEARCH_SIGN_TYPE" AS OBJECT
2 (ref_no VARCHAR2(22),
3 ciref_no VARCHAR2(352),
4 ac_no VARCHAR2(22),
5 txn_type VARCHAR2(301),
6 objid VARCHAR2(1024))
7 /
Type is aangemaakt.
SQL> create type "SEARCH_SIGN_TAB_TYPE" IS TABLE OF SEARCH_SIGN_TYPE
2 /
Type is aangemaakt.
SQL> declare
2 err_cd varchar2(1000);
3 err_txt VARCHAR2(5000);
4 no_of_recs number;
5 out_sign_tab search_sign_tab_type:=search_sign_tab_type(search_sign_type(NULL,NULL,NULL,NULL,NULL));
6 cntr_var number:=0;
7 begin
8 -- rt843pq('DWS','3000552485',out_sign_tab,no_of_recs,err_cd,err_txt);
9 dbms_output.put_line('The error is ' ||err_cd);
10 dbms_output.put_line('The error is ' ||err_txt);
11 dbms_output.put_line('The cntr is ' ||cntr_var);
12 for incr in 1 .. OUT_SIGN_TAB.count
13 loop
14 cntr_var := cntr_var + 1 ;
15 Dbms_output.put_line(OUT_SIGN_TAB(incr).ref_no||','||OUT_SIGN_TAB(incr).ciref_no||','||OUT_SIGN_TAB(incr).ac_no||','||OUT_SIGN
TAB(incr).txntype||','||OUT_SIGN_TAB(incr).objid);
16 end loop;
17 end;
18 /
The error is
The error is
The cntr is 0
PL/SQL-procedure is geslaagd.Regards,
Rob. -
Unable to capture SQL Server Schema
I am trying to capture SQL Server 2005 demo schema (AdventureWorks). It does shows the numbers of Tables/Indexes captured..but finishes with this error..
Error ocurred during capture: Exhausted Resultset
Column not found. Skipping index detail on index 'IX_StoreContact_ContactTypeID'
Column not found. Skipping index detail on index 'IX_StoreContact_ContactID'
Column not found. Skipping index detail on index 'AK_StoreContact_rowguid'
Column not found. Skipping index detail on index 'IX_ProductVendor_VendorID'
Column not found. Skipping index detail on index 'IX_ProductVendor_UnitMeasureCode'
Column not found. Skipping index detail on index 'IX_Address_StateProvinceID'
Column not found. Skipping index detail on index 'IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCode'
Column not found. Skipping index detail on index 'IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCode'
Column not found. Skipping index detail on index 'IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCode'
Column not found. Skipping index detail on index 'IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCode'
Column not found. Skipping index detail on index 'IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCode'
Column not found. Skipping index detail on index 'AK_Address_rowguid'
Column not found. Skipping index detail on index 'AK_Department_Name'
Any help is appreciated..
AjayHi Nandu,
As your description, you come across an error(vsjitdebugger.exe cannot be found). Please confirm if the error occurs during the installation of SQL Server 2012. If so, please help post SQL Server setup logs. By default, SQL Server setup log file locates
in C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log.
Base on my research, this error could be caused by that the previous uninstallation is improper and vsjitdebugger.exe file could be mistakenly deleted.
To troubleshoot the issue, you could start your computer into Safe Mode and fix your problem with one of the following methods. For more information, please refer to the article:
http://www.fixerrorkit.com/fix-error/fix-vsjitdebugger.exe-error.html.
1. You could execute the sfc /scannow command following steps below.
a. Press "Windows+R", type in cmd and then right click "Run as administrator"
b. Type in sfc /scannow (There's a space between sfc and /scannow) into the dialog and hit Enter key and click ok.
c. Wait until the System File Checker finishes the check.
2. You could use a Windows repair installation, also known as a Startup Repair to repair your Windows system files.
3. You could install the latest Windows updates to fix vsjitdebugger.exe error. Microsoft often releases new service packs and system patches to replace or update some DLL files of Windows system.
4. You could use third-party tool such as Automatic Error Fix Tool to fix your vsjitdebugger.exe error. However, Microsoft cannot make any representations regarding the quality, safety, or suitability of any third-party software or information found there.
In addition, if you are unable to install Visual Studio, I suggest you post your question in Visual Studio Setup and Installation forum at
https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vssetup . It is appropriate and more experts will assist you.
Regards,
Michelle Li -
NoClassDefFoundError: com/sap/sql/log/OpenSQLException
I have developed a Java project. It consists of 2 SQLJ files and then a Java class. When I try to execute the Java program, I get a Java error:
java.lang.NoClassDefFoundError: com/sap/sql/log/OpenSQLException
at com.mbb.crrs.business.report.dao.ReportDAO.<init>(ReportDAO.sqlj:23)
at com.mbb.crrs.business.report.dao.Test.main(Test.java:24)
Exception in thread "main"
I notice a similar problem on message: Re: Which jar to include com.sap.sql.log.OpenSQLException
Is that something that I need to maintain for it to work? Thank you.Hi,
the problem one year ago was that the SQLException class was not available through remote access. I don't know if that might have been changed meanwhile in the latest release.
I implemented a simple work around: I caught every SQL-exception in the method where it was thrown, wrapped the exception message and any nested exception in a self written exception and threw this new exception. That worked fine.
Regards, Astrid -
AND / OR truth table in SQL
why null is introduced in the AND and OR truth table?when will a statement/part of a statement return a null value??
|AND |True |False |NULL?? |
|True |True |False |Null |
|False |False |False |False |
|Null |Null |Null |Null |is it introduced in AND/OR truth table for the null containing row(s)??
select employee_id,last_name,job_id,salary
from employees
wheere salary >= 1000
And job_id like '%man%';
how the statement after the where cluz can return null value??Edited by: sayantan chakraborty on Aug 14, 2009 11:36 AMsayantan chakraborty wrote:
how either of X and Y will return a null value?can you put any example?is there any syntax/ command which will print the return value of a statement as null?Say you had a table with columns X and Y. As long as NOT NULL constraints WERE NOT defined these values could contain NULLs. Then if you apply the WHERE condition of X = Y you would have the case of NULL = NULL which results in UNKNOWN.
Simple Example:
SQL > WITH test_data AS
2 (
3 SELECT 1 AS X, 1 AS Y FROM DUAL UNION ALL
4 SELECT 2 AS X, 2 AS Y FROM DUAL UNION ALL
5 SELECT 3 AS X, 5 AS Y FROM DUAL UNION ALL
6 SELECT 4 AS X, 6 AS Y FROM DUAL UNION ALL
7 SELECT 1 AS X, NULL AS Y FROM DUAL
8 )
9 SELECT *
10 FROM test_data
11 WHERE X = Y
12 /
X Y
1 1
2 2 -
regarding the following sql:
SELECT a.lname, a.fname, a.user_id, c.address, c.city,
c.zip, c.addresstypeid, d.descriptor as state
FROM users a, address c, maintstatetype d
WHERE a.user_id = c.user_id(+)
AND c.statetypeid = d.statetypeid(+)
AND c.addresstypeid in (1,2,3,4)
I have a database of users and addresses. Each user can
have multiple addresses and the addresses are
designated by addresstypeid. In plain english, what I want
to pull is "If they have an addresstypeid of 1, pull that one
only, if not, check if they have a 2 and use that, if not, check
for a 3, etc..".
Any help with this?What you want, then, is to pull the address with the minimum addresstypeid ..
SELECT a.lname, a.fname, a.user_id, c.address, c.city,
c.zip, c.addresstypeid, d.descriptor as state
FROM users a, address c, maintstatetype d
WHERE a.user_id = c.user_id(+)
AND c.statetypeid = d.statetypeid(+)
AND c.addresstypeid =
(select min(c2.addresstypeid)
from address c2
where c2.userid=a.userid
I'm not sure what this will do to your outerjoin, though. You might have to get funky with a union ...
SELECT a.lname, a.fname, a.user_id, c.address, c.city,
c.zip, c.addresstypeid, d.descriptor as state
FROM users a, address c, maintstatetype d
WHERE a.user_id = c.user_id
AND c.statetypeid = d.statetypeid
AND c.addresstypeid =
(select min(c2.addresstypeid)
from address c2
where c2.userid=a.userid
Union all
SELECT a.lname, a.fname, a.user_id, to_char(null), to_char(null),
to_char(null), to_char(null), to_char(null)
FROM users a
WHERE not exists
(select 1
from address c
where c.userid=a.userid
) -
If statement in reqular sql statement
Hi everyone;
I am trying to alter some trigger if I am in a certain environment. here what I am trying to do in pseudo-code
if ((select dbenv from environments) = 'DEV') THEN
ALTER TRIGGER XXX disable;
end if;
this sql script will be run from sqlplus' comand line
reminder I don't want to do that from package or a procedurethis to just explain
i think select in the IF is not allowed that way please see the examples below
SQL> ed
Wrote file afiedt.buf
1 DECLARE
2 vename VARCHAR2(10);
3 BEGIN
4 SELECT ename INTO vename FROM EMP WHERE ename='BLAKE';
5 IF vename='BLAKE' THEN
6 DBMS_OUTPUT.PUT_LINE('data found');
7 ELSE
8 DBMS_OUTPUT.PUT_LINE('no data found');
9 END IF;
10* END;
11 /
data found
PL/SQL procedure successfully completed.
SQL> ed
Wrote file afiedt.buf
1 DECLARE
2 vename VARCHAR2(10);
3 BEGIN
4 --SELECT ename INTO vename FROM EMP WHERE ename='SMITH';
5 IF ((SELECT ename FROM EMP WHERE ename ='SMITH')='BLAKE') THEN
6 DBMS_OUTPUT.PUT_LINE('data found');
7 ELSE
8 DBMS_OUTPUT.PUT_LINE('no data found');
9 END IF;
10* END;
SQL> /
IF ((SELECT ename FROM EMP WHERE ename ='SMITH')='BLAKE') THEN
ERROR at line 5:
ORA-06550: line 5, column 7:
PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
( - + case mod new not null others <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev sum variance
execute forall merge time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
ORA-06550: line 5, column 50:
PLS-00103: Encountered the symbol ")" when expecting one of the following:
. ( * @ % & - + ; / at for mod rem <an exponent (**)> and or
group having intersect minus order start union where connect
||
but this is allowed
SQL> ed
Wrote file afiedt.buf
1 DECLARE
2 vename VARCHAR2(10);
3 BEGIN
4 --SELECT ename INTO vename FROM EMP WHERE ename='SMITH';
5 IF 'BLAKE'='BLAKE' THEN
6 SELECT ename INTO vename FROM EMP WHERE ename='SMITH';
7 DBMS_OUTPUT.PUT_LINE(vename);
8 ELSE
9 DBMS_OUTPUT.PUT_LINE('no data found');
10 END IF;
11* END;
SQL> /
SMITH
PL/SQL procedure successfully completed.formated
Message was edited by:
devmiral -
IF statement in SQL*Plus - how to do it
Hi,
In SQL*Plus script, I would like to keep conditional checking (IF statement) and proceed. For example, whatever is done in PL/SQL block below, want to do the same in SQL*Plus script, I know partly it can be done using VARIABLE keyword, conditional checking can be done using DECODE in SELECT statement, but I want to carry out a more complex requirement, hence I want to use IF statement somehow in SQL*Plus.
Another question, how to do spooling in PL/SQL script, it can be done using UTL_FILE, any other option is there to achieve this.
declare
v_ind_count int;
begin
select count(1) into v_ind_count from user_indexes where index_name = 'index_object_name';
IF v_ind_count > 0
THEN
dbms_output.put_line('index found');
ELSE
dbms_output.put_line('index does not exist');
END IF;
end;
/Hello,
SQL*PLUS has no scripting language. It can only execute SQL and PL/SQL scripts. There are some commands like SPOOL or SET but no commands for conditional statements. You should describe your requirements, maybe we can find a way.
Or you can search the forum, maybe your question has already been answered
[Google for SQL*PLUS + condition|https://www.google.de/search?q=site%3Aforums.oracle.com+"SQL*PLUS"+condition]
# {message:id=4189517}
# {message:id=4105290}
how to do spooling in PL/SQL scriptFrom within PL/SQL you can use dbms_output, the spool has to be started by the calling SQL script when it is executed in SQL*PLUS. Or you can use utl_file, but then you can only write to a server directory, not into a client file. To give an advice we need more information about what you want to do.
Regards
Marcus -
Partner Application written in other language than PL/SQL and Java
I have an application written in another language than PL/SQL or Java. I want to integrate this application as an Partner apps where I use the same user repository as Portal.
Can I integrate the application by calling a stored PL/SQL-procedure based on the PLSQL SSO APIs examples that authenticates the user based on the username/password in portal and redirects the user to the application ?
Are there any examples / references where this has been done ?
JensCheck out the PDK referance for URL-Services, which allow you to integrate with any web based service/content.
http://portalstudio.oracle.com/servlet/page?_pageid=350&_dad=ops&_schema=OPSTUDIO -
If table testrh2 has the following columns and data
col1 --> NULL
col2 --> 2
and table testrh has the following columsn and data
col1 --> NULL
How could I write a dynamic SQL statement to join on the nulls? I've written the following block as a starting point.
declare
cursor c1 is select col1 from isis.testrh;
lval varchar2(1000);
lval2 varchar2(1000);
begin
for r1 in c1 loop
lval := 'select col2 from isis.testrh2 where col1 = '||r1.col1;
execute immediate lval into lval2;
dbms_output.put_line(lval2);
end loop;
end;You can't compare null values with '=' in Oracle SQL.
Null can only be compared with <column> is null .
You can see it when you try these two queries:
select * from dual where null is null; -- you will see one row
select * from dual where null=null; -- you will see no rowsThat's why you have to write something like
(<column1>=<column1> or (<column1> is null and <column2> is null))This should also work with null:
decode(<column1>,<column2>,1,0)=1By the way, why do you use dynamic sql?
lval := 'select col2 from isis.testrh2 where col1 = '||r1.col1;
I think you could replace your two lines ( lval:= ... AND execute immediate) by this:
begin
select col2
into lval
from isis.testrh2
where decode(col1,r1.col1,1,0)=1;
dbms_output.put_line('lval='||lval);
exception
when no_data_found then
dbms_output.put_line('no data found'); -- or whatever you want
end;Edited by: hartmutm on 02.10.2010 23:54 -
How do I connect to SQL Server with Muse?
I want to query items from database and load it back to front end. Is there a way Muse can connect to sql server database?
You cannot connect to databases via Muse at the moment. Please refer: http://forums.adobe.com/message/5090145#5090145
Cheers,
Vikas -
Problem with item and/or data during page-processing-PS/SQL
Greetings!
On my page I have a custom report (from 2 tables) and a small form-field, that adds and edits data in the report. After generating the form with the wizard I added an extra item, to store the id from one of the tables from the report data.
Now, on submit a calculation should take place, that updates data according user input with a procedure in Page-Prosseses:
declare a number;
begin
case :PLATZ
when 1 then a:=100;
when 2 then a:= 50;
else a:=25;
end case;
update TBL_MITGLIEDER set TURNIERPUNKTE = TURNIERPUNKTE + a
where ID_MITGL = :P14_ID_MITGL;
end;
:PLATZ is user selected (1,2,3), :P14_ID_MITGL stores the reference to TBL_MITGLIEDER (and shows the change, when I select another record)
As I understand, that process should also run, when I submit a chance, but nothing happens then.
But when I try to save a new record (which worked without any problems before adding that process), I get this error message:
ORA-06550: line 1, column 64: PL/SQL: ORA-00957: duplicate column name ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored
Error Unable to process row of table TBL_TURNIERSIEGER.
Then, when I go back into the app-builder and try to run the page again, I get this message:
ORA-01403: no data found
Error Unable to fetch row.
I am not sure, if you guys have all the information you need, to know whats going on. Maybe this has to do with session-id and the whay, items are updated. I hope you can help me.
Thanks, best regards,
tobiFirst can you please post all log file errors
>> I can't really give you a solution or specific recommendation since I did not saw this error yet myself, but on your own risk you can try:
1. You may try to just register 'dts.dll' using regsvr32.exe, but this error may indicate a bigger problem with setup.
If you are running SQL Server 64bit then try running this at the command prompt: %windir%\syswow64\regsvr32 "%ProgramFiles(x86)%\Microsoft SQL Server\90\dts\binn\dts.dll"
2. You can try reinstall from start (In this case you have to make sure that you un-install all)
[Personal Site] [Blog] [Facebook] -
I am trying to have access tables of the Sql Server through the Oracle
I am trying to have access tables of the Sql Server through the Oracle and this being occurred the error:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message: [Generic Connectivity using ODBC][H006] The init parameter <HS_FDS_CONNECT_INFO> is not set.
Please set it in init <orasid>.ora file.
ORA-02063: preceding 2 lines from HSMSQL
I created the ODBC with name HSMSQL.
I made all the configurations in the archives
tnsnames.ora:
HSMSQL=
(DESCRIPTION=
(ADDRESS= (PROTOCOL = tcp)(HOST = wsus)(PORT = 1521))
(CONNECT_DATA =
(SID = HSMSQL)
(HS = OK)
listener.ora:
(SID_DESC = (SID_NAME=HSMSQL)
(ORACLE_HOME= C:\oracle\ora92)
(PROGRAM =hsodbc)
initHS_SID.ora:
HS_FDS_CONNECT_INFO = HSMSQL
HS_FDS_TRACE_LEVEL = OFF
-- Create database link
create database link HSMSQL.US.ORACLE.COM
connect to TESTE identified by TESTE2
using 'HSMSQL';
But when I execute query the error occurs:
Select * from TabTeste@HSMSQL
ORA-28500: connection from ORACLE to a non-Oracle system returned this message: [Generic Connectivity using ODBC][H006] The init parameter <HS_FDS_CONNECT_INFO> is not set.
Please set it in init <orasid>.ora file.
ORA-02063: preceding 2 lines from HSMSQL
Please they help me, thanks, Paulo.Hi,
It seems that your configuration is Ok. By the way, the workaround for this error is:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Transparent gateway for ODBC][H001] The environment variable <HS_FDS_CONNECT_INFO> is not set.
* Set HS_FDS_CONNECT_INFO in the hs{sid}init.ora file to the data source name.
Example: HS_FDS_CONNECT_INFO = <ODBC DataSource Name>
* Make sure the hs{sid}init.ora file exists in the ORACLE_HOME/hs/admin directory and has the same name as the SID in the LISTENER.ORA.
Example: If SID=hsodbc in the listener.ora file, then the hs{sid}init.ora file would be named ORACLE_HOME/hs/admin/inithsodbc.ora
For more information see if this [url http://forums.oracle.com/forums/thread.jspa?forumID=61&threadID=576975]thread can help you.
Cheers -
Report performance - PL/SQL vs SQL type
Hello,
Is it possible that report built as PL/SQL function returning SQL query is slower (much more) than common SQL report?
I’ve got a view, that I read data from. When I use SQL query report with variables in :PX_NAME format, it takes about 5 seconds to show the page. If I use PL/SQL report with variables in v('PX_NAME') format inside query string like:
'SELECT * FROM myview where myname like v(''P5_NAME'')';it takes about 3 minutes to get the same data.
Do you have any idea why?
Regards,
PrzemekIt's hard to tell without knowing how many rows we are talking about, the CPU load, and so on, but in a heavily loaded system i can easily imagine that a query containing a call to V function might cause a not optimized access path, whereas the same query with a bind variable might work much better.
Said that, the rule of thumb is to use bind variables every time you can and avoid V as much as you can.
If you can do the same thing with :PX_NAME, use that, there is no justification for using V('PX_NAME').
Flavio
http://oraclequirks.blogspot.com -
Using a SQL data source and XML data source in the same template
I am trying to develop a template for the Request for Quote report generated in Apps 11.5.10. I have loaded the data from the XML output into the template, but I am missing one field - I need the org_id from the po_headers table. Is it possible to use a sql data source (i.e., "select org_id from po_headers_all where po_header_id = [insert header_id from xml data]...") in addition to the xml data source to populate the template at runtime? When you use the Insert > SQL functionality is it static at the time the template is created, or does it call to the database at runtime? I've looked through all the docs I could find, but this isn't clear.
Thanks for any help or suggestions you may have.
RhondaHi Pablo
Thats a tough one ... if you go custom with a data template you will at least get support on the data template functionality ie you have a problem when you try and build one. You will not get support on the query inside the data template as you might have gotten with the Oracle Report, well you could at least log a bug against development for a bad query.
Eventually that Oracle Report will be converted by development anyway, theres an R12 project going on right now to switch the shipped OReports to data templates. AT this point you'll be fully supported again but:
1. You have to have R12 and
2. You'll need to wait for the patch
On reflection, if you are confident enough in the query then Oracle will support you on its implementation within a data template. Going forward you may be able to swap out your DT and out in the Oracle one without too much effort.
Regards, Tim
Maybe you are looking for
-
I close all Firefox windows. When I try to open another window later I get a message telling me that Firefox is still running and that I need to close all windows or restart my computer. I have this about 3 times a day this past week but prior to tha
-
HT1926 ITunes 11 install issue, Error 7 (Windows error 126)
While trying to install ITunes11 on a Windows Desktop with MS XP SP3 I keep getting an error message that states "ITunes was not installed correctly.Please reinstall ITunes.Error 7(Windows error 126)".There is an initial message that states that "App
-
Trying to publish a website created on iweb?
I previously created a website using yahoo and now changed the site and created a new one on iweb. I am trying to upload this site and it will does not work. I don't know what I am doing wrong. I am using the ftp option. I have my passwords correct.
-
I'm on my second Nexus and have a lot of the connectivity issues that I've read about. Mine also has problems sending text messages. It happen several times a week. I type a text message and hit send then exit that screen. About 30% of the time, they
-
Creative Cloud deletes my files!!!
I have single app subscription and I backup my project files in the cloud. But suddenly Creative Cloud deletes my files!!!!!! This is unbelievable. Hours of projects that I have worked on are not in my folders any more. I just get mountain lion notif