SSIS BIML generates SQL code with brackets

后端 未结 2 399
我在风中等你
我在风中等你 2021-01-20 06:19

Im using BIML to dynamically create load packages for SSIS to load data from Informix to SQL Server. The problem is that this BIML code produces the SQL below



        
相关标签:
2条回答
  • 2021-01-20 06:58

    This works for both column names and table name:

                            <OdbcSource Name="Data from informix" Connection="Source_Informix">
                                <DirectInput>SELECT <#=table.GetColumnList(string.Empty, "", "")#> FROM schema.<#=table.Name#></DirectInput>
                            </OdbcSource>
                            <OleDbDestination Name="Data to MSSQL" ConnectionName="Target_MSSQL">
                                <TableOutput TableName="<#=table.ScopedName#>"/>
                            </OleDbDestination>
    
    0 讨论(0)
  • 2021-01-20 07:09

    You should be able to use the overloaded method of GetColumnList

    <#=table.GetColumnList(string.Empty, "\"", "\"")#>
    

    which should produce a double quote wrapped column name with no table alias - which I think is what Informix expects.

    0 讨论(0)
提交回复
热议问题