How to fetch 2 set of records in MII from SQL procedure
Hi Experts,
I am invoking a SQL procedure from MII which return 2 set of records. But at MII I am able to get only first set of records. Is there any configuration required at MII side or SQL side to get both set of records in MII?
Here is the SQL Query Structure
Create procedure Sample_Proc
@Param1 Varchar(10),
@Param2 varchar(10),
@Param3 Varchar(20) OUT,
SET INCOUNT ON;
AS
Begin
*//Selection statements//*
END
SP Executing in MII
Declare @Param1,
@Param2,
@Param3,
Exec Sample_Proc
@Param1='name',
@Param2='Id',
@Param3=@Param3 OUTPUT,
Select @Param3
Our SP is returning values (Say Recordset1)based on the input parameters 1 and 2 , along with Parameter3 value(Say Recordset2) in MS SQL server but in MII its returning only the values(Recordset1) ... how to fetch recordset2 values in MII
I hope MII can return 2 set of records (rowsets) after executing the procedure.
MII version -> 12.2.3 Build(182)
Thanks & Regards,
Rajasekhar Kantepalli
Hi Swaroop,
With MII 14.0 SP5 Patch 11, in a transaction, I get following XML output for a query that executes an SP(returning multiple resultSets) :
And, results in this format can surely be used for further processing in an MII transaction.
Thanks Rajasekhar, got to know about this because of your query.
regards,
Manisha
Similar Messages
-
How to retrieve Table of Records output param from stored procedure ?
Hi,
I'm trying to retrieve data from a PL/SQL stored proc. It seems I can't modify this procedure (I'm not allowed to and I don't know PL/SQL :)).
My only documentation is the PL/SQL code and its comments. And that's the first I have to deal with output of a defined complex PL/SQL type
So the signature of the procedure is :
FUNCTION FUN_AFF_EVELEG_IHM (
pEntumTyp IN NUMBER,
pEntnum IN VARCHAR2,
pEveListSize IN OUT NUMBER,
pEveList IN OUT pkg_funaff_eveleg.TableRecordEVL,
pErrCode IN OUT VARCHAR2,
pMessage IN OUT VARCHAR2)
RETURN NUMBER;pkg_funaff_eveleg.TableRecordEVL type is defined as "TABLE of RecordEVL"
pkg_funaff_eveleg.RecordEVL type is defined as "RECORD" (struct of 12 different fields : NUMBER or VARCHAR2)
What is the correct syntax to call the stored procedure then ? I don't find how to manage the pEveList output param. Is it a Cursor ? An ARRAY ? And how to register it ?
My code so far :
public static void callFunaffEVL(Connection con, String rcs) {
// CallableStatement procCstmt=null;
OracleCallableStatement oraCstmt = null;
try {
// Identifiy the Stored procedure
// package synonyme : pkg_aff_EVELEG_IHM
// stored procedure name : FUN_AFF_EVELEG_IHM
String command = new StringBuilder("{? = call pkg_aff_EVELEG_IHM.FUN_AFF_EVELEG_IHM(?,?,?,?,?,?");
// 1 RETURN
// 2 pEntumTyp IN NUMBER
// 3 pEntnum IN VARCHAR2
// 4 pEveListSize IN OUT NUMBER,
// 5 pEveList IN OUT pkg_funaff_eveleg.TableauRecordEVL,
// 6 pErrCpde IN OUT VARCHAR2,
// 7 pMessage IN OUT VARCHAR2)
// Create a Callable Statement Object:
oraCstmt = (OracleCallableStatement) con.prepareCall(command);
// Assign IN and OUT parameters
oraCstmt.registerOutParameter(1, OracleTypes.NUMBER); // RET
oraCstmt.setInt(2, 0); // ENTNUMTYP
oraCstmt.setString(3, rcs); // ENTNUM
oraCstmt.registerOutParameter(4, OracleTypes.NUMBER); // pEveListSize
oraCstmt.registerOutParameter(5, OracleTypes.ARRAY); // pEveList
oraCstmt.registerOutParameter(6, OracleTypes.VARCHAR); // pErrCode
oraCstmt.registerOutParameter(7, OracleTypes.VARCHAR); // pMessage
// Execute the Procedure or Function Call:
oraCstmt.execute();
// Process the OUT Placeholders:
int ret = oraCstmt.getInt(1);
String errCode = oraCstmt.getString(6);
String message = oraCstmt.getString(7);
System.out.println("RCS : " + rcs);
System.out.println("ret : " + ret);
System.out.println("errCode : " + errCode );
System.out.println("message : " + message);
} catch (SQLException sqle) {
sqle.printStackTrace();
} finally {
// Close the CallableStatement Object:
try {
oraCstmt.close();
} catch (SQLException e) {
e.printStackTrace();
Return : java.sql.SQLException: Parameter type Conflict: sqlType=2003
Any help ? I found several examples that might refer to this case, but everything I tried end by a SQL exception of one type or another...
(and sorry for my poor english :))
CyAs I said, "pkg_funaff_eveleg.TableRecordEVL" is TABLE of RecordEVL.
i.e : I can find 2 defined types under the package pkg_funaff_eveleg :
TYPE TableRecordEVL is TABLE of RecordEVL INDEX BY BINARY_INTEGER;
TYPE RecordEVL is RECORD (
EVLENTNUM_PK EVENEMENTS_LEGAUX.EVLENTNUM_PK%TYPE,
EVLENTNUMTYP_PK EVENEMENTS_LEGAUX.EVLENTNUMTYP_PK%TYPE,
EVLSEQ_PK EVENEMENTS_LEGAUX.EVLSEQ_PK%TYPE,
EVLTYPSRC EVENEMENTS_LEGAUX.EVLTYPSRC%TYPE,
EVLPK1 EVENEMENTS_LEGAUX.EVLPK1%TYPE,
EVLPK2 EVENEMENTS_LEGAUX.EVLPK2%TYPE,
EVLPK3 EVENEMENTS_LEGAUX.EVLPK3%TYPE,
EVLPK4 EVENEMENTS_LEGAUX.EVLPK4%TYPE,
EVLPK5 EVENEMENTS_LEGAUX.EVLPK5%TYPE,
EVLPK6 EVENEMENTS_LEGAUX.EVLPK6%TYPE,
EVLCODEVTSRC EVENEMENTS_LEGAUX.EVLCODEVTSRC%TYPE,
EVLLEGEVECOD EVENEMENTS_LEGAUX.EVLLEGEVECOD%TYPE,
EVLSEQREF_FK EVENEMENTS_LEGAUX.EVLSEQREF_FK%TYPE,
EVLCOMMENT EVENEMENTS_LEGAUX.EVLCOMMENT%TYPE,
EVLETATCOD EVENEMENTS_LEGAUX.EVLETATCOD%TYPE,
EVLHISDATPUB EVENEMENTS_LEGAUX.EVLHISDATPUB%TYPE,
EVLHISPUBPRE EVENEMENTS_LEGAUX.EVLHISPUBPRE%TYPE,
EVLHISDATEFF EVENEMENTS_LEGAUX.EVLHISDATEFF%TYPE,
EVLHISEFFPRE EVENEMENTS_LEGAUX.EVLHISEFFPRE%TYPE,
EVLHISPOIDATEFF EVENEMENTS_LEGAUX.EVLHISPOIDATEFF%TYPE,
EVLHISORICOD EVENEMENTS_LEGAUX.EVLHISORICOD%TYPE,
EVLHISSUPPORTCOD EVENEMENTS_LEGAUX.EVLHISSUPPORTCOD%TYPE,
EVLHISNUMSUPPORT EVENEMENTS_LEGAUX.EVLHISNUMSUPPORT%TYPE,
EVLHISNUMINF EVENEMENTS_LEGAUX.EVLHISNUMINF%TYPE,
ANNNUMBODPCL CBODACCPROD.CODANN2.ANNNUMBOD%TYPE
);If needed, I can translate each "EVENEMENTS_LEGAUX.EVLENTNUM_PK%TYPE", but they must be VARCHAR2 or NUMBER
Do I answer your question ? -
How Do I set the "Record" settings in Sound booth.
How Do I set the "Record" bit settings in Sound Booth, i.e. the 16 bit rate so that the wav files will burn to a music CD. (the default 48 will dot burn to a CD).
Thanks Marv.Why not post in the SB forum?
Go to File/Record and set the format to what you need: -
How do I set my iTunes to start from current song on my iPhone 5?
How do I set my iTunes to start from the current song on my iPhone 5?
See Recover your iTunes library from your iPod or iOS device.
tt2 -
How do i set up "print to iPhoto" from pages
How do i set up "print to iPhoto" from pages
lamen88 wrote:
How do i set up "print to iPhoto" from pages
I wasn't aware that you could do that directly. Did you see that witten somewhere, or are you asking if it is possible?
My approach would be to Print to PDF, use Preview.app to export the PDF to PNG and drag the PNG file into iPhoto.
Regards,
Jerry -
How do I set Ipad up to print from hom PC?
How do I set up Ipad2 to print from how PC?
To print from an iPad, you will either need an AirPrint-enabled printer or use a software solution, like Printopia. Unfortunately, Printopia I believe only works with Macs so it would not be a viable option in your case.
-
We are using B2B & OSB to send out messages via eBMS protocol
So basically this are the two use cases
1) EBusiness Suite => B2B => OSB=> Customer for the outbound Shipment Notices
2) EBusiness Suite <= B2B <= OSB<= Customer for the Inbound acknowledgement
We are able to use standard B2B functionality to send out the messages using eBMS with https and client certificates
On the way back from the customer, we are using OSB that gets the raw data and the body gets sent to B2B
On the outgoing part a message gets created in B2B and is at MSG_WAIT_ACK
When the acknowledgement comes in, it comes as a seperate messgae in B2B and is at MSG_COMPLETE
How do you set the original outbound message from MSG_WAIT_ACK to MSG_COMPLETE?
We use JMS and have played around with jca.jms.JMSProperty.INREPLYTO_MSG_ID but that is not propagating to REFER_TO_MESSAGE_ID in B2B_BUSINESS_MESSAGE table
I tried using jca.jms.JMSProperty.CONVERSATION_ID as well but no luck
Any response is highly appreciated!Are you asking about your own JavaMail code or about somebody else's web-based mail agent?
If it's the latter (which is what it sounds like) then you find the checkbox in the preferences configuration, or whatever they call it, which says "Include original message in reply", or something like that. If such a thing exists, that is. If you're thinking that the e-mail message controls how their code formats replies to it, that's not how it works.
Even Outlook lets you configure how replies are formatted, the only difference is that the Outlook default is to include the original message and your web-based agent's default is to not include it. -
Have fitted external sd card to galaxy s4 mini. How do I set it to store music from spotify? I am fairly technophobic so a fairly non technical explanation would help! Thank you.
A SIM PIN, also referred to sometimes as a PUK Code is like a PIN number for your SIM card (just like your ATM Card). Since your SIM card has your cellular account on it and can be typically removed from one device and put into another, you can lock the SIM Card with a SIM PIN if you choose. If you activate the SIM PIN feature and forget your SIM PIN when you try to re-activate your device or a new device in the future using the same SIM Card, you may have to contact you carrier to get a new SIM Card. http://support.apple.com/kb/ht1316
As far as changing the SIM Cards out because you want to use a new carrier, you can remove the SIM card fomr the old carrier and put in the SIM card form the new carrier. http://support.apple.com/kb/ht5163
I hope this helps clear things up. -
How to login as DBA in oracle 9i from sql plus .
how to login as DBA in oracle 9i from sql plus . ???
First you need to check whether your HR schema is still unlocked or not? If it is locked - then you have to unlock it. And, then you can connect the Hr schema.
But, i'm not sure - why you need system to log into the HR schema?
Regards.
Satyaki De. -
How could I create a "Linked Server" link from SQL Server 2008R2 64-Bit to Oracle Database 11.2 64-Bit?
Let's say the SQL Server and Oracle Database are in the same Company Internet Network.
I have the code, but I do not know how to use it. Such as what is System DSN Name? Where could I get it. What does it look like?
Do I need to install any Oracle Client Software in order to link from SQL Server to Oracle? Or SQL Server has the built-in drivers installed already that I can directly create a Linked Server from SQL Server to Oracle?
I need to know details. Thanks.
USE master
go
EXEC sp_addlinkedserver
@server = '{Linked Server Name}'
,@srvproduct = '{System DSN Name}'
,@provider = 'MSDASQL'
,@datasrc = '{System DSN Name}'
EXEC sp_addlinkedsrvlogin
@rmtsrvname = '{Linked Server Name}'
,@useself = 'False'
,@locallogin = NULL
,@rmtuser = '{Oracle User Name}'
,@rmtpassword = '{Oracle User Password}'You need an OLE DB provider for Oracle. There is one that ships with Windows, but it only supports very old versions of Oracle. Oracle has an OLE DB provider that you can use. I don't know if it's part of Oracle Client or how it is bundled.
You should not use MSDASQL or any DSN.
Erland Sommarskog, SQL Server MVP, [email protected] -
How to fetch some certain records at a time
Hi everyone,
I dont know how to fetch some records at a time,
for some reason,there is not enouht memory.so I cant
fethch all the records at a time.
example, every time I only want to fetch 10
records. Does anyone know that?
thanks
KrussiI think you may be getting setFetchSize(int) and setMaxRows(int) confused. I may have added to the confusion with my breaking out of the loop comment.
setFetchSize(int) gives the driver a hint as to how many rows it should store in memory at a time internally, ie. within the driver. It has no real effect on how you write your program at all. Its only purpose is to limit memory usage by the driver. To limit the rows returned, use setMaxRows.
For example, assume a result set has 20 rows and you use:
rs.setFetchSize(5);
while (rs.next()) {
System.out.println("Rows: " + (++count));
} You still get a count from 1 to 20. However, internally the driver is only holding in memory 5 records at a time, after the 5 returned it will discard those and get the next 5. So instead of holding 20 rows, its only holding 5 at a time. If you change rs.setFetchSize(5) to rs.setMaxRows(5) you will only get a count from 1 to 5, the rest are silently discared and rs.next() returns false.
Check your documentation to see if your driver supports the method. I believe many drivers don't. If not, I believe there is no way around multiple queries. Even if there is no rowid, as long as you order your queries you should be able to start again where you left off.
Disclaimer: Both drivers I commonly use do not implement setFetchSize(int). Someone let me know if I've fudged something here.
Good Luck -
Hello everybody,
I am currently working on SQL Developer for the couple of weeks. I have specific need to check, how much time one query take to fetch all the records. Currently it can fetch only 50 records and when scroll then next 50 records and so on.
Can anybody tell me, how to set this to fetch full records
Regards,
Martand M JoshiMartand,
There's no setting to fetch all records. You wouldn't like SQL Developer to fetch for minutes on big tables anyway.
If, for 1 specific table, you want to fetch all records, you can do Control-End in the results pane to go to the last record. You could time the fetching time yourself, but that will vary on the network speed and congestion, the program (SQL*Plus will be quicker than SQL Dev because it's more simple), etc.
Now, what I think you really want here, is getting the execution time. If you really want to analyze the query's performance, you'd have to use the explain plan, autotrace and tkprof (see the manual for tuning and performance).
To make us life easier, the makers of SQL Developer included support of the explain plan, and as of v1.1, autotrace!
I'm sure you've got enough to work things out from here...
Regards,
K. -
How to devide the set of records into groups in SQL itself.
Hi , i am using 10.2.4.0 of oracle.
I am having one requirement, in which i have to devide the set of records into certain groups , so that they can be executed partly but not in one run.
So in the 'SELECT' clause itself i want to asssign particular value (may be 1 )to first 50000 records then another value(may be 2) to next 10000, like wise. And again the total count of records will also varry time to time , if the total count of record set is less than 10000 , then it should only assign '1' to all the records. i will set the group values (1,2,3...) as another column itself.
Can you please let me know if this can be done in SQL without going for PLSQL?Hi,
That's called a Pagination Query , and here's one way to do it:
WITH got_grp AS
SELECT x.*
, CEIL ( ROW_NUMBER () OVER (ORDER BY x_id)
/ 50000
) AS grp
FROM table_x x
-- WHERE ... -- If you need any filtering, put it here
SELECT * -- Or list the columns you want
FROM got_grp
WHERE grp = 1
;ROW_NUMBER () OVER (ORDER BY x_id) assigns unique integers 1, 2, 3, ... to all all rows, in the same order as x_id (even if x_id is not unique).
CEIL (ROW_NUMBER () OVER (ORDER BY x_id) / 50000) maps the 1st 50,000 of those numbers to 1, the 2nd 50,000 to 2, and so on.
Analytic functions (like ROW_NUMBER) as computed after the WHERE clause is applied, so, to use the results in a WHERE clause, then you need to compute them in a sub-query. If you just want to display the number, and not use it in a WHERE clause, then you don't need a sub-query.
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
In the case of a DML operation (such as UPDATE) the sample data should show what the tables are like before the DML, and the results will be the contents of the changed table(s) after the DML.
Explain, using specific examples, how you get those results from that data.
Always say what version of Oracle you're using.
See the forum FAQ {message:id=9360002} -
How to fetch all the records from ztable
Hi
My program is outbound program.
According to the requirement i have to fetch all the records from ztable which are not tranmitted before to the third party and once the records are extracted and written to output file they will be marked as 'X' in the "status" field of that ztable for the next days run.
How to fetch the records.Please suggest me.
Thanks,
NeelimaHI,
Fetch all the records whose status is equal to 'X' as whatever data is sent to third party system is marked as 'X' in status field of table after sending.
You need to first fetch the data into internal table using the select statement where status EQ space. You get the data which is not yet transmitted to third part. And later in the program after trasmitting the data to third party modify the Records in the DB table which are transmitted with Staus eq 'X'. -
How to fetch the distict records from xcelsius excel column
i have brought the datas from database using webservice
from this data i want to fetch the distinct records in another column
how to do this without using third party tool like "Centigon filtered summary"
plz help me.
Regards
Ram.G
Edited by: g.ram84 on Dec 1, 2009 6:57 AMHi Ram,
This can be achieved using functionalities within excel of the Xcelsius.
Please try the steps below:
1) From the excel menu choose Data | Filter | advaced Filter.
2) choose your entire range.
3) choose location to copy.
4) choose Unique records only
and only unique records will be copied.
Hope this helps...
Regards,
Ankeet
Maybe you are looking for
-
Q55: Relating AP Invoice payment direct to a Purchase Order
Dear All, I want to create a report that tells me which AP Invoice relates to a line item on a purchase order but am having difficulty in thinking through the logic. I can relate a GRPO to a PO and an API but cannot think how to relate an API direct
-
hi gurus I have used function module CONVERT_ABAPSPOOLJOB_2_PDF for converting spool to pdf format , now i need to send email using methods and class ( not with FM SO_DOCUMENT_SEND_API1 ) . iam useing TRY. -------- create persistent send reques
-
Record not updating into table helpme
in the following functionmodule record is not commiting into table is there any wrong please hep me. FUNCTION Z_MZPR_DETAILS. ""Local Interface: *" IMPORTING *" VALUE(ZPRHEADER) TYPE BAPIMEREQHEADER OPTIONAL *" VALUE(ZPRHEADERX) TYPE BAPIM
-
Samsung 24-inch display auto-dimming problem
Right out of the box 3 or 4 months ago, my Samsung 24 inch 2443 BW dims uncontrollably whenever I have a window open that has mostly black or other dark-colored background - say about 60% black; I can actually watch the whole screen and desktop - not
-
How to configure the jdeveloper 11 with .dbc files?
hi, all i am a new bie here. 4 jdeveloper 10, i can configure the .dbc files at project setting, while 4 jdeveloper 11, it's totally different. i can't find any place to configure it. How to configure the .dbc in jdeveloper 11? Regards, Chelsea