有谁能看懂
只是我拿到的全部信息 什么都没有了 没数据
实现tb_dataplat 与 pp_craftdata 两表数据相互转换。把tb_dataplat的data字段的值转化成pp_craftdata 的[StandardValue]的值,也就是说,把tb_dataplat一行100列,变成pp_craftdata的100行数据。
pp_craftdata的[DataPlatID]字段存储tb_dataplat表的主键[DataID] 。
tb_dataplat 是横向数据
pp_craftdataProperty 是竖向数据
tb_dataplat.[PFKID],usetype=1,data,data1,,,————————————————————-+
————————————————————————————————————————————————————————————————————————————————————————————————
通过pp_craftProperty(craftid进行筛选(作为参数传递),code代表data字段,name代表名称,orderno序号,) +
pp_craftdataProperty (craftid传递过来的保存在craftid,
tb_dataplat.[PFKID]插入到DataPFKID
tb_dataplat.[DataID]存储到DataPlatID]
pp_craftProperty.Proid存储到proid, +
tb_dataplat.对应的datat存储到data字段 )
————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
USE [erp_zfym]
GO
/****** 对象: Table [dbo].[TB_DataPlat] 脚本日期: 08/26/2013 11:23:26 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[TB_DataPlat](
[DataID] [int] NOT NULL,
[PFKID] [int] NULL,
[UseType] [int] NULL,
[DataSign] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
[Data] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data1] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data2] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data3] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data4] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data5] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data6] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data7] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data8] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data9] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data10] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data11] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data12] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data13] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data14] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data15] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data16] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data17] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data18] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data19] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data20] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data21] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data22] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data23] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data24] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data25] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data26] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data27] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data28] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data29] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data30] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data31] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data32] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data33] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data34] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data35] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data36] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data37] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data38] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data39] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data40] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data41] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data42] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data43] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data44] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data45] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data46] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data47] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data48] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data49] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data50] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data51] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data52] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data53] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data54] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data55] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data56] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data57] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data58] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data59] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data60] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data61] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data62] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data63] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data64] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data65] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data66] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data67] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data68] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data69] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data70] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data71] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data72] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data73] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data74] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data75] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data76] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data77] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data78] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data79] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data80] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data81] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data82] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data83] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data84] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data85] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data86] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data87] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data88] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data89] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data90] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data91] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data92] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data93] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data94] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data95] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data96] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data97] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data98] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data99] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
[Data100] [varchar](max) COLLATE Chinese_PRC_CI_AS NULL,
CONSTRAINT [PK_TB_DataPlat] PRIMARY KEY CLUSTERED
(
[DataID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
USE [erp_zfym]
GO
/****** 对象: Table [dbo].[PP_CraftData] 脚本日期: 08/26/2013 11:24:04 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[PP_CraftData](
[CraftDataID] [int] IDENTITY(1,1) NOT NULL,
[DataPlatID] [int] NULL,
[CraftID] [int] NULL,
[ProcessID] [int] NULL,
[GoodsID] [int] NULL,
[ProductID] [int] NULL,
[ProductCode] [varchar](60) COLLATE Chinese_PRC_CI_AS NULL,
[Machine] [int] NULL,
[StandardValue] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
[Remark] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
[OrderNO] [int] NULL,
[Flag] [char](1) COLLATE Chinese_PRC_CI_AS NULL,
[RelateID] [int] NULL,
[ParentID] [int] NULL,
[OpID] [int] NULL,
[OpDate] [datetime] NULL,
[CraftType] [int] NULL,
CONSTRAINT [PK_PP_CraftData] PRIMARY KEY CLUSTERED
(
[CraftDataID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
USE [erp_zfym]
GO
/****** 对象: Table [dbo].[PP_CraftDataProperty] 脚本日期: 08/28/2013 09:49:06 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[PP_CraftDataProperty](
[CraftDataProID] [char](10) COLLATE Chinese_PRC_CI_AS NULL,
[CraftDataID] [int] NULL,
[DataPlatID] [int] NULL,
[DataPFKID] [int] NULL,
[CraftID] [int] NULL,
[RowSign] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
[ProID] [int] NULL,
[Data] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
[Type] [int] NULL,
[UseType] [int] NULL,
[ProType] [int] NULL,
[RateType] [int] NULL,
[Rate] [decimal](10, 4) NULL,
[Formula] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
[remark] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
[OrderNO] [int] NULL,
[Flag] [char](1) COLLATE Chinese_PRC_CI_AS NULL,
[DeletedFlg] [char](1) COLLATE Chinese_PRC_CI_AS NULL,
[OpID] [int] NULL,
[OpDate] [datetime] NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
数据 存储 对象 脚本
[解决办法]
#1.都快被你的精神感动了
#2.但真是看不出是什么意思,看不到数据和具体需求,就是在猜。无意义。
#3.建议谁给你的需求,去问谁。