Viewing 15 posts - 91 through 105 (of 275 total)
Not exactly sure what you are basing "rank" and "percentage" on, but maybe you could combine your approaches and reduce the overhead enough to be acceptable:
SELECT
...
Scott Pletcher, SQL Server MVP 2008-2010
August 13, 2010 at 4:31 pm
Also, it's risky to base your security practices on read-only access.
What happens a year from now when the app needs changed to allow UPDATEs / DELETEs? Your security approach...
Scott Pletcher, SQL Server MVP 2008-2010
August 12, 2010 at 1:28 pm
Certain conditions make a plan uncacheable as well.
For example, a literal > 8K. That used to be just a weird quirk, not really applicable in real life ... but...
Scott Pletcher, SQL Server MVP 2008-2010
August 12, 2010 at 10:09 am
SQL Server will cash plan for any query, no matter where it's coming from.
That's not true.
Scott Pletcher, SQL Server MVP 2008-2010
August 12, 2010 at 9:25 am
my point was that combining correct literal encoding with GRANT SELECT is impervious to "sql injection" attacks when reading data
Yes, but sometimes users need the capability to UPDATE and, on...
Scott Pletcher, SQL Server MVP 2008-2010
August 12, 2010 at 7:53 am
You could try this and see what it does:
insert into combined_stats_agg
SELECT r.mf_cd+2000 as mf_cd, r.mkt_id,
r.mf_dt, c.mf_nm, r.mf_val
FROM (
...
Scott Pletcher, SQL Server MVP 2008-2010
August 11, 2010 at 4:49 pm
Order1, Line1, 1/1/2010, 1/13/2010, 0 --why 0?
Order1, Line2, 1/30/2010, 2/15/2010, 17 --1/30 - 1/13?
Order1, Line3, 2/15/2010, 2/17/2010, 2 --?? why not 0 for 2/15 - 2/15
Order2, Line1, 1/1/2010, 1/5/2010, 4...
Scott Pletcher, SQL Server MVP 2008-2010
August 11, 2010 at 4:17 pm
60 rows is probably not a large enough sample to show a performance affect.
Scott Pletcher, SQL Server MVP 2008-2010
August 10, 2010 at 11:05 am
I would think GROUP BY would have to be faster than ROW_NUMBER(), since SQL doesn't have to partition and generate row numbers, but it would be interesting to compare the...
Scott Pletcher, SQL Server MVP 2008-2010
August 10, 2010 at 9:22 am
SELECT CAST(CAST(Duration AS decimal(11, 2)) / 3600 AS decimal(6, 2)) AS DurationInHrs
Scott Pletcher, SQL Server MVP 2008-2010
August 9, 2010 at 4:38 pm
select dataId, code, imageName, min(loadid)
from @t1
group by dataId, code, imageName
Scott Pletcher, SQL Server MVP 2008-2010
August 9, 2010 at 4:33 pm
Nope, nothing better. NULLs must be checked separately.
Scott Pletcher, SQL Server MVP 2008-2010
August 9, 2010 at 8:30 am
Lol. Not sure, just an idea that pops into your head.
When you look at the output of version, you see that the first four consecutive digits in the result...
Scott Pletcher, SQL Server MVP 2008-2010
August 5, 2010 at 4:23 pm
Your rollback will likely take at least roughly twice as long as the original updates.
from dbo.Adm_History2 as ht inner join
OBBEAVER.USPA_check.dbo.RevID rc on rc.revno=ht.revno
Do you have an index on rc.revno?
For...
Scott Pletcher, SQL Server MVP 2008-2010
August 5, 2010 at 2:07 pm
SELECT SUBSTRING(@@VERSION, PATINDEX('%[0-9][0-9][0-9][0-9]%', @@VERSION), 4)
Scott Pletcher, SQL Server MVP 2008-2010
August 5, 2010 at 2:00 pm
Viewing 15 posts - 91 through 105 (of 275 total)