Viewing 15 posts - 1,636 through 1,650 (of 1,825 total)
GSquared (8/19/2009)
Okay, I'll bite. Why is that one surprising?
Just simply because after 10 years+ of solid TSQL work, i'd never needed to do that.
You learn something new everyday 🙂
August 19, 2009 at 6:58 am
What dont you get ?
I was just pointing out that the query plan does look strange .
More often than not this is caused but out of date stats, and that...
August 19, 2009 at 6:36 am
What Does
declare @ID1 as uniqueIdentifier
Set @ID1 = '3f082c39-c69f-472d-9e56-0f23f82e2326'
SELECT *
from JobCategoryRecord JCR
Where JCR.ID = @ID1
do in terms of a query plan?
JobCategoryRecord is a view on tb_JobCategory...
August 19, 2009 at 5:29 am
That will be for the Query version , not the stored procedure , correct ?
August 19, 2009 at 4:57 am
Google is your friend...
http://searchwindowsserver.techtarget.com/sDefinition/0,,sid68_gci969765,00.html
August 19, 2009 at 4:22 am
Please post query plans as per this article
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
It will take the guess work out of it.
August 19, 2009 at 4:19 am
On a more positive note, a question that made me think, "CAN you do that" ?
http://www.sqlservercentral.com/Forums/Topic773249-145-1.aspx
August 19, 2009 at 3:08 am
Not much different
select a =1 into #tabx
union
select a=2
August 19, 2009 at 2:21 am
Just as an aside to that , on the few occasions that ive used 'where current of' ive found it to be pretty poorly performing.
August 19, 2009 at 1:45 am
Ok , ill back track a bit :Whistling:
I was using count(*) in my testing not count(columnname) , which as you point out does not count nulls.
But it still needs to...
August 18, 2009 at 5:35 am
I think Dave is a bit cross-eyed this morning! 🙂
The OP is JOINing on ClientID but COUNTing BackupID. This could contain NULLs producing an COUNT of zero.
Its afternoon in London...
August 18, 2009 at 5:16 am
Dave - why do you think that this will not work?
Because the inner join will fail ,ie join to no rows therefore, no rows will be returned to count to...
August 18, 2009 at 4:50 am
This may not be exactly right as i dont know your data but try
with cteInvoices(Reference,InvoiceDate,InvoiceYear,InvoiceMonth,ServiceOrderCategory,
...
August 18, 2009 at 4:43 am
You cant as the return columns are processed after the join and filter conditions
You can do...
SELECT COUNT(dbo.tblBackup.BackupID) AS Total, dbo.tblClient.ClientName
FROM dbo.tblClient INNER JOIN
dbo.tblBackup ON dbo.tblClient.ClientID = dbo.tblBackup.ClientID
WHERE (dbo.tblBackup.BackupDate BETWEEN '2009-08-17...
August 18, 2009 at 3:48 am
Then this should do
with cteSites(SiteID, Priority , Value ,RowN )
as
(
select SiteID ,Priority , Value ,row_number() over ( partition by siteId...
August 18, 2009 at 3:34 am
Viewing 15 posts - 1,636 through 1,650 (of 1,825 total)