Viewing 6 posts - 1 through 6 (of 6 total)
@duration is negative number....like -1,-2,-3
January 18, 2013 at 4:08 am
WHERE SomeNumber >=0 AND SomeNumber < 0
this is the actual condition: SubmitDate>=DATEADD(day,DATEDIFF(day,0,GETDATE()),@duration) AND SubmitDate < DATEADD(day,DATEDIFF(day,0,GETDATE()),1)
January 18, 2013 at 4:06 am
GilaMonster (1/17/2013)
Index on (IsDeleted, SubmitDate DESC) include (ProdName,Category,TotalStock,Price)
What would be the exact sql query to create the index.
btw, that's a rather odd predicate on the date column...
how can you ellaborate...
January 17, 2013 at 9:28 pm
For better solution.post that Query
select ProdName,Category,TotalStock,Price from Product where SubmitDate>=' ' and SubmitDate<' ' and IsDeleted=0 order by SubmitDate Desc
January 17, 2013 at 5:12 am
Why not?
I don't know, i have no experience of implementing indexing till now. What i have read from online articles, its important to index the columns which comes in where...
January 17, 2013 at 4:23 am
Do you always require "SELECT *" in your every query ?
the number of columns i need to display is 6-7 so i have put on * for the reference, in...
January 17, 2013 at 1:55 am
Viewing 6 posts - 1 through 6 (of 6 total)