i need to load data from a table to csv but with in a single command i need to acheive this . so please suggest me an way to do this using vsql command. Thanks
Hii Harish, You can do it by using \o command. Eg: i have a table named TEST_TABLE now i want to generate a comma separated data from this table. for that do as follows.. \o /home/dbadmin/TEST_TABLE.txt; select * from TEST_TABLE; DONE!! Now search the file in the path /home/dbadmin Regards, Raj!!!
Harish, Prior to the above statements, you need to do some file alignment settings. \a for alignment \f for separator Eg: comma, pipe, tab Regards, Raj
i want to enter the password also in the same command. My scenario this command fires on vertica db through a jdbc driver. for that i am writing a shell script to open vsql and fire this query and come out of vsql
Comments
> vsql -U username -F $'\t' -At -o dumpfile.txt -c "SELECT * FROM my_table;" i want to enter the password also in the same command.
My scenario this command fires on vertica db through a jdbc driver. for that i am writing a shell script to open vsql and fire this query and come out of vsql