Viewing 15 posts - 19,651 through 19,665 (of 26,490 total)
Hint:
declare @value int;
update sometable set
somecolumn = somevalue;
set @value = @@rowcount;
insert into sometable
select * from someothertable;
set @value = @value + @@rowcount;
exec dbo.InsertRowCounts 26,'Description',@value;
How's that for a hint?
July 22, 2009 at 9:06 am
Looks good to me. Test it in a test environment first just to be sure.
July 22, 2009 at 8:40 am
Care to explain the problem? LCK_M_IX is an Intent-Exclusive lock.
July 22, 2009 at 8:38 am
Have you bothered to read BOL (Books Online, the SQL Server Help System that can be accessed from SSMS by simply pressing the {f1} function key)?
July 22, 2009 at 8:34 am
You aren't holding your tongue in the right position. :w00t:
Really, you ask a question expecting an answer and don't even bother to show us anyhting?? Please read the first...
July 22, 2009 at 8:32 am
okay,
declare @value int;
update sometable set
somecolume = somevalue;
set @value = @@rowcont;
exec dbo.InsertRowCount 26,'Description',@value;
Help a little more?
As to writing your code for you, no. You give it...
July 22, 2009 at 8:27 am
Also, the table and data provided to seem to match what you showed us in your original post. How about a little more information about what you are looking...
July 22, 2009 at 8:23 am
It would also be nice if you had two or three individuals in the sample data instead of just one.
July 22, 2009 at 8:21 am
peter.nguyen (7/22/2009)
Hi Lynnattached are the table ddl and sample inserts
thanks
Okay, but what about the expected results based on the sample data?
July 22, 2009 at 8:19 am
General frame work:
update tablename set
somecolumn = @somevalue;
set @value = @@rowcount -- capture how many rows were updated;
exec dbo.insertcounts 26,'description',@value;
Does this hint help?
July 22, 2009 at 8:14 am
Is CDate the leading column on any or all of the indexes?
July 22, 2009 at 7:04 am
Look up Query Notifications in BOL (Books Online). It was a feature added in SQL Server 2005. This is probably what you are looking for.
July 22, 2009 at 6:54 am
Okay, still haven't had enough caffine this morning. I got this one wrong because i misread the question.
July 22, 2009 at 6:49 am
The reason it is failing is because your default date format is dmy. Here is some test code I ran here at home.
set dateformat mdy
select cast('2009-07-23 00:00:00' as datetime)...
July 22, 2009 at 6:34 am
johan.brohn (7/22/2009)
Yes, Kenneth's works but Ken McKelvey's (the one I quoted) doesnt
Sorry, still half a sleep. Need more caffine.
July 22, 2009 at 6:21 am
Viewing 15 posts - 19,651 through 19,665 (of 26,490 total)