USE [dbEmail_New]
GO
/****** Object: UserDefinedDataType [dbo].[IDString] Script Date: 09/09/2011 10:20:07 ******/
CREATE TYPE [dbo].[IDString] FROM [varchar](36) NULL
GO
/****** Object: UserDefinedDataType [dbo].[ImageFile] Script Date: 09/09/2011 10:20:07 ******/
CREATE TYPE [dbo].[ImageFile] FROM [image] NULL
GO
/****** Object: UserDefinedDataType [dbo].[ListNo] Script Date: 09/09/2011 10:20:07 ******/
CREATE TYPE [dbo].[ListNo] FROM [decimal](10, 6) NOT NULL
GO
/****** Object: UserDefinedDataType [dbo].[LongAscii] Script Date: 09/09/2011 10:20:07 ******/
CREATE TYPE [dbo].[LongAscii] FROM [varchar](255) NULL
GO
/****** Object: UserDefinedDataType [dbo].[LongFloat] Script Date: 09/09/2011 10:20:07 ******/
CREATE TYPE [dbo].[LongFloat] FROM [decimal](28, 6) NULL
GO
/****** Object: UserDefinedDataType [dbo].[LongNumber] Script Date: 09/09/2011 10:20:07 ******/
CREATE TYPE [dbo].[LongNumber] FROM [int] NULL
GO
/****** Object: UserDefinedDataType [dbo].[LongString] Script Date: 09/09/2011 10:20:07 ******/
CREATE TYPE [dbo].[LongString] FROM [nvarchar](255) NULL
GO
/****** Object: UserDefinedDataType [dbo].[MediumFloat] Script Date: 09/09/2011 10:20:07 ******/
CREATE TYPE [dbo].[MediumFloat] FROM [decimal](16, 6) NULL
GO
/****** Object: UserDefinedDataType [dbo].[MediumString] Script Date: 09/09/2011 10:20:07 ******/
CREATE TYPE [dbo].[MediumString] FROM [nvarchar](100) NULL
GO
/****** Object: UserDefinedDataType [dbo].[SQLString] Script Date: 09/09/2011 10:20:07 ******/
CREATE TYPE [dbo].[SQLString] FROM [varchar](1500) NULL
GO
/****** Object: UserDefinedDataType [dbo].[ShortFloat] Script Date: 09/09/2011 10:20:07 ******/
CREATE TYPE [dbo].[ShortFloat] FROM [decimal](10, 4) NULL
GO
/****** Object: UserDefinedDataType [dbo].[ShortNumber] Script Date: 09/09/2011 10:20:07 ******/
CREATE TYPE [dbo].[ShortNumber] FROM [tinyint] NULL
GO
/****** Object: UserDefinedDataType [dbo].[ShortString] Script Date: 09/09/2011 10:20:07 ******/
CREATE TYPE [dbo].[ShortString] FROM [nvarchar](50) NULL
GO
/****** Object: UserDefinedDataType [dbo].[VeryLongString] Script Date: 09/09/2011 10:20:07 ******/
CREATE TYPE [dbo].[VeryLongString] FROM [nvarchar](500) NULL
GO
/****** Object: UserDefinedDataType [dbo].[VeryLongString2] Script Date: 09/09/2011 10:20:07 ******/
CREATE TYPE [dbo].[VeryLongString2] FROM [nvarchar](4000) NULL
GO
/****** Object: UserDefinedDataType [dbo].[VeryShortString] Script Date: 09/09/2011 10:20:07 ******/
CREATE TYPE [dbo].[VeryShortString] FROM [nvarchar](25) NULL
GO
/****** Object: StoredProcedure [dbo].[up_ExportDupli_MailingList_Sel] Script Date: 09/09/2011 10:20:07 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[up_ExportDupli_MailingList_Sel]
(
@WhereCause nvarchar(2000)
)
AS
BEGIN
DECLARE @SqlString nvarchar(2000)
SET @SqlString =
'select count(EmailAddress),EmailAddress
from MailingListDetail '+ @WhereCause+'
group by EmailAddress
having count(EmailAddress)> 1'
EXEC (@SqlString)
END
GO
/****** Object: StoredProcedure [dbo].[up_SendEmail_Sel_All] Script Date: 09/09/2011 10:20:08 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[up_SendEmail_Sel_All]
(
@WhereCause nvarchar(2000)
)
AS
BEGIN
DECLARE @SqlString nvarchar(4000)
Set @SqlString ='SELECT * FROM SendEmail SE
WHERE SE.IsDeleted = 0
'+@WhereCause
EXEC (@SqlString)
END