Viewing 15 posts - 241 through 255 (of 622 total)
Careful with that, remember little Bobby Tables. http://bobby-tables.com/
[
The second xkcd cross link of the week!
January 8, 2015 at 3:29 pm
Dwain, Nevyn,
Wow Dwain that is some complex code! I have only scanned it and like Nevyn says, it requires the user to seed it with a set of predefined patterns....
January 8, 2015 at 3:26 pm
No, but I think 4 hours should be OK:-)
January 6, 2015 at 4:08 pm
Unfortunately that is the simplified version 😀
Let's concentrate on the first part: finding records with the same repeating patterns but in different time phases.
A manual scan of the...
January 6, 2015 at 3:49 pm
Michael Meierruth (12/30/2014)
I guess when you need to execute something only once and it takes 900 miliseconds you give it no further thought.
Still, getting anything...
January 6, 2015 at 5:18 am
Is there any reason why you can't use the PIVOT command. You would need to include a month number and well as the month name otherwise the data will...
December 15, 2014 at 5:17 am
@KGJ
Hand-rolling your own code is a great way to learn, but have you looked at the SQL Toolbelt from Redgate. It allows you to do all that stuff to...
December 15, 2014 at 5:06 am
In the absence of the OP I will hypothesis that it is required to identify discrepancies within a warehouse.
You have 'real' warehouses and 'Transit' warehouses. Where the discrepancy between...
December 12, 2014 at 9:08 am
@jay Tee
But it's still butt ugly code 😀
It is one of the few really useful functions that is missing from T-SQL; the ability to select a MIN or...
December 10, 2014 at 1:07 pm
Hi Jeff. it's a bit late in the day for me to get my head around the whole result but the technique you are looking for uses STUFF and FORXML....
December 10, 2014 at 12:59 pm
my bad, that's what I get for psudoing the query
SELECT
date,
classification,
MAX(
CASE
...
December 10, 2014 at 12:53 pm
Or use the ROLLUP option
SELECT
State
,ZipCode
,Count(Account) AS [Accounts]
FROM YourTable
GROUP BY State, ZipCode
WITH ROLLUP;
This will give a total for the State (record will be State, NULL,...
December 10, 2014 at 9:49 am
If you are just coming back to SQL from a long break (i.e. pre 2005) then you might want to look at Common Table Expressions as an alternative.
From my experience...
December 10, 2014 at 9:34 am
Deries (12/1/2014)
December 2, 2014 at 12:55 pm
and an address type - home, correspondence, holiday, emergency, temporary;
in fact why limit it to location addressees; it could be all addresses (email, ip)
in which case you could hold...
December 1, 2014 at 4:34 am
Viewing 15 posts - 241 through 255 (of 622 total)