Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!drn.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-04!sn-xit-12!sn-xit-01!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
From: DA Morgan <damorgan@psoug.org>
Newsgroups: comp.databases.oracle.misc
Subject: Re: Combining Stored Procedures?
Date: Thu, 07 Jul 2005 06:21:17 -0700
Organization: Ye 'Ol Disorganized NNTPCache groupie
Message-ID: <1120742505.545890@yasure>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: en-us, en
MIME-Version: 1.0
References: <1120737342.009643.285680@g49g2000cwa.googlegroups.com>
In-Reply-To: <1120737342.009643.285680@g49g2000cwa.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cache-Post-Path: yasure!unknown@oracle.advtechserv.com
X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/)
X-Complaints-To: abuse@supernews.com
Lines: 39
Xref: dp-news.maxwell.syr.edu comp.databases.oracle.misc:120373

Noel wrote:
> 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

Leaving open the possibility that you somehow confused Oracle
with being a Microsoft product ... Please allow me to reinforce what 
Sybrand said.

1. You can not ever assume that anything valid in SQL Server is
    valid in Oracle and the reverse is equally true too.

2. Nothing you posted has anything to do with Oracle or Oracle syntax.

3. Purchase Tom Kyte's book "Expert one-on-one Oracle" and don't write
    another line of code until you've finished the first 3 chapters and
    then gone to http://tahiti.oracle.com and read the Concepts manuals.
-- 
Daniel A. Morgan
http://www.psoug.org
damorgan@x.washington.edu
(replace x with u to respond)
