1. The rows listed below that are inserted into the parameter already exist
in the table itself.
2. The stored procedure uses a merge to delete all of the rows if they exist
in the source/target.
3. I get the following error on line 11: "The number of columns for each row
in a table value constructor must be the same."
4. In order, the tables columns are
HeadlineID,HeadlineTitle,HeadlineDescription,HeadlineContent,HeadlineStartDate,HeadlineEndDate,HeadlineLastUpdated.
I can't figure out why I keep getting this error when I had done the exact
same thing to test my insert with merge. Any ideas?
declare @Headlines as [Headlines].[HeadlinesTable]
insert into @Headlines
(HeadlineID,HeadlineTitle,HeadlineDescription,HeadlineContent,HeadlineStartDate,HeadlineEndDate,HeadlineLastUpdated)
values
(10,'rollback','Testing transactions that should work.','What is there to
say about inserts?','2010-03-12','2012-05-31',null),
(15,'rollback1','Testing transactions that should work. What is there to say
about inserts?','2010-03-12','2012-05-31',NULL),
(18,'rollback2','Testing transactions that should work. What is there to say
about inserts?','2010-03-12','2012-05-31',NULL),
(28,'rollback3','Testing insert','Who
knows?','2010-03-03','2010-11-05',NULL),
(30,'rollback4','Testing insert','Who
knows?','2010-03-03','2010-11-05',NULL)
go
exec [Headlines].[DeleteHeadlines] @Headlines
(10,
'rollback',
'Testing transactions that should work.',
'What is there to say about inserts?',
'2010-03-12',
'2012-05-31',
null),
(15,
'rollback1',
'Testing transactions that should work. What is there to say about
inserts?',
'2010-03-12',
'2012-05-31',
NULL),
Fitz
"Andy B." <a_b...@sbcglobal.net> wrote in message
news:OoD0zh1y...@TK2MSFTNGP05.phx.gbl...