Stored Procedure in Universe - Multi-result set
I have been trying to get more information on stored procedures as a source for universes. Business Objects designer 3.1 documentation says the following
Stored procedures with multi-result set
Example: A stored procedure that returns more than one result set. At design
time, several tables are created in the universe structure based on the same
stored procedure.
Does this mean?
1. These result sets are shown as multiple tables in designer?
2. if so, can these result sets be used as regular tables in designer to build joins and contexts.
I searched the forum for relevant threads before posting but could not find any. I tried posting this thread earlier - internet connection timed out. Please forgive me if this is a duplicate post.
Thanks
DROP TABLE #DescendantsMS SQL Server - right?
Then don't drop the table.
From the MS docs for "create table"
Local temporary tables are visible only in the current session;
A local temporary table created in a stored procedure is dropped automatically when the stored procedure completes. The table can be referenced by any nested stored procedures executed by the stored procedure that created the table. The table cannot be referenced by the process which called the stored procedure that created the table.
Similar Messages
-
JDBC SQL Server Channel Calling Stored Procedure Won't Return Result Set
Good afternoon, Experts
We're calling a stored procedure in a sender communcation channel. I can perform any SQL SELECT statement here, but for some reason when I execute the SP (EXECUTE StoredProcedureName) The Adapter Engine returns the following:
Database-level error reported by JDBC driver while executing statement 'DECLARE @UpdateRecords bit SET @UpdateRecords = 0 EXECUTE ExportToSAP @UpdateRecords'. The JDBC driver returned the following error message: 'com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set.'. For details, contact your database server vendor.
Even stranger yet is is that this works just fine on our PI-DEV system. I created an identical communication channel connecting to the same database with the same UID and PWD and it won't work in PI-QAS.
Any help/ideas you could share would be greatly appreciated!!!
Thanks,
ChadHi Chad.
Normally, itu2019s a problem with your procedure. The Store Procedure is wrong and something is different between your DEV environment and QAS environment.
Try to ask to DB team check it.
Regards,
Bruno -
Stored procedure call returns null result set when using temp table in sp!
Here's a really odd problem...
SQL Server stored procedure called sp_Test takes 1 input INT. Here is the code I call it with
cStmt = connection.prepareCall("{call sp_Test(?)}");
cStmt.setInt(1, 44);
cStmt.execute();
rs = cStmt.getResultSet();When the body of the stored proc is
CREATE PROCEDURE sp_Test(@i_NodeID INT)
AS
BEGIN
SELECT node_id FROM tbl_NavTree
END
GOthe query works and I get all node_id back in rs
BUT when the body of the stored proc is
CREATE PROCEDURE sp_Test(@i_NodeID INT)
AS
BEGIN
CREATE TABLE #Descendants(
descendant_id INT
SELECT node_id FROM tbl_NavTree
DROP TABLE #Descendants
END
GOThe rs comes back as NULL. Really really weird if you ask me. I also tried removing the DROP TABLE line just in case the SELECT had to be the last statement but still NULL.
Final note is that BOTH the above stored proc bodies work when executed within SQL Server query analyser.
Must be JDBC .. what can it be!??DROP TABLE #DescendantsMS SQL Server - right?
Then don't drop the table.
From the MS docs for "create table"
Local temporary tables are visible only in the current session;
A local temporary table created in a stored procedure is dropped automatically when the stored procedure completes. The table can be referenced by any nested stored procedures executed by the stored procedure that created the table. The table cannot be referenced by the process which called the stored procedure that created the table. -
Error saving map. Stored procedure returned non-zero result BizTalk Bug
Hallo all
MSDN is reporting this Bug.
"Error saving map. Stored procedure returned non-zero result." error message when you deploy the BizTalk Server 2010 applications in BizTalk Server 2010 Administration Console"
http://support.microsoft.com/kb/2673264/en-us
I am having this problem in BizTalk 2013. Is this correct? or I am doing something wrong..
This error occured as I was about to deploy BizTalk application from Visual studio 2012 to BizTalk 2013.
If this bug is available in 2013, where can I get a fix for it..
Thanks in Advance
AKEHi AKE,
Fix for this bug in BizTalk Server 2013 is not publicly available yet. Only option to get the fix for this bug is to contact:
http://support.microsoft.com/contactus/?ws=support
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful. -
How to use @prompt for stored procedure in universe
Hi,
I am using Bo XI R3.1 and universe was built on stored procedures and database is sql server 2005.
I would like to show the list of values for prompts in report which they are based on parameters given for stored procedures in universe. Instead of typing the value for prompts the user should select some values for the prompt.
I've tried in the universe putting the prompt syntax but didn't work could any one please let me know how this will be achived
Thanks in advance,
EswarHi Eswar,
Please try the following steps mentioned below:
1. Go to Insert -> click Tables and Import the table which needs to assign LOVu2019s into Universe panel.
Objects which are created on tables may appear in inactive mode.
2. Right click on the stored procedure -> Click on Edit stored procedures.
3. Click on the Browse universe objects from Stored Procedure Editor. (Button avaial on the left)
4. Select the object which you want to assign for the List of values.
5. Enter the desired text which you want to display in the WebI reports in the Edit prompt Label.
6. Export the Universe.
Before doing the above steps:
While creating for SP Univ, a parameter screen appears after selecting SP. In the "Value" field enter a dummy value and
from the "Next Execution" drop down at the right select "Prompt me for a value".
Regards,
Rohit -
I am using VS 2012 and BizTalk 2013 and attempting to deploy an application to BizTalk when I get these errors:
Error 47
at Microsoft.BizTalk.Deployment.Assembly.BtsMap.Save()
at Microsoft.BizTalk.Deployment.Assembly.BtsArtifactCollection.Save()
at Microsoft.BizTalk.Deployment.Assembly.BtsAssembly.Save(String applicationName)
at Microsoft.BizTalk.Deployment.BizTalkAssembly.PrivateDeploy(String server, String database, String assemblyPathname, String applicationName)
at Microsoft.BizTalk.Deployment.BizTalkAssembly.Deploy(Boolean redeploy, String server, String database, String assemblyPathname, String group, String applicationName, ApplicationLog log)
0 0
Error 49
Failed to add resource(s). Change requests failed for some resources. BizTalkAssemblyResourceManager failed to complete end type change request. Failed to deploy map "XXX.BTS2013.XXX.Maps.map_XXXX_R01_InsLabProc".
Error saving map. Stored procedure returned non-zero result. Check if source and target schemas are present. Error saving map. Stored procedure returned non-zero result. Check if source and target schemas are present.
0 0
Error 46
Failed to deploy map "XXX.BTS2013.XXX.Maps.map_XXXX_R01_InsLabProc".
Error saving map. Stored procedure returned non-zero result. Check if source and target schemas are present.
0 0
I also tried to Import a MSI file from our test environment to see if that would work...got the same errors. After spending hours (not kidding) looking for an answer, all I could find is that a hotfix would work. So, I got the hotfix from Microsoft
Support and applied it then rebooted. Still getting the same errors. I'm absolutely at a stand still. Interesting that I got this application to deploy yesterday and then the next time I deployed it I started getting these errors. I'm
ready to pull my hair out!
Is there an answer for this out there somewhere? Any help would be appreciated.
Thanks,
DaveHi Dave,
Which hotfix have you applied? I don't think a hotfix of this issue is available for BizTalk 2013 yet. You should create a
support ticket with Microsoft to get a solution.
If this answers your question please mark as answer. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply. -
Java- Stored Procedure with Call by Result
Hi Oracle-Community,
I am looking for some example Code how to use a Java-Stored Procedure with Out-Parameters. Don't get me wrong. I dont want to call a Procedure with Out Parameters from Java (there are a lot of examples for this out there) . I just want to implement the Call by Result concept in a Java-Stored Procedure. A Client will call this Procedure with some parameters and the Java Procedure will fill them. So my first question: is this possible? And my second Question: How to implement it?
Greetings.I found out a solution. It is very simple.
Just defining the parameters as java array (e.g. String[] P1). The first value (P1[0]) is the returned value.
At last just set in JDeveloper in the "Edit Method Signature" Dialog the parametermode to OUT.
The dialog can be found by rightclicking on the stored procedure in the dbexport file. You can read this
in Section 6 Publishing Java Classes With Call Specifications -> Setting Parameter Modes in
Oracle Database Java Developer's Guide. -
Design a procedure which returns a result set of a select Query
Hi...
Can some one help me out with a brief design or work around for creating a stored procedure which runs a select Query and Returns a result set...
If not a stored procedure, at least a function which makes the job simple....
Awaiting help in this regard ........Hi...
I am sorry for providing insufficient Info...
Actually I am using Oracle 10G DB...
I have a select Query..
Since I am a part of team which is building a Complete Data Driven site, Even an SQL Query and a PL/SQL function body was stored in the Table itself to bring in some kind of Dynamism in the site.... But the master table was loaded with a lot of data and hence Now we decided to Store everythin in a generic package..
I used REF CURSORS to store a result set of a simple SELECT Query.... and declaring it as an out parameter in my Procedure body so that the JAVA team can directly access the Procedure from the JAVA layer....
Now I want to know can I do anything more efficient to carry out the above operation.... -
How to use stored procedure with many return results and variable with perl
Hi everybody,
i´m writtting now a Perl programm, wich use a oracle stored procedure with more than 1 result and 1 variable(I have to return 2 variable fpr each result). I don´t now how I can get it.I already search the web but I didn´t find.
My example:
PROCEDURE get_projects_and_sub_projects (
v_project_id IN INTEGER,
v_project_c_id OUT INTEGER,
v_project_id_find OUT VARCHAR2
IS
BEGIN
SELECT c_id, proj_id
INTO
v_project_c_id,
v_project_id_find
FROM t_projet
WHERE t_projet .ksa_pro_art_kbz = 'KU'
AND t_projet.proj_id LIKE v_project_id || '%';
EXCEPTION
WHEN NO_DATA_FOUND
THEN
v_project_c_id := NULL;
v_project_id_find := NULL;
WHEN OTHERS
THEN
kmessages.error (NULL,
'get_projects_and_sub_projects',
'Project-Name: ' || v_project_id,
'Errornumber: '
|| SQLCODE
|| ' Error: '
|| SQLERRM,
TRUE,
TRUE
raise_application_error (-20001,
'Error '
|| SQLCODE
|| ' get_projects_and_sub_projects: '
|| SQLERRM,
TRUE
END get_projects_and_sub_projects;
in Perl Program:
sub get_projects_unterprojects_name($$){
my ($db_handle, $proj_name_id) = @_; #$db_handle ist the DB Connection return value
my $db_proj_c_id;
my $db_proj_name;
eval{ my $csr = $db_handle->prepare(q{
BEGIN
pro_doc_ber.get_projects_and_sub_projects(:proj_name_id, :db_proj_c_id, :db_proj_name);
END;
# parameter value
$csr->bind_param(":proj_name_id", $proj_name_id);
# return values
$csr->bind_param_inout(":db_proj_c_id", \$db_proj_c_id, 11);
$csr->bind_param_inout(":db_proj_name", \$db_proj_name, 20);
$csr->execute(); };
But this didn´t work. Could somebody give me some idea?
Thank you
FelxSome additional info would probably be helpful.
What is your programming enviironment? Java?
In any case I suspect that you will need to use the OCI to deal with specific Oracle types such as user defined object types -- thats not standard ANSI SQL.
In Java I believe you need to use OPAQUE, there are some examples out there. I'm mostly a PL/SQL developer with some Java expereince so others here are more qualifed to answer your question more directly. -
Select from all_tables inside a procedure brings a different result set
Hi all,
There are two cases.. both are the same, but gives different out put.
CASE 1 pulls few for SYS and all for current user.
CASE 2 Pulls data for ALL USERS.
Why the same code in side a procedure brings a different result ?
SQL>
--CASE 1
CREATE OR REPLACE procedure test_t_owner as
cursor cur1 is select table_name,owner from all_Tables;
begin
for rec1 in cur1
loop
dbms_output.put_line(rec1.table_name||'--'||rec1.owner);
end loop;
end;
set serveroutpu on;
exec test_t_owner
--CASE 2
Declare
cursor cur1 is select table_name,owner from all_Tables;
begin
for rec1 in cur1
loop
dbms_output.put_line(rec1.table_name||'--'||rec1.owner);
end loop;
end;
- regards
ski create one new user
create user test identified by test;
grant connect, select any table to test;
grant dba to test;according to you then i run the procedure test_t_owner it should be give error
and i case of AB it should return all rows from all_tables.
But give output same in but sames.
Regards
Singh -
Using a ORACLE stored procedure to return a query set.
I would like to call an ORACLE stored procedure from inside the Creator. The stored procedure returns the data in a hierarchical format. Is there an example of calling ORACLE stored procedures available?
Thanks for your help.
CharlesSee this thread - might help:
http://swforum.sun.com/jive/thread.jspa?threadID=47188&tstart=0
v -
Stored Procedure With Multiple Result Sets As Report Source : Crosspost
Hello Everyone,
I have an issue where i have created a stored procedure that returns multiple result sets
/* Input param = @SalesOrderID */
SELECT * FROM Orders TB1
INNER JOIN OrderDetails TB2 ON TB1.ID = TB2.ID
WHERE TB1.OrderID = @SalesOrderID
SELECT * FROM Addresses
WHERE Addresses.OrderID = @SalesOrderID AND Addresses.AddressType = 'Shipping'
SELECT * FROM Addresses
WHERE Addresses.OrderID = @SalesOrderID AND Addresses.AddressType = 'Billing'
This is just a quick sample, the actual procedure is a lot more complex but this illustrates the theory.
When I set the report source in Crystal X to the stored procedure it is only allowing me to add rows from the first result set.
Is there any way to get around this issue?
The reason that I would prefer to use a stored procedure to get all the data is simply performance. Without using one big stored procedure I would have to run at least 6 sub reports which is not acceptable because the number of sub reports could grow exponentially depending on the number of items for a particular sales order.
Any ideas or input would be greatly appreciated.
TIA
- Adam
P.S
Sorry for the cross post, I originally posted this question [here|/community [original link is broken];
but was informed that it might be the wrong forum
Edited by: Adam Harris on Jul 30, 2008 9:44 PMAdam, apologies for the redirect, but it is better to have .NET posts in one place. That way anyone can search the forum for answers. (and I do not have the rights to move posts).
Anyhow, as long as the report is created, you should be able to pass the datasets as:
crReportDocument.Database.Tables(0).SetDataSource(dataSet.Tables("NAME_OF_TABLE"))
Of course alternatively, (not sure if this is possible in your environment) you could create a multi-table ADO .NET dataset and pass that to the report.
Ludek -
How do you report from a multiple-result-set stored procedure?
Team,
I am writing a report against a canned stored procedure which returns eight result sets. That is, inside the stored procedure, there are eight SELECT statements which pump to the output. In ADO, you would read the first one, then use SqlDataReader.NextResult to advance the reader to the next one until you have done all eight.
Q1: Have you ever written a Crystal Report against such a sproc? How?
Q2: I see that I could pull this data using ADO.NET if I knew this: Have you ever read such a sproc into a dataset? When I drag-and-drop the sproc into the dataset designer, it only makes a table schema for the first result set. I desire to have a table schema for all eight.
Thanks,
~ ShaunQ1: Have you ever written a Crystal Report against such a sproc? How?
- best answered in the Crystal Reports Design forum, so please post there:
SAP Crystal Reports
Q2: I see that I could pull this data using ADO.NET if I knew this: Have you ever read such a sproc into a dataset? When I drag-and-drop the sproc into the dataset designer, it only makes a table schema for the first result set. I desire to have a table schema for all eight.
- not a Crystal reports question. Perhaps better posted to some MS / .NET developer forum(?)
Ludek -
Multiple result sets from stored procedure into CachedRowSet
How can you obtain multiple sets of data from a stored procedure that returns multiple result sets, when you'd like to use CachedRowSet rather than ResultSet?
My database's stored procedures return multiple result sets, but I'm not sure how to manipulate that using CallableStatements and CachedRowSets... I read the RowSet tutorial from java.sun.com but that didn't cover the case of multiple result sets and CallablStatements.
How might I do this? Thanks a lot.SELECT columns..
FROM table
FOR XML PATH('NodeName'),('Rootname')
Thank you for replying.
I dont have to generate XML from a query. I have to generate from a SP and that too without modifying it.
Thanks,
Tauhid
thats ok you can do like this
1. Create a table with structure same as SP resultset
2. Populate table with SP result as per below
INSERT table
EXEC SPName param1value,...
3. Add a query like below
SELECT columns..
FROM tablename
FOR XML PATH('NodeName'),('RootName')
see
http://visakhm.blogspot.com/2014/05/t-sql-tips-fun-with-for-xml-path.html
4. Use sp_send_dbmail to sent it through mail
http://msdn.microsoft.com/en-IN/library/ms190307.aspx
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
I need return the result of a query on a stored procedure
I need return the result of a query on a stored procedure, I mean when I execute a stored procedure it returns a result set as a select query.
Best regards...If you want some pl/sql code that can be used in a query as it were a table you may be interested in table functions:
SQL> create or replace type
2 t_emp is object (
3 name varchar2(30),
4 hire_date date,
5 salary number);
6 /
Tipo creato.
SQL> create or replace type
2 t_emptab is table of t_emp;
3 /
Tipo creato.
SQL> create or replace function tab_fun(p_dept in number)
2 return t_emptab is
3 e t_emptab;
4 begin
5 select t_emp(ename,hiredate,sal)
6 bulk collect into e
7 from emp
8 where deptno=p_dept;
9
10 return dip;
11 end;
12 /
Funzione creata.
SQL> select *
2 from table(tab_fun(20));
NAME HIRE_DATE SALARY
SMITH 17-DIC-80 800
JONES 02-APR-81 2975
SCOTT 09-DIC-82 3000
ADAMS 12-GEN-83 1100
FORD 03-DIC-81 3000A procedure cannot be used in a select statement.
Max
http://oracleitalia.wordpress.com
Maybe you are looking for
-
Displaying Images Stored on a Server In Flex
My original idea for my app was to have live thumbnails of websites by screenshotting a html component in the app and saving these screenshots as jpgs which are applied as the source of the thumbnails. I now realise this is a bit too unstable as if t
-
hi experts I want to put DocDate and TaxDate into payments form how to do this. i tried to add like this no form load Form frm = APL_Form.Polaczenie.pApp.Forms.GetFormByTypeAndCount(pVal.FormType,pVal.FormTypeCount); (frm.Items.Item("10").SPecific as
-
Printing problem with Photosmart C4180
Hello, I'm trying to print invitations on my Photosmart C4180. I have a custom size of 6.25" by 6.25". The directions on the invitations say I should manually feed the paper. I can't find out how to do that. Do you have any suggestions? thank yo
-
Hi, I'm using Oracle Portal 10.1.4, and I've successfully imported page groups into this portal before, but now when I try to do an import, I only see the following message in the 'Browse Transport Sets' page: Import: Transport set created, exported,
-
Sun Studio 12EA and Netbeans Profiler 5.5
I was wondering if anyone was able, or if it is possible to get the Netbeans 5.5 profiler for Java working in Sun Studio 12EA. The installation into netbeans-5.5_mars seems to work fine, yet the profiling menu does not appear in Sun Studio after a re