Link to home
Start Free TrialLog in
Avatar of Star Gazr1
Star Gazr1Flag for United States of America

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
Avatar of Nick Upson
Nick Upson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Star Gazr1

ASKER

Thanks for the reply. I do have firebird server installed and i am connected to the database using ISQL. I was able to figure out how to view all the table names using the command >show tables;  However, I want to be able to select all the data and then export it a format that I can work with the data (such as .csv, .mdb, etc)  
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?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
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