RE:DTS csv

  • Hello Gurus,

    I asked this question yesterday, but i didnt get a working solution, maybe i have to ask it in a different angle now.  Can someone create this table and use DTS to select from it and output the results in .csv also including headings, PLEEAASE.  My problem is I don't get the colums in the destination .csv after I populate them from source.  If you get this right, please let me know what is that which I am doing wrong. Here is the table to make it simple for you to create

    CREATE TABLE [Test] (

    [trad_type] varchar (50) NULL,

    [reference] varchar (50) NULL,

    [principal] varchar (50) NULL,

    [book] varchar (50) NULL,

    [strategy] varchar (50) NULL,

    [cpty] varchar (50) NULL,

    [buy_sell] varchar (50) NULL,

    [quantity] int NULL,

    [ident_type] varchar (50) NULL,

    [ext_ident] varchar (50) NULL,

    [sec_name] varchar (50) NULL,

    [price] int NULL,

    [price_divisor] int NULL,

    [traded_net_ind] varchar (20) NULL,

    [trade_ccy] varchar (50) NULL, 

    [trade_ldt] smalldatetime NULL,

    [value_date] smalldatetime NULL,

    [commission] varchar (50) NULL,

    [exchange_fee] varchar (50) NULL,

    [other_fees] varchar (50) NULL,

    [gross_consid] varchar (50) NULL,

    [net_consid] varchar (50) NULL,

    [sett_ccy] varchar (50) NULL,

    [trad_sett_ccy_xrate] varchar (50) NULL,

    [trad_sett_ccy_xrate_mdv_ind] varchar (50) NULL,

    [trad_inst_ccy_xrate] varchar (50) NULL,

    [trad_inst_ccy_xrate_mdv_ind] varchar (50) NULL,

    [inst_class] varchar (50) NULL,

    [cont_desc] varchar (50) NULL,

    [pl_book_ccy_xrate] varchar (50) NULL

    )

  • When creating the connection for the destination make sure you check the box for first row has column names.

    When using datapump task - for the first time at the destination tab click define columns and then populate from source where source is your table. This will generate the first line with column names in your destination csv file.

    As long as the check box from above is checked - next executions will contain column names in your destination.

  • Everything you explained, is what i have done, the problem is, the columns do not get populated to the destination, so basically my destination is empty, but if i select from my table until the column called [sett_ccy] , i can get my destination columns, but when i select all, i don't get destination

  • May be you have no access to that column - so when you select *

    then you cannot as you do not have access to that particular column. Check if you can select all the columns except the one in question in QA.

    If your permissions are denied to any column in the table you cannot select * from that table.

  • I created the table myself and i have all the right.  The other thing is if i call column names eg FA, FB and the likest, I can select everything and it can be populated to the .csv, but once i put clents column names like they way i created the table, there is a problem, .csv cannot be executed

  • AHA!!! Brilliant. I am glad to find someone esle having the same problem as me. (Misery loves company). Have you managed to work out a solution?

    It seems to me that this is some obscure bug with CSV file outputs in SQL Server. My table create script is as below. I have a DTS task that has been working for months which excludes the last 3 columns. When I add the 3 extra columns to the Source select statement in DTS, then try to populate the columns in the destination section, the column list is blank. If I click on Populate from Source again it crashes Enterprise manager.

    Any ideas anybody? Pleeease!

    create table pa_FM_salesSumm_salesPer(

     sch_ship_date  datetime not null,

     week   int not null,

     month   int not null,

     store_code  varchar(10) not null,

     store_name  varchar(30),

     state   varchar(10),

     net_sales  decimal(20,2),

     margin_amt  decimal(20,2),

     margin_pct  decimal(20,2),

     discount_amt  decimal(20,2),

     ns_hansets  decimal(20,2),

     ns_prepaid  decimal(20,2),

     ns_accessory  decimal(20,2),

     ns_recharge  decimal(20,2),

     ns_other  decimal(20,2),

     qty_prepd int,

     qty_postpd int,

     avg_item decimal(20,2),

     avg_sale decimal(20,2),

     qty_SIM  int,

     qty_ATU  int,

     qty_Finance int,

     qty_Insure int,

     qty_Loyalty int,

     qty_Migrate int,

     qty_Port int,

     salesp_code varchar(8),

     salesp_1stNames varchar(40),

     salesp_lastName varchar(40),

     

    )

  • FYI...there is a more informative thread regarding this issue under MMC GPFs Defining Transform Data Task

  • hello, I have tried to create your 'test' table it works!!.

    when edit DTS you need to close your spreadsheet otherwise you get weird error.

     

     

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply