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'
WITH COLUMN NAMES;
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?
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.