Viewing 15 posts - 961 through 975 (of 5,109 total)
What have you tried so far? Have you had a look at PIVOT, or (what many prefer), using a Cross Tab?
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
May 24, 2019 at 1:22 pm
Cross post of https://www.sqlservercentral.com/forums/topic/how-to-map-the-table-data-while-inserting-into-another-table-in-sql and https://www.sqlservercentral.com/forums/topic/how-to-map-the-table-data-while-inserting-into-another-table-in-sql-2. I suggest replying on the OP's original post.
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
May 24, 2019 at 1:21 pm
Cross post of https://www.sqlservercentral.com/forums/topic/how-to-map-the-table-data-while-inserting-into-another-table-in-sql and https://www.sqlservercentral.com/forums/topic/how-to-map-the-table-data-while-inserting-into-another-table-in-sql-3. I suggest posting on the OP's original post.
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
May 24, 2019 at 1:20 pm
OK, personally, I would return a dataset like this then (I've guessed you want split by tier, if not add a WHERE ):
SELECT c.[name],
...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
May 24, 2019 at 10:41 am
I assume that that unnamed column in the CREATE statement for #storage should be called size?
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
May 24, 2019 at 10:29 am
I very briefly read that script (as Drew said, the longer the script the less likely people are to look at it), but if you are trying to create a...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
May 24, 2019 at 8:08 am
I don't think it works like this. Parameter is what you put on the WHERE clause. If you want change table name, concatenate:
SELECT @SQLString = N'Select...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
May 22, 2019 at 9:08 pm
Have you inspected the logs of the SSIS package? Is anyone else using the instance and thus could there be a lock on the table(s) the SP is being queried...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
May 22, 2019 at 8:06 am
Ignoring the fact that the dates are a week apart 😉 I did a search before replying and that told me that Colorado is also on daylight savings time...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
May 21, 2019 at 10:28 am
Yep, that got me to the answer I needed, Drew. My final query using production data is quite different, but the nested SUM with the OVER is exactly the route...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
May 21, 2019 at 9:14 am
Thanks Drew. I think that's what I'm after. The data above was pre-aggregated, so i'll give a go at applying this to the non-preaggregated but I think this is very...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
May 21, 2019 at 7:57 am
In what sense? Are you restoring over an existing database, or creating a new one. If the latter, there is no downtime, as such. If an existing one, I assume...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
May 20, 2019 at 10:46 am
I agree that seeing extra resources in Express would actually be nice. According to Compare SQL Server 2017 Editions Express can have 1410MB of RAM, but that's still not...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
May 20, 2019 at 9:06 am
You say mostly 2008 servers, any older than 2008?
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
May 18, 2019 at 1:42 pm
Gee, who figured out DBCC TimeWarp? Posts here are posting four hours in the future. My last post above was at 11:33 AM EST, but it's showing 3:33pm
That's...
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
May 17, 2019 at 3:44 pm
Viewing 15 posts - 961 through 975 (of 5,109 total)