Viewing 15 posts - 5,236 through 5,250 (of 5,504 total)
It seems like you've decided not to follow the article I referred to, since the way you provided sample data is named "The Wrong Way to Post Data".
Also, please take...
June 21, 2009 at 5:22 am
Please see the link in my signature on how to post sample data.
Considering your number of visits, I'd expect you to know how to ask question that get fast answers.
You...
June 21, 2009 at 3:30 am
Would you please post sample data and expected results together with the code you've tried so far?
To post xml code please use [ code="xml" ] tag.
Also, why do you specifically...
June 20, 2009 at 7:15 am
First of all, thank you for the way you've provided the sample data! Good job! 🙂
I'm not a "SQL master" but I'll try to do my best... 😉
One thing is...
June 20, 2009 at 6:19 am
The approach itself is indeed simple...
As far as I can see it's the document size (4GB) together with the way it's handled that causes low memory.
I recommend you change the...
June 20, 2009 at 5:54 am
Please have at look at BOL (BooksOnLine), section "ROUND function", sub section "C. Using ROUND to truncate".
Just out of curiosity:
Is it a coincidence having almost the identical question on...
June 20, 2009 at 5:35 am
There are four ways I can think of right now:
1) from the "target system" (Excel or Access), connect to the SQL Server and select the values you need,
2) use T-SQL...
June 20, 2009 at 4:54 am
Please have at look at BOL (BooksOnLine), section "ROUND function", sub section "C. Using ROUND to truncate".
June 20, 2009 at 2:40 am
Your expected output doesn't match the sample data provided and the day column contains invalid dates.
So the following solution is untested:
SELECT MIN(CONVERT(CHAR(10), a.DateTimeHours,120)), l.LocationFromLocationTo , AVG(a.Amount) as AvgAmount
FROM tblAmount...
June 20, 2009 at 2:34 am
You're welcome, again. 🙂
It's always good to get some feedback how the proposed solution works out for the OP. Thank you! 😉
June 19, 2009 at 2:52 pm
The translation of your requirement sounds like:
SUM(actual labor) GROUP BY batch, warehouse.
The actual labor cost is not directly stored in You're also mentioning a product ("labor per product").
If this is...
June 19, 2009 at 2:50 pm
after playing around a little bit I found another way to do it which might be faster on larger amount of data, since it's using less subqueries.
The "trick" is to...
June 19, 2009 at 2:04 pm
You're welcome! 🙂
June 19, 2009 at 1:39 pm
DECLARE @t TABLE (CTL VARCHAR(10), SI INT)
INSERT INTO @t
SELECT ' LG',0 UNION ALL
SELECT ' BSL',41 UNION ALL
SELECT ' SX',19 UNION ALL
SELECT '...
June 19, 2009 at 1:05 pm
Hi,
the following code uses a CTE to select the first day of the range.
This first day then is applied to the table and used for grouping.
DECLARE @Hist TABLE (Seq INT...
June 19, 2009 at 12:30 pm
Viewing 15 posts - 5,236 through 5,250 (of 5,504 total)