NigelRocks
asked on
Varchar and Bit Incompatible??
Experts,
In the attached stored proc, I'm getting this error when I try to compile it:
"The data types varchar and bit are incompatible in the add operator."
What is this?
In the attached stored proc, I'm getting this error when I try to compile it:
"The data types varchar and bit are incompatible in the add operator."
What is this?
USE [Gift_Tracker]
GO
/****** Object: StoredProcedure [dbo].[sp_GiftNew] Script Date: 12/10/2007 02:48:03 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[sp_GiftNew]
@GiftName varchar(75)
,@GiftDescription varchar(256)
,@GiftYear DateTime
,@Occasion varchar(2)
,@Requested bit
AS
DECLARE @INSERT varchar(1024)
SET @INSERT = 'INSERT INTO GIFTS '
SET @INSERT = @INSERT + '(Gift_Name,Gift_Description,Gift_Year,Occasion,Requested) '
SET @INSERT = @INSERT + 'VALUES(' + @GiftName + ',' + @GiftDescription
SET @INSERT = @INSERT + ',' + @GiftYear + ',' + @Occasion
SET @INSERT = @INSERT + ',' + @Requested + ')'
EXEC (@INSERT)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER