Viewing 15 posts - 18,451 through 18,465 (of 18,923 total)
You mean this?
Select Account, DenialDate, Location, DenialCode, SUM(DeniedCharge) as SumDeniedCharge
GROUP BY Account, DenialDate, Location, DenialCode
Or this?
Select A.Account, A.DenialDate, A.Location, A.DenialCode, SUM(A.DeniedCharge) as SumDeniedCharge
(Select Distinct Account, DenialDate, Location, DenialCode, DeniedCharge) A
GROUP...
March 2, 2005 at 1:14 pm
Plan 1 and 3 are extactly the same. Obviously the isnull() plan takes 60% of the load which is expected.
R u getting different execution plan for the first and last...
March 2, 2005 at 1:12 pm
Looks like we're saying the same thing.
which of these is the closer to what you are thinking?
execute search into temp table without top 10
gives @@rowcount
select top 10 from temp table
or
Execute...
March 2, 2005 at 1:07 pm
UPDATE
pos
SET
pos.prev_yield = prev.prev_yield
FROM
@tbl_Position_Previous_Day prev inner join
@tbl_Position pos
on
prev.sec_id
= pos.sec_id
AND
prev.tick_lot
= pos.tick_lot
March 2, 2005 at 12:57 pm
Actually what he wants to accomplish is :
insert into @Table
Select * from ?? where .....
set @MyRowCount = @@RowCount
Select top 10 * from @Table
March 2, 2005 at 12:55 pm
Here's an exemple of one of my procs :
UPDATE F SET NewRank = dtMatchedRanks.AvailableRanking
FROM @ForcedMoves F INNER JOIN
(SELECT CurrentRank, AvailableRanking
FROM
(SELECT TOP 100 PERCENT Count(*) AS Temp_id, F1.CurrentRank
FROM @ForcedMoves...
March 2, 2005 at 12:33 pm
This doesn't seem to be a system stat, maybe it's a user stat that the system is using... or some index type that I don't know.
Are you sure that my...
March 2, 2005 at 12:28 pm
Won't this query be run multiple times
(select count(*) from authors) since it's a sub query
?
if I run this
use northwind
go
SET STATISTICS IO ON
select top 10 *, (select count(*) from...
March 2, 2005 at 12:23 pm
I didn't read the whole post... but from your last question :
Select DenialDate, Location, DenialCode, SUM(DeniedCharge) as SumDeniedCharge
GROUP BY DenialDate, Location,DenialCode
March 2, 2005 at 12:09 pm
Forgot to mention this :
indid >>
1 = Clustered index
>1 = non clustered
255 = used if the table as binary or text field(s)
0 = no clustered index
[EDITED]
0 = HEAP
March 2, 2005 at 12:05 pm
This is still personal preference :
1 - Cursor = £@£½¤¢¤[¼¢8(*?%(*?/$ £¢¤£¢¤
however I agree that they have their utility once in a while... especially hwen doing admin stuff like this.
2...
March 2, 2005 at 12:03 pm
I guess that my test case is wrong because when I run this :
set ansi_nulls off
Declare @FkParentOBJ as int
SET @FkParentOBJ = null
Select top 10 * from dbo.ObjSQL WHERE FkParentOBJ...
March 2, 2005 at 11:32 am
How's this for reverse engineering :
Select Object_name(id) as TableName, 'DROP STATISTICS [' + Object_name(id) +'].[' + name + ']' from dbo.SysIndexes where indid > 0 and indid 0...
March 2, 2005 at 11:22 am
It's not a table : run this in the master table
Select objectproperty(object_id('sysperfinfo'), 'TableIsFake')
It will return 1. This means than when you query that table, Sql server meterializes it so...
March 2, 2005 at 10:21 am
Viewing 15 posts - 18,451 through 18,465 (of 18,923 total)