Unix Technical Forum

Read/write textfiles using Transact SQL in Sybase

This is a discussion on Read/write textfiles using Transact SQL in Sybase within the Sybase forums, part of the Database Server Software category; --> Hello, As per our project requirement, we need the following issues to be solved using Transact-SQL in Sybase: 1. ...


Go Back   Unix Technical Forum > Database Server Software > Sybase

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 06:07 PM
sgaikwad@hcltmass.com
 
Posts: n/a
Default Read/write textfiles using Transact SQL in Sybase

Hello,

As per our project requirement, we need the following issues to be
solved using Transact-SQL in Sybase:
1. Can we read or write a text file using Transact-SQL in Sybase
database?if yes, need the syntax of the same.
2. How do we run a Batch File (Command File) using Transact-SQL in
Sybase database?

It will be very appreciated for your responses asap. We are in very
urgent schedule.

Thanks in advance..

Regards,
Sowmya

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 06:07 PM
FrankHamersley
 
Posts: n/a
Default Re: Read/write textfiles using Transact SQL in Sybase

sgaikwad@hcltmass.com wrote:
> Hello,
>
> As per our project requirement, we need the following issues to be
> solved using Transact-SQL in Sybase:
> 1. Can we read or write a text file using Transact-SQL in Sybase
> database?if yes, need the syntax of the same.


Many ways to skin this cat. Prolly best to bcp it into a table and then
deal with it.

> 2. How do we run a Batch File (Command File) using Transact-SQL in
> Sybase database?


Check out xp_cmdshell

> It will be very appreciated for your responses asap. We are in very
> urgent schedule.
>
> Thanks in advance..
>
> Regards,
> Sowmya


Good luck, Frank.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 06:07 PM
bret@sybase.com
 
Posts: n/a
Default Re: Read/write textfiles using Transact SQL in Sybase

Asuming you mean ASE when you say "Sybase database"...

1) Files can be written on the server host machine using xp_cmdshell
to CAT strings to a file. You can also use the external file system
(XFS) feature, which allows ASE to view files as tables. This is an
extra-cost license on 12.5.x but is included with 15.0.

http://sybooks.sybase.com/onlinebook...ystem+a ccess

2) xp_cmdshell

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:21 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com