Viewing 15 posts - 991 through 1,005 (of 1,439 total)
Thanks for the feedback. One thing I noticed however, is that the query may not produce correct results if the activities overlap. It can be fixed, but may not be...
____________________________________________________
Deja View - The strange feeling that somewhere, sometime you've optimised this query before
How to get the best help on a forum
http://www.sqlservercentral.com/articles/Best+Practices/61537
November 26, 2009 at 7:26 am
I've had a quick look at this, I think that when the total drive time becomes zero, such when
an activity completely overlaps the drivetime, the drivetime isn't displayed.
You can see...
____________________________________________________
Deja View - The strange feeling that somewhere, sometime you've optimised this query before
How to get the best help on a forum
http://www.sqlservercentral.com/articles/Best+Practices/61537
November 26, 2009 at 5:02 am
dale_keller (11/25/2009)
____________________________________________________
Deja View - The strange feeling that somewhere, sometime you've optimised this query before
How to get the best help on a forum
http://www.sqlservercentral.com/articles/Best+Practices/61537
November 25, 2009 at 2:21 pm
It's not totally clear what you want, but try this
WITH CTE AS(
SELECT Column_A,Column_B,Column_C,
COUNT(*) OVER(PARTITION BY Column_A) AS cn
FROM mytable)
SELECT Column_A,Column_B,Column_C
FROM CTE
WHERE cn=1
____________________________________________________
Deja View - The strange feeling that somewhere, sometime you've optimised this query before
How to get the best help on a forum
http://www.sqlservercentral.com/articles/Best+Practices/61537
November 25, 2009 at 11:15 am
SELECT SUM(CASE WHEN tblUseOfForce.Taser=1 THEN 1 ELSE 0 END) AS Taser,
SUM(CASE WHEN tblUseOfForce.PhysicalForce=1 THEN 1 ELSE 0 END) AS PhysicalForce
FROM tblUseOfForce INNER JOIN
tblIncident...
____________________________________________________
Deja View - The strange feeling that somewhere, sometime you've optimised this query before
How to get the best help on a forum
http://www.sqlservercentral.com/articles/Best+Practices/61537
November 25, 2009 at 6:32 am
eddy-644184 (11/24/2009)
Tnx for your help,
The provided code seems to do the trick, for witch i send you a lot of thanks,
I'm really not strong when dates come into play.
The...
____________________________________________________
Deja View - The strange feeling that somewhere, sometime you've optimised this query before
How to get the best help on a forum
http://www.sqlservercentral.com/articles/Best+Practices/61537
November 24, 2009 at 8:30 am
Probably a bit overcomplex, but seems to give the correct results.
WITH Starts(drtid,starttime) AS (
SELECT b.drtid,
b.starttime
FROM @tDriveTimes b
WHERE NOT EXISTS(SELECT...
____________________________________________________
Deja View - The strange feeling that somewhere, sometime you've optimised this query before
How to get the best help on a forum
http://www.sqlservercentral.com/articles/Best+Practices/61537
November 24, 2009 at 4:04 am
Something like this?
WITH CTE AS (
SELECT SoldTo,
ShipTo,
PriceType,
Value,
...
____________________________________________________
Deja View - The strange feeling that somewhere, sometime you've optimised this query before
How to get the best help on a forum
http://www.sqlservercentral.com/articles/Best+Practices/61537
November 23, 2009 at 7:30 am
C# Screw (11/19/2009)
Hi PaulDoes this particular function with pointers put SQL server at risk?
Does the use of pointers create a memory overwrite issue?
As long as there are unchecked memory accesses,...
____________________________________________________
Deja View - The strange feeling that somewhere, sometime you've optimised this query before
How to get the best help on a forum
http://www.sqlservercentral.com/articles/Best+Practices/61537
November 19, 2009 at 4:09 am
C# Screw (11/19/2009)
SQL function: Replace Technique : but using replacement chars ||*9*9||
2634
SQL function :Brigzy (C#Screw) Looping
2514
SQL function: Jeff Original : single...
____________________________________________________
Deja View - The strange feeling that somewhere, sometime you've optimised this query before
How to get the best help on a forum
http://www.sqlservercentral.com/articles/Best+Practices/61537
November 19, 2009 at 2:30 am
C# Screw (11/19/2009)
Error1CREATE ASSEMBLY for assembly 'RemoveSpace_CLR' failed because assembly 'RemoveSpace_CLR' failed verification. Check if the referenced assemblies are up-to-date and trusted...
____________________________________________________
Deja View - The strange feeling that somewhere, sometime you've optimised this query before
How to get the best help on a forum
http://www.sqlservercentral.com/articles/Best+Practices/61537
November 19, 2009 at 2:10 am
Paul White (11/18/2009)
Mark-101232 (11/18/2009)
Just out of interest I converted your code to use pointers which improved performance by 5-10%. Not that I would recommend using UNSAFE code though...
Hey Mark,
Wouldn't...
____________________________________________________
Deja View - The strange feeling that somewhere, sometime you've optimised this query before
How to get the best help on a forum
http://www.sqlservercentral.com/articles/Best+Practices/61537
November 19, 2009 at 2:00 am
Paul White (11/18/2009)
This seems to be the fastest method so far (on my machine at least)...would one or more of you please try it out?
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;
public...
____________________________________________________
Deja View - The strange feeling that somewhere, sometime you've optimised this query before
How to get the best help on a forum
http://www.sqlservercentral.com/articles/Best+Practices/61537
November 18, 2009 at 6:07 am
SELECT DB_NAME()
____________________________________________________
Deja View - The strange feeling that somewhere, sometime you've optimised this query before
How to get the best help on a forum
http://www.sqlservercentral.com/articles/Best+Practices/61537
November 11, 2009 at 10:03 am
SQL Learner-684602 (11/9/2009)
it works fine for all the string ..but doesn't work for 0000 string
it only removes one 0
I want to make it single 0 if it is...
____________________________________________________
Deja View - The strange feeling that somewhere, sometime you've optimised this query before
How to get the best help on a forum
http://www.sqlservercentral.com/articles/Best+Practices/61537
November 10, 2009 at 12:47 am
Viewing 15 posts - 991 through 1,005 (of 1,439 total)