Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Combining Stored Procedures?

Re: Combining Stored Procedures?

From: DA Morgan <damorgan_at_psoug.org>
Date: Thu, 07 Jul 2005 06:21:17 -0700
Message-ID: <1120742505.545890@yasure>


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_at_x.washington.edu (replace x with u to respond)
Received on Thu Jul 07 2005 - 08:21:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US