Could someone help me make this data
Sort rpt apr pcnt apr icnt may pcnt may icnt
1 2 22.6 182866 23.4 152619
A 2 27.2 182866 23.4 65336
B 2 20.5 76509 27.4 69989
C 2 13.5 38917 13.5 34850
D 2 25.6 93802 25.5 74682
E 2 39.9 15270 42.6 34770
Want data to Pivot like this:
Sort rpt Dowrdt pcnt icnt
1 2 4/30/2010 25.6 93802
A 2 5/28/10 39.6 45698
I want the dates april 10, may 10 (in the first table) to look like this in the second table under Dowrdt
Here's the table info to help you test it out.
here's the table info for the first table:
GO
CREATE TABLE [dbo].[RibInfoN2](
[sort] [varchar](1) NOT NULL,
[rpt] [varchar](1) NOT NULL,
[apr 10 pcnt] [decimal](4, 1) NULL,
[apr 10 icnt] [int] NULL,
[may 10 pcnt] [decimal](4, 1) NULL,
[may 10 icnt] [int] NULL,
) ON [PRIMARY]
GO
SET ANSI_PADDING OFFInsert into ribinfoN2
Select '1', '2', '22.6', '182866','23.4','152619' union all
Select 'A', '2', '27.2', '182866','23.4','65336' union all
Select 'B', '2', '20.5', '76509','27.4','69989' union all
Select 'C', '2', '13.5', '38917','13.5','34850' union all
Select 'D', '2', '25.6', '93802','25.5','74682' union all
Select 'E', '2', '39.9', '15270','42.6','34770'
Sort rpt apr pcnt apr icnt may pcnt may icnt
1 2 22.6 182866 23.4 152619
A 2 27.2 182866 23.4 65336
B 2 20.5 76509 27.4 69989
C 2 13.5 38917 13.5 34850
D 2 25.6 93802 25.5 74682
E 2 39.9 15270 42.6 34770
Want data to Pivot like this:
Sort rpt Dowrdt pcnt icnt
1 2 4/30/2010 25.6 93802
A 2 5/28/10 39.6 45698
I want the dates april 10, may 10 (in the first table) to look like this in the second table under Dowrdt
Here's the table info to help you test it out.
here's the table info for the first table:
GO
CREATE TABLE [dbo].[RibInfoN2](
[sort] [varchar](1) NOT NULL,
[rpt] [varchar](1) NOT NULL,
[apr 10 pcnt] [decimal](4, 1) NULL,
[apr 10 icnt] [int] NULL,
[may 10 pcnt] [decimal](4, 1) NULL,
[may 10 icnt] [int] NULL,
) ON [PRIMARY]
GO
SET ANSI_PADDING OFFInsert into ribinfoN2
Select '1', '2', '22.6', '182866','23.4','152619' union all
Select 'A', '2', '27.2', '182866','23.4','65336' union all
Select 'B', '2', '20.5', '76509','27.4','69989' union all
Select 'C', '2', '13.5', '38917','13.5','34850' union all
Select 'D', '2', '25.6', '93802','25.5','74682' union all
Select 'E', '2', '39.9', '15270','42.6','34770'