I didn't find something like 'select * from table into "filename.data"' in
the Manuals.
That was possible in Unify 2000 and I'm sure that I am just to blind to see
the solution.
Thanx in advance for any help.
Markus
---------------------------------------------------------------------
hac...@uni-paderborn.de | Markus Brakweh
| Universitaet-GH Paderborn, FB 17
| Warburger Str. 100
| D-4790 Paderborn, Germany
---------------------------------------------------------------------
Write your query in a file filename.sql and try this:
isql -Uuser -Ppassword <filename.sql >results.out
That should capture everything for you.
Mike
--
Michael Perry
Sr. Regional Tech. Support Specialist
Sequent Computer Systems, Inc.
m...@sequent.com
I didn't find something like 'select * from table into "filename.data"' in
the Manuals.
That was possible in Unify 2000 and I'm sure that I am just to blind to see
the solution.
Thanx in advance for any help.
Markus
This is how to do it :
you create a file xyz containg:
select * from table
go
and the from OS prompt :
isql -U userid -P Password -S Server < xyz > xyz.out
Good Luck
Ali Ghandchi
>isql -Uusername -Ppassword <input file> outputfile
where input file - is the name of the file which has the sql statements.
output file - is the name of the file which has your query results.
-Vishu
>In article <HACKES.93A...@leo.uni-paderborn.de> hac...@uni-paderborn.de (Markus Brakweh) writes:
>>
>>I'm new in using Sybase (Version 4.2 on Sun OS 4.1.3) and I'm astonished
>>not to find a way for saving isql-query results in a Unix-File.
>>
>>I didn't find something like 'select * from table into "filename.data"' in
>>the Manuals.
>>
>>That was possible in Unify 2000 and I'm sure that I am just to blind to see
>>the solution.
>>
>>Thanx in advance for any help.
>>
>>Markus
>Write your query in a file filename.sql and try this:
> isql -Uuser -Ppassword <filename.sql >results.out
>That should capture everything for you.
You can also use the -i flag in isql to take in filename.sql and then
pipe the results out to results.out the same way. Since I do this
quite regularly, I have created an alias called sqli which takes
a parameter (filename.sql) and then I pipe the results out from there.
(sqli filename.sql) > results.out
Jeff
--
Jeff King
gol...@panix.com
example: isql -Usa -Ppswd -iinput.sql -ooutput.data
I have used this under SunOS and it works fine.
--
_____________________________________________________________________________
Matthew Kosater Email: ma...@meaddata.com
Strategic Data Systems Voice: 513-865-6800 x6622
-----------------------------------------------------------------------------
I'd also recommend using the -n option which eliminates the "#>" prompts.
Also, the -e option to have input echoed onto output. The file will then
have both the queries and their results.
--
Robert Garvey rob...@sybase.com {sun,lll-tis,pyramid,pacbell}!sybase!robert
Sybase, Inc 6475 Christie Ave Emeryville, CA 94608-1010
Opinions may be attributed to poster, not necessarily related to Sybase.
[MK] example: isql -Usa -Ppswd -iinput.sql -ooutput.data
Another way of doing is by using the redirection symbols.
isql -Usa -Ppswd < input > output
This works just as fine.
Tsiel
--
----8<--------------------------------------------------------------->8------
Tsiel:oha...@jcpl.co.jp | This message will autodestroy in 5 seconds
Employer may not have same | ___________________________________________|
opinions, if any ! ||____________________________________________()
And just in case we haven't beaten this thread to death . . .
If you don't want to mess with an input file, try:
$ isql -Ufoo -Pbar << EOF > output
> select * from table
> go
> EOF
The <<EOF says take input from the terminal until you get the string EOF.
Therefore, you could replace EOF with just about anything, if you want.
And you can even skip the string, just using "<< > output" and use ^D
(that's control-d) if you want to. I prefer EOF, myself.
--
The above statements are not the opinions or policies of SPSS Inc.
The above statements may not be the opinions of Brent Lambert.
The first disclaimer is a policy of SPSS Inc.
Subsequent disclaimers are probably the opinion of Brent Lambert.