Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
CREATE PROCEDURE [dbo].[sp_DisplayWidgets] @WidgetCode int = null, @Cost float = null AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; IF (@WidgetCode <> '') BEGIN SELECT * FROM Widgets WHERE WID=@WidgetCode END IF (@Cost <> '') BEGIN SELECT * FROM Widgets WHERE CID=1040 END IF (@WidgetCode = '') AND (@Cost = '') BEGIN SELECT * FROM Widgets END END --Example to execute --Returns all --sp_DisplayWidgets @WidgetCode='', @Cost='' -- Returns just Widgets with the ID of 4 --sp_DisplayWidgets @WidgetCode='4', @Cost='' --Returns just widgets with the Cost that match 1040 --sp_DisplayWidgets @WidgetCode='', @Cost='1040'
Join the community of 500,000 technology professionals and ask your questions.