Transform Data Task and bit data type

Discussion in 'microsoft.public.sqlserver.dts' started by Ajit, Apr 20, 2004.

  1. Ajit

    Ajit Guest

    Hi
    I want to export data from SQL server 2000 to text file. I am using Transform Data Task for the same
    I am facing peiculiar problem in exporting columns which have 'bit' data type. In text files, the values for these columns appear as True/False instead of 1/0

    How can I ensure presence of 0/1 instead of False/True for columns with bit datatype in destination text file

    Thanks
    Ajit
     
    Ajit, Apr 20, 2004
    #1
    1. Advertisements

  2. How about converting to integer or string first?




    Transform Data Task for the same.
    type. In text files, the values for these columns appear as True/False
    instead of 1/0.
    bit datatype in destination text file?
     
    Allan Mitchell, Apr 20, 2004
    #2
    1. Advertisements

  3. Ajit

    Ajit Guest

    Yes, converting helps. Only problem is for every bit field, select query needs to be modified.
    I was wondering if DTS gives control so that you make change at one place and bit fields get exported as 0/1 only

    Thanks Allan for your reply

    Regards
    Aji

    ----- Allan Mitchell wrote: ----

    How about converting to integer or string first

    --

    ---------------------------

    Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP
    www.SQLDTS.com - The site for all your DTS needs
    I support PASS - the definitive, global communit
    for SQL Server professionals - http://www.sqlpass.or


    Transform Data Task for the same
    type. In text files, the values for these columns appear as True/Fals
    instead of 1/0
     
    Ajit, Apr 20, 2004
    #3
  4. Don't think so as the conversion to True/False is a feature of the driver
    itself I believe.




    and bit fields get exported as 0/1 only.
     
    Allan Mitchell, Apr 20, 2004
    #4
  5. Ajit

    Brandon Guest

    Sorry to hijack this, but it's the only thing I've found somewhat related to my problem with Google.

    I've worked with Access exports and such for the last 4 years and never had to migrate data before now. Don't ask me why anyone would want to leave relational databases behind, but they are. Now I have to meet the import specifications of the developers and have the following problem.

    1. I don't know DTS (SQLS 2000)
    2. Currency datatypes always export with $
    3. Bit types always export as True/False instead of 0/-1
    4. For some reason two fields that hold decimal values get (") quotes around them.

    I am trying to export to a text file in pipe delimited format, but when I try to run DTS on them there is no destination column to modify and when I try to define the tables. It crashes and closes down.

    Any ideas would help.

    Feel free to email me suggestions.

    From http://www.developmentnow.com/g/103_2004_4_0_0_396071/Transform-Data-Task-and-bit-data-type.ht

    Posted via DevelopmentNow.com Group
    http://www.developmentnow.com/g/
     
    Brandon, Aug 25, 2010
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.