|
 |
asp_databases thread: SQL server - query on a query
Message #1 by "David Bosomworth" <david@s...> on Fri, 31 Aug 2001 14:04:28
|
|
Hi,
Having upgraded from Access to SQL I'm having some "issues"
One of these is that I'm having probems with a stored procedure which
queries another stored procedure (see below)
Firstly is this possible in SQL server, if so - am I doing something wrong
below??
TIA
dave
CREATE PROCEDURE [qoaUserProductCount]
(
@userId int
)
AS
SELECT Count(qoaUserProductList.prodId) AS CountOfprodId
FROM qoaUserProductList;
Message #2 by Kyle Burns <kburns@c...> on Fri, 31 Aug 2001 10:34:01 -0500
|
|
Is qoaUserProductList a View?
=================================
Kyle M. Burns, MCSD
ECommerce Technology Manager
Centra Credit Union
kburns@c...
-----Original Message-----
From: David Bosomworth [mailto:david@s...]
Sent: Friday, August 31, 2001 9:04 AM
To: ASP Databases
Subject: [asp_databases] SQL server - query on a query
Hi,
Having upgraded from Access to SQL I'm having some "issues"
One of these is that I'm having probems with a stored procedure which
queries another stored procedure (see below)
Firstly is this possible in SQL server, if so - am I doing something wrong
below??
TIA
dave
CREATE PROCEDURE [qoaUserProductCount]
(
@userId int
)
AS
SELECT Count(qoaUserProductList.prodId) AS CountOfprodId
FROM qoaUserProductList;
Message #3 by "David Bosomworth" <david@s...> on Fri, 31 Aug 2001 16:50:42
|
|
No (sorry should have explained);
qoaUserProductList is a stored procedure
The parameter @userId is a parameter which is passed to the stored
procedure: qoaUserProductList
> Is qoaUserProductList a View?
>
> =================================
> Kyle M. Burns, MCSD
> ECommerce Technology Manager
> Centra Credit Union
> kburns@c...
>
>
>
> -----Original Message-----
> From: David Bosomworth [mailto:david@s...]
> Sent: Friday, August 31, 2001 9:04 AM
> To: ASP Databases
> Subject: [asp_databases] SQL server - query on a query
>
>
> Hi,
>
> Having upgraded from Access to SQL I'm having some "issues"
>
> One of these is that I'm having probems with a stored procedure which
> queries another stored procedure (see below)
>
> Firstly is this possible in SQL server, if so - am I doing something
wrong
> below??
>
> TIA
>
> dave
>
> CREATE PROCEDURE [qoaUserProductCount]
> (
> @userId int
> )
> AS
>
> SELECT Count(qoaUserProductList.prodId) AS CountOfprodId
> FROM qoaUserProductList;
>
Message #4 by Kyle Burns <kburns@c...> on Fri, 31 Aug 2001 12:41:59 -0500
|
|
You can't query a stored proc. Try creating a view and running your query
against the view.
=================================
Kyle M. Burns, MCSD
ECommerce Technology Manager
-----Original Message-----
From: David Bosomworth [mailto:david@s...]
Sent: Friday, August 31, 2001 11:51 AM
To: ASP Databases
Subject: [asp_databases] RE: SQL server - query on a query
No (sorry should have explained);
qoaUserProductList is a stored procedure
The parameter @userId is a parameter which is passed to the stored
procedure: qoaUserProductList
> Is qoaUserProductList a View?
>
> =================================
> Kyle M. Burns, MCSD
> ECommerce Technology Manager
> Centra Credit Union
> kburns@c...
>
>
>
> -----Original Message-----
> From: David Bosomworth [mailto:david@s...]
> Sent: Friday, August 31, 2001 9:04 AM
> To: ASP Databases
> Subject: [asp_databases] SQL server - query on a query
>
>
> Hi,
>
> Having upgraded from Access to SQL I'm having some "issues"
>
> One of these is that I'm having probems with a stored procedure which
> queries another stored procedure (see below)
>
> Firstly is this possible in SQL server, if so - am I doing something
wrong
> below??
>
> TIA
>
> dave
>
> CREATE PROCEDURE [qoaUserProductCount]
> (
> @userId int
> )
> AS
>
> SELECT Count(qoaUserProductList.prodId) AS CountOfprodId
> FROM qoaUserProductList;
|
|
 |