Wednesday, July 2, 2014

Pivot Table without Aggregate?

Can you provide example data (preferably as table variables) with the required data types and constraints?


Enough data to demonstrate with would be very helpful.



declare @exampleTable (ID int, name varchar(30), startDate datetime)

insert into @exampleTable (ID, name, startDate)
values
(1, 'John', '2014-01-01'),
(2, 'Paul', '2014-01-02'),
(3, 'George', '2014-01-03'),
(4, 'Ringo', '2014-01-04')


No comments:

Post a Comment