Viewing 15 posts - 31 through 45 (of 113 total)
Yeah, even though the indexes you modified now cover the output of the index scan on orders, they don't cover all the possible combinations of predicates. For example, if...
August 24, 2011 at 10:19 am
On or around line 287 you have a bunch of subqueries selecting counts from the @ipOrderStatusCodes with no outer references (meaning the subquery does not reference anything in the main...
August 23, 2011 at 1:20 pm
Thanks Gail,
I was kinda hoping it meant some problem, so I could say AHA! 😉
August 23, 2011 at 11:35 am
I'm not certain this will help in your case, but I noticed that you have a variable named @ipOrderGuid which is declared as a varchar(max)
You might try changing the type...
August 23, 2011 at 10:15 am
Ugh, never mind, it doesn't work...
I've found a method that works; for each subquery, I add a garbage wrapper, and then strip it off, taking with it the namespace declaration....
August 17, 2011 at 3:34 pm
A more general way is to take the original code that Phil suggested, and add a third join criterion based on the order:
WITH metric1Values AS (
SELECT MonthYear, Location, Metric1, ROW_NUMBER()...
August 17, 2011 at 3:14 pm
A more general way is to take the original code that Phil suggested, and add a third join criterion based on the order:
WITH metric1Values AS (
SELECT MonthYear, Location, Metric1, ROW_NUMBER()...
August 17, 2011 at 3:12 pm
If you're passing a single instance of the object, your best bet is to pass the individual properties of the video object as parameters to your stored proc. You...
August 17, 2011 at 10:01 am
Just learned this yesterday, so I'll post a quick aside: Dual is a dummy object with one row.
select 'foo' from dual
is equivalent to the tsql statement
select 'foo'
which is...
August 16, 2011 at 4:53 pm
Thanks for the reply, I was worried it would be something that complicated.
It's fine in this simple example, but that represents a couple days of coding. Better get started.
-a.
March 4, 2011 at 10:02 am
Also see Date Gap Problem and Finding gaps in a sequential number sequence[/url] for more help solving your problem.
March 3, 2011 at 5:54 pm
Unfortunately, I don't know of any tutorials.
You only _need_ to have scripts for the objects that are in development, but that tends to change, so I generally have scripts checked...
January 20, 2011 at 5:33 pm
Yeah, SQL doesn't do boolean values like in C based languages. The case statement returns a value that must be compared to something else to get a boolean.
http://msdn.microsoft.com/en-US/library/ms181765(v=SQL.90).aspx
January 20, 2011 at 3:20 pm
I think you're not going to get much help here, as this is not a TSQL question. For what it's worth, your TSQL looks fine. I do have...
January 20, 2011 at 3:15 pm
Two things you may find helpful are to separate your prod and test environments, and to modify your database objects through scripts rather than through SSMS.
The second is the key...
January 20, 2011 at 2:11 pm
Viewing 15 posts - 31 through 45 (of 113 total)