Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

requesting file output via ODBC?

4 posts in General Discussion Last posting was on 2004-02-07 17:31:21.0Z
Nob Posted on 2004-02-07 15:05:46.0Z
Sender: 7a17.40250118.1804289383@sybase.com
From: Nob
Newsgroups: ianywhere.public.general
Subject: requesting file output via ODBC?
X-Mailer: WebNews to Mail Gateway v1.1s
Message-ID: <40250149.7a18.846930886@sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 7 Feb 2004 07:16:25 -0800, 10.22.241.42
Lines: 12
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 7 Feb 2004 06:48:12 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 7 Feb 2004 07:05:46 -0800
X-Trace: forums-1-dub 1076166346 10.22.108.75 (7 Feb 2004 07:05:46 -0800)
X-Original-Trace: 7 Feb 2004 07:05:46 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2447
Article PK: 5584

I want to make a call to a stored procedure in the database
and have it do something like this :

select * from customers ;
ouput to c:\outCus.txt

Is there anyway to do this? Because you can't execute an
output statement in a StoredProcedure. So how can I export
data from within a StoredProcedure? Or is there another
way?

Thanks,


Chris Keating (iAnywhere Solutions) Posted on 2004-02-07 15:41:18.0Z
From: "Chris Keating \(iAnywhere Solutions\)" <FightSpam_keating@iAnywhere.com>
Newsgroups: ianywhere.public.general
References: <40250149.7a18.846930886@sybase.com>
Subject: Re: requesting file output via ODBC?
Lines: 44
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: cpe0080c6f83676-cm012059936305.cpe.net.cable.rogers.com
X-Original-NNTP-Posting-Host: cpe0080c6f83676-cm012059936305.cpe.net.cable.rogers.com
Message-ID: <4025071e$1@forums-1-dub>
Date: 7 Feb 2004 07:41:18 -0800
X-Trace: forums-1-dub 1076168478 24.112.219.219 (7 Feb 2004 07:41:18 -0800)
X-Original-Trace: 7 Feb 2004 07:41:18 -0800, cpe0080c6f83676-cm012059936305.cpe.net.cable.rogers.com
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2448
Article PK: 5583

An UNLOAD TABLE can be used if you have no where clause.

--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8

****************************************************************************
*
Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
and try out the market-leading database for mobile, embedded and small to
medium sized business environments for free!

http://www.ianywhere.com/promos/deved/index.html

****************************************************************************
*

iAnywhere Solutions http://www.iAnywhere.com

** Please only post to the newsgroup

** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use CaseXpress to report bugs http://casexpress.sybase.com

****************************************************************************
*

<Nob> wrote in message news:40250149.7a18.846930886@sybase.com...
> I want to make a call to a stored procedure in the database
> and have it do something like this :
>
> select * from customers ;
> ouput to c:\outCus.txt
>
> Is there anyway to do this? Because you can't execute an
> output statement in a StoredProcedure. So how can I export
> data from within a StoredProcedure? Or is there another
> way?
>
> Thanks,


Nob Posted on 2004-02-07 17:11:31.0Z
Sender: 7494.40251b7a.1804289383@sybase.com
From: Nob
Newsgroups: ianywhere.public.general
Subject: Re: requesting file output via ODBC?
X-Mailer: WebNews to Mail Gateway v1.1s
Message-ID: <40251c43.7496.846930886@sybase.com>
References: <40250149.7a18.846930886@sybase.com><4025071e$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 7 Feb 2004 09:11:31 -0800
X-Trace: forums-1-dub 1076173891 10.22.241.41 (7 Feb 2004 09:11:31 -0800)
X-Original-Trace: 7 Feb 2004 09:11:31 -0800, 10.22.241.41
Lines: 55
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2450
Article PK: 5586

That's a good idea. I didn't think of that. But what if I
do have a where clause? Is it possible in that case?

Thanks,

Nob

> An UNLOAD TABLE can be used if you have no where clause.
>
> --
>
> Chris Keating
> Sybase Adaptive Server Anywhere Professional Version 8
>
> **********************************************************
> ****************** *
> Sign up today for your copy of the SQL Anywhere Studio 9
> Developer Edition and try out the market-leading database
> for mobile, embedded and small to medium sized business
> environments for free!
>
> http://www.ianywhere.com/promos/deved/index.html
>
> **********************************************************
> ****************** *
>

> iAnywhere Solutions http://www.iAnywhere.com
>
> ** Please only post to the newsgroup
>
> ** Whitepapers can be found at
> http://www.iAnywhere.com/developer ** EBFs can be found at
> http://downloads.sybase.com/swx/sdmain.stm ** Use
> CaseXpress to report bugs http://casexpress.sybase.com
>
> **********************************************************
> ****************** *
>
> <Nob> wrote in message
> > news:40250149.7a18.846930886@sybase.com... I want to
> > make a call to a stored procedure in the database and
> have it do something like this : >
> > select * from customers ;
> > ouput to c:\outCus.txt
> >
> > Is there anyway to do this? Because you can't execute
> > an output statement in a StoredProcedure. So how can I
> > export data from within a StoredProcedure? Or is there
> > another way?
> >
> > Thanks,
>
>


Greg Fenton Posted on 2004-02-07 17:31:21.0Z
From: Greg Fenton <greg.fenton_NOSPAM_@ianywhere.com>
Organization: iAnywhere Solutions Inc.
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4; MultiZilla v1.4.0.4A) Gecko/20030624
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: requesting file output via ODBC?
References: <40250149.7a18.846930886@sybase.com><4025071e$1@forums-1-dub> <40251c43.7496.846930886@sybase.com>
In-Reply-To: <40251c43.7496.846930886@sybase.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: cpe000625d8278c-cm.cpe.net.cable.rogers.com
X-Original-NNTP-Posting-Host: cpe000625d8278c-cm.cpe.net.cable.rogers.com
Message-ID: <402520e9@forums-1-dub>
Date: 7 Feb 2004 09:31:21 -0800
X-Trace: forums-1-dub 1076175081 24.112.254.75 (7 Feb 2004 09:31:21 -0800)
X-Original-Trace: 7 Feb 2004 09:31:21 -0800, cpe000625d8278c-cm.cpe.net.cable.rogers.com
Lines: 22
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2451
Article PK: 5592


Nob wrote:
> That's a good idea. I didn't think of that. But what if I
> do have a where clause? Is it possible in that case?
>

Please, always post the version and build number of ASA that you are using.

Take a look at the "UNLOAD" statement in the online docs.

UNLOAD select-statement TO filename-string [ unload-option ... ]

Hope this helps,
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/