Star Gazr1
asked on
ISQL Data export
I am connected to a database with a file format .fdb using ISQL (Firebird). I need help in querying or exporting the data using ISQL. Any ideas? Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Nick,
Thanks for the reply. I am not really following how i would do that. I can see the output from all the fields in the table when I do a Select * From TableName;
but I don't know how I would type in the format you are suggesting ...., etc
Can you elaborate ? Also, if I already have a file in a csv format as suggested, I am confused on the second step isql <my file> my_output, what is the purpose of that? Thanks again.
Thanks for the reply. I am not really following how i would do that. I can see the output from all the fields in the table when I do a Select * From TableName;
but I don't know how I would type in the format you are suggesting ...., etc
Can you elaborate ? Also, if I already have a file in a csv format as suggested, I am confused on the second step isql <my file> my_output, what is the purpose of that? Thanks again.
ASKER
I found out the database I am connecting too I can't export the data. I have to use a proprietary tool. Thanks for the help
The database does not have the ability to do the export you want as a built-in, however:
selecting each field and concatinating them together, with a comma between them would produce CSV form.
isql <my file> my_output
that runs isql, reading from the file my_file & sending output to my_output
selecting each field and concatinating them together, with a comma between them would produce CSV form.
isql <my file> my_output
that runs isql, reading from the file my_file & sending output to my_output
ASKER
When I run the command
SELECT * FROM SomeTable
OUTPUT TO 'C:\temp\sometable.csv' FORMAT ASCII DELIMITED BY ';' QUOTE '';
I also tried this command:
select * from TableName -o c:\Table.txt -n -1 -s ",";
I get an error for both commands
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 1, column 31
Any ideas?