You havent given your VARCHAR variable a length. try :
CREATE PROC dbo.sp_GetMenu @fuseaction varchar(200) AS SELECT * FROM Fuseactions WHERE MenuID = (SELECT MenuID FROM Fuseactions WHERE fuseaction = @fuseaction) ORDER BY MenuOrder GO -----Original Message----- From: Allan Cliff [mailto:[EMAIL PROTECTED] Sent: 17 October 2003 10:06 To: CF - List Subject: [ cf-dev ] Stored Procedures 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]
