Viewing 15 posts - 91 through 105 (of 224 total)
This sounds like a parameter sniffing issue, as it's differently behaved in SSMS and fixed by recompiling. There are two ways to easily get around parameter sniffing (perhaps more, but...
January 27, 2015 at 11:21 am
I suppose my usage of ID comes partly from C# programming, and it depends on the naming convention used in the database (which is almost never under my control so...
January 23, 2015 at 9:37 am
I found a related bug report from 2008 RTM.
It looks like this issue wasn't fully fixed until version 2012 because I'm running 2008 R2 and it's still a problem....
January 22, 2015 at 7:42 am
Added a transaction. These two update statements should always be grouped in an explicit transaction.
SET XACT_ABORT ON;
BEGIN TRAN;
with cte as
(
select userid, SUM(Amount) sumAmount
from @tblCompanyProess
...
January 20, 2015 at 2:06 pm
In the error message being returned you can add additional information to help pinpoint where the error occurs. You could add the name of the stored procedure.
Yes, I know...
January 15, 2015 at 5:10 pm
What I've found is that users don't often view an application as I do, and when they ask for a specific item, it's because they have a task they need....
January 15, 2015 at 12:23 pm
Even if it's readable, I wouldn't suggest using Stephanie's code. It reads the table 7 times which can become a nightmare on large tables.
Agreed. The other two candidate queries are...
January 14, 2015 at 8:11 am
I'm betting this could be more elegant and possibly use fewer CTEs, but I think it works.
DECLARE @YourTable TABLE (
CustomerID int,
ReadDate datetime,
usage int)
insert into @YourTable select 1,' 1 mar 2014',0
insert...
January 13, 2015 at 1:44 pm
Consider the conversion format 12, which prints the date as yymmdd. The first four characters of that date are what you desire. I'm not sure what you're looking for in...
January 13, 2015 at 12:17 pm
Jeff, thank you for the interview lead-in question about the current date--I am totally taking that!
I've been doing phone technical interviews for database developers. My first technical question has...
January 9, 2015 at 11:49 am
This is scary. Watch for a toxic person in this environment--it only takes one to catapult the entire workplace into crazy-land. If someone is being "thrown under the bus", then...
January 7, 2015 at 2:57 pm
Working at IT in the financial sector...
No, I don't see any of it coming true in 2015. Not where I am...
BYOD is an impossibility in this highly-regulated industry. Telecommuting is...
January 2, 2015 at 2:02 pm
Interesting idea...
We use SqlDataRecord and SqlMetaData to populate the rows of the table type in C#. I suppose the C# could look up the columns and add any...
April 18, 2013 at 9:27 am
Try adding SET NOCOUNT ON in the top of the trigger body.
http://stackoverflow.com/questions/4982403/sql-server-update-trigger-not-unique-insert-issue
April 12, 2012 at 1:36 pm
sturner (3/28/2012)
March 29, 2012 at 1:41 pm
Viewing 15 posts - 91 through 105 (of 224 total)