sql server - How to modify the sequence in which columns are displayed in a flat file? -
i have next select statement in ssis 2008 ole db source:
select dbo.inventory.vendorfullsku sku , product.name 'title' , dbo.productvariant.price , dbo.productvariant.saleprice , dbo.inventory.color meta1 , dbo.inventory.[size] meta2 dbo.inventory inner bring together dbo.productvariant on dbo.inventory.variantid = productvariant.variantid inner bring together dbo.product on productvariant.productid = product.productid (dbo.inventory.vendorfullsku <> n'') order sku after running package, resulting flat file not sequenced in order expect to. there no transformations beingness done data.
the flat file contains columns in below mentioned order.
price, title .. followed other fields however, want columns in order within flat file defined in query.
sku, title, price, salesprice, meta1, meta2 how ensure fields in flat file sequenced same select statement above?
you have redefine column order on flat file connection manager editor.
assuming flat file connection manager defined file_items @ bottom of bundle on connection managers tab.
double-click connection manager file_items open flat file connection manager editor. click advanced tab page.
to generate files per query, columns should defined in order shown below. if columns not in order, generated flat file not match requirements.
you cannot rearrange order of columns because there no options move up or move down can add /delete them modify order according preference using buttons new , delete displayed below.
new button has options insert before , insert after.
make sure set right info types , other properties appropriately when rearranging columns.
sql-server ssis
No comments:
Post a Comment