drop table [dbo].[ChannelsDetails] GO
CREATE TABLE [dbo].[Channels] ( [ID] [int] IDENTITY (1, 1) NOT NULL , [URL] [varchar] (1000) COLLATE Chinese_PRC_CI_AS NULL , [Channel] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL , [Title] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL , [Description] [varchar] (1000) COLLATE Chinese_PRC_CI_AS NULL , [link] [varchar] (500) COLLATE Chinese_PRC_CI_AS NULL , [language] [varchar] (10) COLLATE Chinese_PRC_CI_AS NULL , [generator] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL , [ttl] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL , [copyright] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL , [pubDate] [datetime] NULL , [category] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL , [dclanguage] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ) ON [PRIMARY] GO
CREATE TABLE [dbo].[ChannelsDetails] ( [ID] [int] IDENTITY (1, 1) NOT NULL , [ChannelID] [int] NULL , [title] [varchar] (8000) COLLATE Chinese_PRC_CI_AS NULL , [link] [varchar] (8000) COLLATE Chinese_PRC_CI_AS NULL , [description] [varchar] (8000) COLLATE Chinese_PRC_CI_AS NULL , [category] [varchar] (8000) COLLATE Chinese_PRC_CI_AS NULL , [author] [varchar] (8000) COLLATE Chinese_PRC_CI_AS NULL , [pubDate] [datetime] NULL , [comments] [varchar] (8000) COLLATE Chinese_PRC_CI_AS NULL , [guid] [varchar] (8000) COLLATE Chinese_PRC_CI_AS NULL , [trackbackping] [varchar] (8000) COLLATE Chinese_PRC_CI_AS NULL ) ON [PRIMARY] GO
SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO
CREATE proc SP_AddChannel @URL varchar(8000) ,@link varchar(8000) ,@Channel varchar(8000) ,@Title varchar(8000) ,@Image varchar(8000) ,@Description varchar(7999) ,@language varchar(8000) ,@generator varchar(8000) ,@ttl varchar(8000) ,@copyright varchar(8000) ,@pubDate datetime ,@category varchar(8000) ,@Docs varchar(8000) ,@ManagingEditor varchar(8000) ,@dclanguage varchar(8000) ,@ int out as set @ = 0 insert into Channels ([URL],[Channel],[Title],[Description],[link],[language],[generator],[ttl],[copyright],[pubDate],[category],[dclanguage]) select @URL,@Channel,@Title,@Description,@link,@language,@generator,@ttl,@copyright,@pubDate,@category,@dclanguage where not exists(select 1 from Channels where [URL] = @URL) select @ = SCOPE_IDENTITY() GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO
SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO
CREATE proc SP_AddChannelsDetails @URL varchar(8000) ,@Title varchar(8000) ,@Description varchar(7000) ,@link varchar(8000) ,@pubDate datetime ,@category varchar(8000) ,@Comments varchar(8000) ,@Guid varchar(8000) ,@trackbackping varchar(8000) ,@ int out as set @ = 0 insert into ChannelsDetails ([ChannelID],[Title],[Description],[link],[pubDate],[category],[comments],[guid],[trackbackping]) |