I have a table called ribinfo I want to copy this info into iclaimsPivotold. How can I write a stored procedure to do this?
here's the Ribinfo info and below the iclaimsPivotold create table info:
CREATE TABLE [dbo].[RibInfo](
[sort] [varchar](1) NOT NULL,
[reg] [varchar](3) NOT NULL,
[Jan 11] [decimal](6, 1) NULL,
[Jan 11 rank] [bigint] NULL,
[Jan 11 icnt] [int] NULL,
[Jan 11 tcnt] [int] NULL,
[region] [varchar](1) NOT NULL,
[area] [varchar](2) NOT NULL,
[dist] [varchar](3) NULL,
[doc] [varchar](3) NOT NULL,
[rpt] [varchar](1) NOT NULL
) ON [PRIMARY]
CREATE TABLE [dbo].[iClaimsPivotold](
[sort] [varchar](1) NOT NULL,
[reg] [varchar](3) NOT NULL,
[Dec 10] [decimal](6, 1) NULL,
[Dec 10 rank] [bigint] NULL,
[Dec 10 icnt] [int] NULL,
[Dec 10 tcnt] [int] NULL,
[Jan 11] [decimal](6, 1) NULL,
[Jan 11 rank] [bigint] NULL,
[Jan 11 icnt] [int] NULL,
[Jan 11 tcnt] [int] NULL,
[region] [varchar](1) NOT NULL,
[area] [varchar](2) NOT NULL,
[dist] [varchar](3) NULL,
[doc] [varchar](3) NOT NULL,
[rpt] [varchar](1) NOT NULL
) ON [PRIMARY]
here's the Ribinfo info and below the iclaimsPivotold create table info:
CREATE TABLE [dbo].[RibInfo](
[sort] [varchar](1) NOT NULL,
[reg] [varchar](3) NOT NULL,
[Jan 11] [decimal](6, 1) NULL,
[Jan 11 rank] [bigint] NULL,
[Jan 11 icnt] [int] NULL,
[Jan 11 tcnt] [int] NULL,
[region] [varchar](1) NOT NULL,
[area] [varchar](2) NOT NULL,
[dist] [varchar](3) NULL,
[doc] [varchar](3) NOT NULL,
[rpt] [varchar](1) NOT NULL
) ON [PRIMARY]
CREATE TABLE [dbo].[iClaimsPivotold](
[sort] [varchar](1) NOT NULL,
[reg] [varchar](3) NOT NULL,
[Dec 10] [decimal](6, 1) NULL,
[Dec 10 rank] [bigint] NULL,
[Dec 10 icnt] [int] NULL,
[Dec 10 tcnt] [int] NULL,
[Jan 11] [decimal](6, 1) NULL,
[Jan 11 rank] [bigint] NULL,
[Jan 11 icnt] [int] NULL,
[Jan 11 tcnt] [int] NULL,
[region] [varchar](1) NOT NULL,
[area] [varchar](2) NOT NULL,
[dist] [varchar](3) NULL,
[doc] [varchar](3) NOT NULL,
[rpt] [varchar](1) NOT NULL
) ON [PRIMARY]