I'm trying to create a wrapper procedure. The procedure I'm calling
returns 2 resultsets. I really only need the second, but I'm not sure
how to get the second resultset. Is there something like ADO's
Resultset.NextRecordset for Transaction SQL?
CREATE PROCEDURE dbo.NAMissionsSearchNameWrapper @Search varchar,
@SortByName INT
AS
CREATE TABLE #NaMissionsSearchNameTemp(
AccountNumber VARCHAR(12) NOT NULL,
AccountName VARCHAR(512) NULL,
Address1 VARCHAR(255) NULL,
Address2 VARCHAR(255) NULL,
Address3 VARCHAR(255) NULL,
Address4 VARCHAR(255) NULL,
PPL VARCHAR(255) NULL, --city
ADM2 VARCHAR(255) NULL, --whats this?
ADM1 VARCHAR(255) NULL, --state
FIPSCountryCode VARCHAR(50) NULL,
PostalCode VARCHAR(255) NULL,
ExportAddressAsIs BIT(2) NULL,
Name1 VARCHAR(255) NULL,
Name2 VARCHAR(255) NULL,
Name3 VARCHAR(255) NULL,
Name4 VARCHAR(255) NULL,
LastName VARCHAR(255) NULL,
FamiliarName VARCHAR(255) NULL,
Title VARCHAR(255) NULL,
Suffix VARCHAR(255) NULL,
FirstName VARCHAR(255) NULL,
MiddleInitial VARCHAR(255) NULL,
ProperName VARCHAR(512) NULL,
GenderDesignation VARCHAR(10) NULL,
MainframeAddressNumber VARCHAR(10) NULL,
PostalAddressGUID VARCHAR(50) NULL,
GUID UNIQUEIDENTIFIER NULL)
INSERT INTO #NaMissionsSearchNameTemp
SELECT NA.NARepository.dbo.usp_DP_NARSearchNameAddress
@@Search,
@SortByName
..
..
.. 1 1680
Hi,
If you want to suppress the "XX records affected" resultset, then use SET
NOCOUNT ON
Cheers
Ken
"Jonathan Beam" <jo***********@juno.com> wrote in message
news:e8**************************@posting.google.c om...
: I'm trying to create a wrapper procedure. The procedure I'm calling
: returns 2 resultsets. I really only need the second, but I'm not sure
: how to get the second resultset. Is there something like ADO's
: Resultset.NextRecordset for Transaction SQL?
:
:
: CREATE PROCEDURE dbo.NAMissionsSearchNameWrapper @Search varchar,
: @SortByName INT
: AS
: CREATE TABLE #NaMissionsSearchNameTemp(
: AccountNumber VARCHAR(12) NOT NULL,
: AccountName VARCHAR(512) NULL,
: Address1 VARCHAR(255) NULL,
: Address2 VARCHAR(255) NULL,
: Address3 VARCHAR(255) NULL,
: Address4 VARCHAR(255) NULL,
: PPL VARCHAR(255) NULL, --city
: ADM2 VARCHAR(255) NULL, --whats this?
: ADM1 VARCHAR(255) NULL, --state
: FIPSCountryCode VARCHAR(50) NULL,
: PostalCode VARCHAR(255) NULL,
: ExportAddressAsIs BIT(2) NULL,
: Name1 VARCHAR(255) NULL,
: Name2 VARCHAR(255) NULL,
: Name3 VARCHAR(255) NULL,
: Name4 VARCHAR(255) NULL,
: LastName VARCHAR(255) NULL,
: FamiliarName VARCHAR(255) NULL,
: Title VARCHAR(255) NULL,
: Suffix VARCHAR(255) NULL,
: FirstName VARCHAR(255) NULL,
: MiddleInitial VARCHAR(255) NULL,
: ProperName VARCHAR(512) NULL,
: GenderDesignation VARCHAR(10) NULL,
: MainframeAddressNumber VARCHAR(10) NULL,
: PostalAddressGUID VARCHAR(50) NULL,
: GUID UNIQUEIDENTIFIER NULL)
:
: INSERT INTO #NaMissionsSearchNameTemp
: SELECT NA.NARepository.dbo.usp_DP_NARSearchNameAddress
: @@Search,
: @SortByName
: .
: .
: . This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Bill Kellaway |
last post by:
Hi there - this should be fairly simple for someone. Basically I
can't figure out how to pass the parameters from ASP to a Stored
Procedure on SQL.
Here's my code:
I just need to help in...
|
by: Jim Garrison |
last post by:
I need to create a ResultSet in an Oracle Java Stored Procedure and
return it to a PL/SQL caller. I've done quite a bit of research in
Oracle's manuals and on the Web, and have found lots of...
|
by: Raquel |
last post by:
This is a very simple DB2 SQLJ stored procedure. The problem is that it
seems to run fine but returns NOTHING. I mean..as if nothing has
happened..not resultset is returned. I am passing value...
|
by: Raquel |
last post by:
Have a question on the Stored procedure method code generated by DB2
development center for Java stored procedures.
Suppose I have a requirement to return the resultset consisting of
FIRSTNME,...
|
by: Twan Kennis |
last post by:
Question: How do I pass a returning resultset from a nested Stored
Procedure (which opens a cursor including option "WITH RETURN TO
CALLER") as a returning resultset from it's own?
When I...
|
by: Dino L. |
last post by:
How can I run stored procedure (MSSQL) ?
|
by: Amy |
last post by:
I'm having trouble getting some data into a datagrid. It works fine
for the results of the first SELECT in the stored procedure, but not
therafter.
Here's the error I get:
"A field or property...
|
by: Thomas Beyerlein |
last post by:
I am building a UI, I am using stored procedures for executing SQL
commands on the server. When I ran a insert stored procedure it returned
me a error message that it could not find a parameter...
|
by: _link98 |
last post by:
Problem: java ResultSet cursor from SQL/PL stored-procedure is
FORWARD_ONLY.
Is it possible to have ResultSet cursors from SQL/PL procedures to
scroll forward and backwards? Perhaps I am missing...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |