首页 > 代码库 > 插入变量表数据
插入变量表数据
DECLARE @Price TABLE
(
[SOLDTO] [nvarchar](80) NULL ,
[COUNTRY] [nvarchar](80) NULL ,
[SALESORG] [nvarchar](80) NULL ,
[COMPANYCODE] [nvarchar](80) NULL ,
[MATERIAL] [nvarchar](80) NULL ,
[UPC] [nvarchar](80) NULL ,
[ORDERTYPE] [nvarchar](80) NULL ,
[CONDITIONTYPE] [nvarchar](80) NULL ,
[PRICEMSRP] [numeric](18, 2) NULL ,
[PRICEWHOLESALE] [numeric](18, 2) NULL ,
[PRICENET] [numeric](18, 2) NULL ,
[CURRENCY] [nvarchar](80) NULL ,
[UNIT] [nvarchar](80) NULL
)
DECLARE @sql NVARCHAR(MAX)
SET @sql = ‘select ‘‘aaaa‘‘‘
INSERT @Price
( SOLDTO
)
EXEC ( @sql
)
SELECT *
FROM @Price
插入变量表数据