Thank you for that.

Speed is what we need.
  ----- Original Message ----- 
  From: Robertson-Ravo, Neil (RX) 
  To: '[EMAIL PROTECTED]' 
  Sent: Friday, October 17, 2003 11:23 AM
  Subject: [cfmail] RE: [ cf-dev ] Stored Procedures


  One thing to note : you should not really, for a performance point of view,
  name any user sprocs as "sp_xxx"  SQL Server will first look into the Master
  database for your sp and in some cases can increase parsing time.   If you
  name them as say udfsp_ as an example, the SQL server will look in the
  current database for them and ignore the master look up.

  You also do not require dbo. as this associates that sp with the current
  logged in user and can lead to issue when dropping/altering etc at a later
  stage when importing etc.

  HTH

  N

  -----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]


Reply via email to