Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!drn.maxwell.syr.edu!news.maxwell.syr.edu!postnews.google.com!g49g2000cwa.googlegroups.com!not-for-mail
From: "Noel" <vbgooglegroups@yahoo.com>
Newsgroups: comp.databases.oracle.misc
Subject: Combining Stored Procedures?
Date: 7 Jul 2005 04:55:42 -0700
Organization: http://groups.google.com
Lines: 21
Message-ID: <1120737342.009643.285680@g49g2000cwa.googlegroups.com>
NNTP-Posting-Host: 193.120.164.7
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1120737347 6710 127.0.0.1 (7 Jul 2005 11:55:47 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 7 Jul 2005 11:55:47 +0000 (UTC)
User-Agent: G2/0.2
Complaints-To: groups-abuse@google.com
Injection-Info: g49g2000cwa.googlegroups.com; posting-host=193.120.164.7;
   posting-account=0EcQhw0AAACr1vJjh6U7xZglkeKZii8Q
Xref: dp-news.maxwell.syr.edu comp.databases.oracle.misc:120371

I have two stored procedures

ALTER PROCEDURE dbo.qryCountOne
(@inputID int)
AS SELECT COUNT(*) AS CountOne FROM  dbo.TableOne WHERE
(dbo.TableOne.value  = @inputID)

ALTER PROCEDURE dbo.qryCountTwo
(@inputID int)
AS SELECT COUNT(*) AS CountTwo FROM  dbo.TableTwo WHERE
(dbo.TableTwo.value  = @inputID)

What would be the best way to combine these two, so that I only have to
make one database query, and the two values (CountOne, and CountTwo)
will get returned to me


Any help\pointers greatly appreciated,

Noel

