Viewing 15 posts - 721 through 735 (of 8,731 total)
What about unpivoting the table? You might need to do some data type conversions, but here's a sample code.
CREATE TABLE [dbo].[SalesOrders]
(
[SalesOrderID] [int] NOT NULL,
January 18, 2018 at 6:15 am
declare @c table ( c1...
January 16, 2018 at 1:44 pm
Why do people insist on using CASE on WHERE clauses. That's usually a bad idea as it would prevent any index from being used.
Here's a possible alternative.
[code...
January 16, 2018 at 1:35 pm
January 16, 2018 at 8:56 am
January 11, 2018 at 12:51 pm
I get why you would want to use master database and mark them as system objects. However, I believe this is a bad idea as that should be the exception...
January 11, 2018 at 10:42 am
January 11, 2018 at 10:23 am
January 11, 2018 at 9:06 am
January 10, 2018 at 1:34 pm
January 10, 2018 at 9:45 am
I'd recommend that you read the following articles:
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - SQLServerCentral
Cross Tabs and Pivots, Part...
January 10, 2018 at 6:08 am
Viewing 15 posts - 721 through 735 (of 8,731 total)