Hi,
I'm Newbie of Store Procedure.
Below is my Store Procedure code :
I need to count if notified message found inside database > 0 then pop up message.
sql Code:
USE [Maintenance] GO /****** Object: StoredProcedure [WANSERN\wansern].[sp_WoBreakDownNotif] Script Date: 12/18/2007 11:50:11 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [WANSERN\wansern].[sp_WoBreakDownNotif] -- Add the parameters for the stored procedure here @myStatus varchar(50) AS SELECT dbo.Notif_WO.Ref_No, dbo.Notif_WO.MsgLoc, dbo.Machine_Desc.Mac_Code, dbo.WOList.Date_WO, dbo.WOList.Dept, dbo.WOList.Ref_To FROM dbo.WOList INNER JOIN dbo.Machine_Desc ON dbo.WOList.Mac_Code = dbo.Machine_Desc.Mac_Code INNER JOIN dbo.Notif_WO ON dbo.WOList.Ref_No = dbo.Notif_WO.Ref_No WHERE dbo.Notif_WO.Status = @myStatus BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Insert statements for procedure here END
Another Question : How to call Store procedure from SQL Express via VB6 ?
Thanks for help ....




Reply With Quote