Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Writing to a text file
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pithhelmet
Posting Yak Master

183 Posts

Posted - 10/13/2005 :  09:46:44  Show Profile  Reply with Quote

Hello everyone -

I need to write (append) to a text file
the resides on the local drive.

Can this be accomplished?

If so - a code snippet would be appreciated.

thanks
tony

(sybase asa 7)

madhivanan
Premature Yak Congratulator

India
22864 Posts

Posted - 10/13/2005 :  09:49:44  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
See if this helps you
http://www.mindsdoor.net/SQLTsql/BCP_quoted_CSV_Format_file.html

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

pithhelmet
Posting Yak Master

183 Posts

Posted - 10/13/2005 :  10:50:12  Show Profile  Reply with Quote

comes close -

but i simply need to write that the process was executed,
a simple line of text
to the text file...

thanks
tony

Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 10/13/2005 :  10:53:08  Show Profile  Reply with Quote
Do I hear an echo?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page

madhivanan
Premature Yak Congratulator

India
22864 Posts

Posted - 10/14/2005 :  01:08:16  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
quote:
Originally posted by X002548

Do I hear an echo?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx



Yes. From Nigel's Link

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

pithhelmet
Posting Yak Master

183 Posts

Posted - 10/14/2005 :  16:03:10  Show Profile  Reply with Quote
must be some kinda "inside joke"

the posted link is for MS SQL

as listed - i am running sybase
but thanks for the response!!

take care
tony

Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

USA
7020 Posts

Posted - 10/14/2005 :  18:20:05  Show Profile  Reply with Quote
Did you notice that this forum is for Microsoft SQL Server Transact-SQL questions? If you really need help with Sybase, you should try to find a site that is focused on that.

The "inside joke" might have been a reference to the DOS ECHO command, one of many ways you might write to a file using, for example, the xp_cmdshell stored procedure. I'm not sure if xp_cmdshell is available in Sybase, so that may or may not be helpful to you. Of course, if you are not running a Windows server, a DOS shell may not be available.


Echo example from command prompt:

C:\Temp>echo Help me please! >myfile.txt
C:\Temp>type myfile.txt
Help me please!

C:\Temp>




quote:
Originally posted by pithhelmet

must be some kinda "inside joke"

the posted link is for MS SQL

as listed - i am running sybase
but thanks for the response!!

take care
tony





CODO ERGO SUM

Edited by - Michael Valentine Jones on 10/14/2005 18:34:03
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.24 seconds. Powered By: Snitz Forums 2000