In the past, I turned to an article about the use of stored procedures to generate a blog that is complicated and prone to errors. csdn. netlee576articledetails3511012 this template is occasionally found in CodeSmith today. This is convenient. The selected node is ScriptTableData. the specific template code of cst will not be pasted. You can see it. In the attribute box, Set
In the past turned an article, is the use of the storage process generated, the method is complex, and easy to error http://blog.csdn.net/lee576/article/details/3511012 today occasionally found that CodeSmith has this template, this is convenient, hehe selected node, ScriptTableData. the specific template code of cst will not be pasted. You can see it. In the attribute box, Set
In the past, an article was written, which was generated using the stored procedure. The method was complex and error-prone.
Http://blog.csdn.net/lee576/article/details/3511012
This template is occasionally found in CodeSmith today, which is convenient.
Selected node, ScriptTableData. cst
The specific template code will not be pasted. You can see it. Select SourceTable In the attribute box.
Click "Generate" on the toolbar to Generate a SQL statement for this table.
SET IDENTITY_INSERT [dbo]. [AnalogyData1] oninsert into [dbo]. [AnalogyData1] ([Block], [LayerCode], [ProduceDate], [OilWells], [WaterWells], [ProduceOil], [ProduceWater], [YCY], [Waterflooding], [ProduceGas], [HSL], [TotalOil], [TotalGas], [TotalWater], [AnareservoirID]) SELECT 'color 9', 'j1s ', '123', 81, 6, 40855,861 7, '000000', 49472, '17. 4', 1500253,216 28.1, 225428, '6053a294-8505-4120-BF92-63BCA08948CC 'unionselect' color 9', 'j1s ', '123', 88, 7, 200202 73, '123', 28496,368, 65369, '56. 4', 3630318,491 39.7, 1421461, '6053a294-8505-4120-BF92-63BCA08948CC 'UNION ......