Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2012

    Unanswered: exporting data without quotes ''

    Greetings all,

    I'm new to dbforums and hopefully one can help me on the prob i facing.

    SELECT * FROM testview1;
    OUTPUT TO 'C:\Users\user\Desktop'
    QUOTE '"'

    I tried to execute in intereactive SQL and it return me error message
    could not save result set, access is denied.
    Then i try using the option available for exporting the data, its works however there are quote inside the txt file data...
    can anyone help?

  2. #2
    Join Date
    Mar 2008
    From your post it seems that you want your table's data in a text file.
    The best way to do it in Sybase is through BCP.
    BCP is Bulk Copy tool used for the same purpose.
    Remember bcp is not a command which runs from inside Sybase prompt.
    It runs from OS prompt. From your post its visible that you are using windows OS.
    I have not worked on windows OS for Sybase, so I am not sure if the BCPutility is available in the windows OS.
    but if its available you can follow the below steps to get your table's data in a text file
    1. click on start
    2. click on run
    3. type cmd on run
    4. A command prompt window will appear.
    5. go to the dir where your sybase is installed using cd command
    6. Execute below command to run bcp
    bcp <database name>..<table_name> out ''C:\Users\user\Desktop\table.txt> -U<User_name> -P<Password> -S<Sybase_Server_name> -t<a char for column terminator> -n<a char for row terminator> -c

    This will create a file table.txt on your desktop.

    hope this will be helpful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts