Shouldn't that be:

CREATE PROC dbo.sp_GetMenu
 
@fuseaction varchar
 
AS
 
SELECT  * 
FROM   Fuseactions
WHERE MenuID IN (SELECT MenuID FROM Fuseactions WHERE fuseaction = 
@fuseaction)
ORDER BY  MenuOrder

Terry

----------Original Message---------  

> Any ideas why this SP doesn't work? I have only used simple SPs before.
> If I remove the subquery then it returns results.
> 
> Can't you use subqueries in SPs like this, if not what is the solution.
> 
> Thanks
> 
> Allan
> 
> ------------------------------------------------------------------------
> 
> CREATE PROC dbo.sp_GetMenu
> 
> @fuseaction varchar
> 
> AS
> 
> SELECT  * 
> FROM   Fuseactions
> WHERE MenuID = (SELECT MenuID FROM Fuseactions WHERE fuseaction = 
> @fuseaction)
> ORDER BY  MenuOrder
> 
> GO
> 




-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to