Viewing 15 posts - 646 through 660 (of 3,011 total)
Jeff Moden (1/8/2012)
The Developers of SQL Server will occasionally make significant performance mistakes in their...
January 8, 2012 at 7:16 pm
bteraberry (1/6/2012)
... The argument against SOPA is sort of like saying the government should not be able to seize property involved in narcotics distribution ... because we don't want the...
January 7, 2012 at 12:28 am
bteraberry (1/6/2012)
Ninja's_RGR'us (1/6/2012)
I use on to make the jointhen I use where to filter data I don't need after the join is made
I think this is fairly standard and generally...
January 6, 2012 at 11:44 pm
Here is a solution that doesn't use conversion to character string and back again.
select
next_run_date ,
next_run_time ,
NEXT_RUN_DATETIME =
-- convert date
dateadd(dd,((next_run_date)%100)-1,
dateadd(mm,((next_run_date)/100%100)-1,
dateadd(yy,(nullif(next_run_date,0)/10000)-1900,0)))+
-- convert time
dateadd(ss,next_run_time%100,
dateadd(mi,(next_run_time/100)%100,
--dateadd(hh,nullif(next_run_time,0)/10000,0)))
-- Fix for prior line, because a time of 0...
January 6, 2012 at 2:44 pm
Function F_TABLE_DATE is a calendar function that returns a table containing a variety of attributes of all dates from @FIRST_DATE through @LAST_DATE. It is meant to be used to...
January 6, 2012 at 8:38 am
Sapen (1/4/2012)
January 4, 2012 at 6:23 pm
NJ-DBA (1/3/2012)
January 4, 2012 at 3:39 pm
The fact that the queries and updates are being run with isolation level of serializable is probably why you are getting deadlocks. There is rarely a good reason to...
January 4, 2012 at 2:05 pm
Shree-903371 (1/4/2012)
The ISO Week for above statement gives 51 but it should be 52.
Week 51 of 2011 is the correct ISO week for 2011-12-25. The ISO week is defined...
January 4, 2012 at 1:11 pm
ScottPletcher (1/3/2012)
But I don't understand the claim that "Optimistic Locking" has no overhead.
What about all those rollback/undo errors in Oracle? Oh...
January 3, 2012 at 7:37 pm
SQL Kiwi (1/3/2012)
Michael Valentine Jones (12/29/2011)
January 3, 2012 at 7:26 pm
There is no default order to any result set, unless you have an ORDER BY clause.
January 3, 2012 at 6:41 pm
Jeff Moden (12/30/2011)
...
And, yeah... there's nothing wrong with having a surrogate key as the PK and a natural key as an AK. 😉
Especially when the value of the natural...
December 30, 2011 at 11:45 pm
Welsh Corgi (12/29/2011)
CREATE FUNCTION udf_ConvertDB2toSQL
RETURNS DateTime
AS
BEGIN
DECLARE @CSC_DATE varchar(7)
DECLARE @SQLDate Datetime
SET @CSC_DATE = '1111130'
SET @SQLDate = (SELECT CAST(SUBSTRING(@CSC_DATE, 4 ,2)+ '/' +...
December 30, 2011 at 11:17 pm
VIG (12/30/2011)
DECLARE @time TIME = '20:10:10'
select total_seconds =DATEDIFF(second,0,cast(@time as datetime))
The time string can be directly assigned to a datetime variable as 1900-01-01 20:10:10:
DECLARE @time datetime = '20:10:10'
select total_seconds =DATEDIFF(second,0,@time)
And the...
December 30, 2011 at 10:47 pm
Viewing 15 posts - 646 through 660 (of 3,011 total)