Posted on: 11/22/2012 4:44:47 AM | Views : 489

Using the statement if exist and union all.Its showing the error.pls see the query below
USE [Staples_Aggregator] GO /****** Object:  StoredProcedure [dbo].[SP_GET_IMAGE_SUPMAN]    Script Date: 11/22/2012 14:05:15 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- Batch submitted through debugger: SQLQuery4.sql|7|0|C:\Users\283866\AppData\Local\Temp\~vs2805.sql -- ============================================= -- Author:  <JANA> -- Create date: <21-NOV-2012> -- Description: <TO GET IMAGES OF DEFAULT SKU AND MANUFACTURER> -- ============================================= ALTER PROCEDURE [dbo].[SP_GET_IMAGE_SUPMAN]  @TicketID BIGINT  --@Supplier NVARCHAR(50),  --@SearchResult INT AS BEGIN  DECLARE @RES1 AS INT  DECLARE @RE ...

Go to the complete details ...