Solved

ISQL Data export

Posted on 2013-02-07
6
2,158 Views
Last Modified: 2013-02-07
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.
0
Comment
Question by:fjkaykr11
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 19

Accepted Solution

by:
NickUpson earned 500 total points
ID: 38864613
you have to install the firebird server, if you have done that are are correctly connecting to the database, then just do "select field1, field2, ... from tablename"
0
 
LVL 3

Author Comment

by:fjkaykr11
ID: 38864752
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?
0
 
LVL 19

Assisted Solution

by:NickUpson
NickUpson earned 500 total points
ID: 38865206
the functionality you are looking for does not exist, but you can get close

select varchar(field1, 10) || ',' || varchar(field2, 10) ... from table;

will get you csv, put that in a file and do

isql < my_file > my_output
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Author Comment

by:fjkaykr11
ID: 38865356
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.
0
 
LVL 3

Author Closing Comment

by:fjkaykr11
ID: 38865820
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
0
 
LVL 19

Expert Comment

by:NickUpson
ID: 38865833
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
0

Featured Post

Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
How to increase the row limit in Jasper Server.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question