Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ISQL Data export

Posted on 2013-02-07
6
Medium Priority
?
2,395 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 2000 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 2000 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
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
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

Industry Leaders: 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!

Question has a verified solution.

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

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

636 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