Viewing 15 posts - 3,706 through 3,720 (of 10,144 total)
Use the source column for the string-dates, as discussed here.
January 28, 2014 at 8:17 am
Thanks Alan. I should point out that it's quite a long way from being a full Levenshtein implementation! I don't think it would be impossible - just too costly.
January 28, 2014 at 6:17 am
Gail's suggestion using DENSE_RANK() is well worth a try when you get time.
January 28, 2014 at 3:01 am
mote.ajit2 (1/27/2014)
Earlier I was collecting data in some temporary table so that I can use it as input to query on main table. Now I have removed that...
January 28, 2014 at 1:40 am
;WITH SampleData AS (
SELECT MyDate = CAST('2014-01-27 05:59:59.997' AS DATETIME) UNION ALL
SELECT '2014-01-27 06:00:00.000' UNION ALL
SELECT '2014-01-27 06:00:00.003' UNION ALL
SELECT '2014-01-27 17:59:59.994' UNION ALL
SELECT '2014-01-27 17:59:59.997' UNION ALL
SELECT '2014-01-27 18:00:00.000')
SELECT...
January 27, 2014 at 2:06 am
They're very narrow triangles - having dealt with this in the near past. Nevertheless, with two of them ORred together, the optimiser will likely choke. Try splitting them up and...
January 27, 2014 at 1:51 am
Jeff Moden (1/25/2014)
wit_jp2001 (1/24/2014)
I will try out the new query this afternoon. Just so that eveyone knows this process is to update the 1st SKU with the heaviest ...
January 27, 2014 at 1:45 am
DaveDB (1/24/2014)
"Perhaps the reason for my request for additional material is becoming clearer now.
The fact that accomplished professionals, who would usually be able to...
January 24, 2014 at 9:30 am
rabih_karam (1/24/2014)
"To calculate the number of days between date1 and date2, you can use either Day of year ("Y") or Day ("D"). When interval is Weekday ("W"), DateDiff...
January 24, 2014 at 7:30 am
wit_jp2001 (1/24/2014)
I will try out the new query this afternoon. Just so that eveyone knows this process is to update the 1st SKU with the heaviest SKU. ...
January 24, 2014 at 6:41 am
Does the stored procedure reference the Customers table?
Try to keep your code simple:
SELECT
h.company_no,
h.invoice_no,
h.invoice_locn,
h.invoice_type,
a.item_no as Kit_Ref_group,
b.item_no ,
max(CASE WHEN A.invoice_qty > B.invoice_qty THEN 0 ELSE A.invoice_qty END) as sales ,
b.invoice_qty - (CASE...
January 24, 2014 at 6:35 am
Anytime.
Third row up in my sig block has links to a couple of outstanding articles on APPLY. Well worth a read.
January 24, 2014 at 6:25 am
CROSS APPLY is an excellent tool for building complex WHERE clauses and would also help you to figure out if it's worthwhile building up an exclusion table as suggested. Once...
January 24, 2014 at 6:02 am
Dennis Post (1/24/2014)
If you have nolock, then you have the potential for dirty reads, duplicate rows and missed rows and it doesn't matter (for the latter 2) that each process...
January 24, 2014 at 4:28 am
Grant Fritchey (1/24/2014)
Nice job Chris. I'd love to see what the execution plan of the original query looked like.
Thanks Grant. Me too, there are over 70 reads of the lookup.
January 24, 2014 at 4:01 am
Viewing 15 posts - 3,706 through 3,720 (of 10,144 total)