Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Hands-On Microsoft SQL Server 2008 Integration Services part 56. Deploy and manage high-performance data transformation solutions across your enterprise using the step-by-step techniques in this fully revised guide. Hands-On Microsoft SQL Server 2008 Integration Services, Second Edition explains the tools and methods necessary to extract conclusive business intelligence from disparate corporate data. Learn how to build and secure packages, load and cleanse data, establish workflow, and optimize performance. Real-world examples, detailed illustrations, and hands-on exercises are included throughout this practical resource. . | 528 Hands-On Microsoft SQL Server 2008 Integration Services If Not Row.LastName_IsNull Then .Write Row.LastName End If .Write columnDelimiter If Not Row.Title_IsNull Then .Write Row.Title End If .Write columnDelimiter If Not Row.SalesAmount_IsNull Then .Write Row.SalesAmount End If .Write columnDelimiter If Not Row.IsBonusPaid_IsNull Then .Write Row.IsBonusPaid End If .Write columnDelimiter If Not Row.BonusAmount_IsNull Then .Write Row.BonusAmount End If .WriteLine End With Close the VSTA IDE and the Script Transformation Editor. We will now move on to create a script destination to write into a nonstandard text file. Nonstandard Text File Destination In this part you will write the asynchronous output to a nonstandard text file. Considering that you can now do some of the configurations yourself this section is kept short and quick. 52. Add a File Connection Manager to create a SalesSummary.txt file in the C SSIS RawFiles folder. 53. Add a Script destination component rename it as Script Non Standard Destination and join it with the asynchronous output from the Script Transformation component. 54. Perform the following in the editor Change the language. Select both the input columns. Rename the Input 0 to DstAsyncInput. Add the SalesSummary.txt Connection Manager and name it as SalesSummary. Chapter 11 Programming Integration Services 529 55. In the Code-design mode perform the following Add the System.IO namespace in the Imports section. Create two script variables Dim cmSalesSummary As String Private textWriter As StreamWriter Add the following code for the AcquireConnections method Public Overrides Sub AcquireConnections ByVal Transaction As Object Dim connMgr As IDTSConnectionManager100 Me.Connections.SalesSummary cmSalesSummary CType connMgr.AcquireConnection Nothing String End Sub 56. Initialize the textWriter in the PreExecute method textWriter New StreamWriter cmSalesSummary False 57. Close the textWriter in the PostExecute Method textWriter.Close 58. Last