Viewing 15 posts - 1,726 through 1,740 (of 1,838 total)
OK, maybe I misunderstood ItemNo before. The problem is you'll need to SUM each of those values separately since they are not related. Maybe something with subqueries like:
select...
October 16, 2008 at 1:30 pm
You're getting the PackedQty = 2, because there are 2 records in OrderHeader where GroupNo = 1, and each of those has a record in the OrderDetail table with ItemNo...
October 16, 2008 at 1:02 pm
It may help to have a subquery in your FROM clause to do the summing:
...
FROM
(SELECT psid.SHIP_TO_CUST_ID,
SUM(psid.QTY_SHIPPED) SHIPPING_QTY,
SUM(psid.QTY_SHIPPED * psiiu.SHIPPING_VOLUME) SHIPPING_VOLUME
...
October 16, 2008 at 8:20 am
I'm thinking this will work better as a table valued function rather than a view, since you'll probably want to be reporting on different dates. Maybe something like this...
October 16, 2008 at 8:11 am
You mentioned that you have 12 databases with the largest being 3 Gig. Were you expecting these to grow much larger, say 10 times as big? How long...
October 14, 2008 at 2:09 pm
Here's a script that will create the script to move your nonclustered indexes back to Primary, at least for simple ones that only have one column. You may have...
October 13, 2008 at 3:12 pm
Ugh, OK I think it depends on the setting of large value types out of row for the table, and digging into it deeper, it looks like the default is...
October 13, 2008 at 2:56 pm
OK sorry, you're right. I misunderstood the nature of the problem.
October 13, 2008 at 2:40 pm
Subqueries with IN and EXISTS serve slightly different purposes. For this situation, an EXISTS subquery would be a correlated subquery, and the IN subquery would not have to be.
October 12, 2008 at 9:14 am
D'oh! this isn't the first time I've given someone a 2005 solution to a 2000 problem, sorry about that.
October 11, 2008 at 7:29 am
Gary Johnson (10/10/2008)
It would be interesting to see what performed better. 😉
Actually the DateAdd/DateDiff method seems to perform slightly better (like 6 milliseconds better over 25,000 rows) than convert to...
October 10, 2008 at 9:27 pm
I'd say you're on the right idea that the queries on heap tables are causing numerous pages to be loaded because the records can be so spread out. Depending...
October 10, 2008 at 2:50 pm
You'd probably be able to get better and more detailed answers on this from Microsoft's website itself:
http://msdn.microsoft.com/en-us/library/ms203721(SQL.90).aspx
Esentially it's a mechanism to allow queries that can find a word or word...
October 10, 2008 at 2:35 pm
meichner (10/10/2008)
October 10, 2008 at 2:31 pm
I don't think it would make sense to do a transaction within the trigger, especially if it's just doing 1 UPDATE statement. What makes more sense is a transaction...
October 10, 2008 at 1:40 pm
Viewing 15 posts - 1,726 through 1,740 (of 1,838 total)