I don't want to insert duplicate records into a table and many times this may happen so I am doing the following code below.it is not working and i think it may be because what i am passing is a date in the format of 28/04/2007 and a time in the format of 08:17:45I know sql doesn't have just a date or a time field so i tried converting the field but it didn't help.any advice?SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGO-- =============================================-- Author: <Author,,Name>-- Create date: <Create Date,,>-- Description: <Description,,>-- =============================================ALTER PROCEDURE [dbo].[spinsert] -- Add the parameters for the stored procedure here @name varchar(100), @date datetime, @time datetime, ASBEGINdeclare @recexists int -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON;select @recexists=count(id) from images where date=@date and convert(varchar,[time],108)=@time name=@nameif @recexists=0 begin insert into images(name,date,[time]) values(@name,@date,@time) end -- Insert statements for procedure here ENDGOSET ANSI_NULLS OFFGOSET QUOTED_IDENTIFIER OFFGO