Viewing 15 posts - 91 through 105 (of 1,824 total)
This sounds like an interview question.
You can achieve what you want through a DBCC command, take a look at books on line.
March 4, 2012 at 11:52 pm
Same reason for views , because an order clause in a CTE is irrelevant. The order of the returned result set is defined by the ORDER clause in the...
March 4, 2012 at 11:50 pm
Hi,
A quick win here might be to use an inline-table-valued function, rather than a scalar.
Something llike ...
CREATE function [dbo].[ReturnDate]
( @id int)
returns table
as
return(
select max(c.SDate)
from (Select distinct b.id, b.mDate
from...
March 3, 2012 at 12:53 am
This is a rolling balance problem ? correct ?
Quirky updates[/url] or a cursor are the way on those until sql2012.
March 2, 2012 at 12:01 am
piotrka (2/29/2012)
You can use datediff to skip the hoursSELECT ExamsId ,DateOfExam , PAPERNAME,
FROM TBLEXAM
WHERE PAPERID =2 AND datediff(dd,DateOfExam,GETDATE()) = 0
Personally i wouldnt do this due to sargability issues , ie...
February 29, 2012 at 1:37 pm
HomeWork ???
DateTime contains a date and a time , so although you think you are searching for a date (ie a whole 24hr period) you are not , you are...
February 29, 2012 at 1:15 pm
anthony.green (2/29/2012)
February 29, 2012 at 5:10 am
Since the reads / writes and Cpu are inline , i dont think this is a parameter sniffing or recompile issue.
Could be blocking ??
Could also be a slow down on...
February 28, 2012 at 12:14 am
Is a bit much isnt it !!
No way i know of, sorry
February 27, 2012 at 3:21 am
Jeff Moden (2/26/2012)
Dave Ballantyne (2/26/2012)
But more than it not being good functionaly, it is very bad practice.Ok... so what is the alternative best practice that you're offering?
Point 🙂 Best...
February 27, 2012 at 3:14 am
Glad you sorted it 😉
But.. I have to say your over reliance on UDFs here could be causing a large performance issue.
February 26, 2012 at 12:28 pm
Its all on the Microsoft site....
http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-433&locale=en-us
http://www.microsoft.com/learning/en/us/exam.aspx?ID=70-448&locale=en-us
What is not clear to you about the differences ?
February 26, 2012 at 4:56 am
First off ensure that the plans are the same , are you joining from/to the incoming data ?
Linked servers can behave in 'odd' ways
Maybe a SSIS task would be...
February 26, 2012 at 4:52 am
What version and SP are you running ?
I think 2005 RTM , upgrade to the latest SP and see if the issue re-occurs.
February 26, 2012 at 4:31 am
I have to agree with Joe here,
SQL is not good at this.
But more than it not being good functionaly, it is very bad practice. Carrying on...
February 26, 2012 at 4:21 am
Viewing 15 posts - 91 through 105 (of 1,824 total)