Viewing 15 posts - 226 through 240 (of 3,011 total)
TheSQLGuru (5/8/2013)
select
DT,
CAST(dt AS decimal(29,15))*86400 AS decdtsec2,
SecondsSince_19000101 =
-- seconds for whole days
(datediff(dd,0,a.DT)*000000000086400)+
-- seconds since start of...
May 8, 2013 at 2:45 pm
I think that you will find that dynamic SQL with sp_executesql almost always gives you the best performance.
The more optional parameters you have, the more likely it is that there...
May 8, 2013 at 2:30 pm
Jeffrey Williams 3188 (5/8/2013)
Michael Valentine Jones (5/8/2013)
selectDT,
SecondsSince_19000101 =
-- seconds for whole days as bigint
(datediff(dd,0,a.DT)*000000000086000)+
-- seconds since start of day
datediff(ss,dateadd(dd,datediff(dd,0,a.DT),0),a.DT)
from
( -- test data
select DT = getdate()union all
select DT = '99991231 23:59:59.997'union...
May 8, 2013 at 1:07 pm
select
DT,
SecondsSince_19000101 =
-- seconds for whole days
(datediff(dd,0,a.DT)*000000000086400)+
-- seconds since start of day
datediff(ss,dateadd(dd,datediff(dd,0,a.DT),0),a.DT)
from
( -- test data
select DT = getdate()union all
select DT = '99991231 23:59:59.997'union all
select DT = '18991231 12:01:01.997'union all
select DT =...
May 8, 2013 at 11:37 am
You were asking if it is supported, so Microsoft is the only one that could really make that call.
My guess is that they will tell you it is not supported,...
May 7, 2013 at 2:21 pm
Here is a solution using the ROUND function:
with test_data_cte as
(
select datavalue
from
(
values
(5.0000016), -- should be 5.01
(6.1000138), -- should be 6.11
(7.1200073), -- should be 7.13
(5.0000000), -- should be 5.00
(6.1000000), -- should be...
May 7, 2013 at 10:28 am
It would be best to do a shrink to the target size that you want to get the database file to, and then run a reindex or reorganize on all...
May 7, 2013 at 10:09 am
You should really ask Microsoft Support about that.
May 7, 2013 at 8:41 am
Scott Costello-401147 (5/6/2013)
Thanks so much for the reply. If I try and restore the FULL and then the DIFF for April 18th (skipping all the differentials between) I get...
May 6, 2013 at 9:53 am
If you are on a domain, a normal way to handle this is to have the Web server service account connect to the database server.
1. Create a role in the...
May 1, 2013 at 9:38 am
mah_j (4/28/2013)
I have a table with a clustered index and 6 non clustered indexes.The size of the table is 400G and logical fragmentation of the indexes are above 90%.
We...
April 30, 2013 at 9:38 am
You need to have a basic repertoire of networking jokes.
1. I know a great joke about UDP, but I'm not sure you'll get it.
2. I've got one about TCP packet...
April 24, 2013 at 2:39 pm
If that is the actual table structure, there seems to be no reason for the foreign key reference, since it is the primary key referencing itself.
At least you won't get...
April 19, 2013 at 11:11 am
bugg (4/19/2013)
Michael Valentine Jones (4/19/2013)
April 19, 2013 at 11:05 am
Since you are getting deadlocks between a select and an update, you can probably eliminate the problem by setting the database to use row version isolation (Read Committed Snapshot)
use master;
alter...
April 19, 2013 at 8:55 am
Viewing 15 posts - 226 through 240 (of 3,011 total)