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

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Writing to a text file

Author  Topic 

pithhelmet
Posting Yak Master

183 Posts

Posted - 2005-10-13 : 09:46:44

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

22864 Posts

Posted - 2005-10-13 : 09:49:44
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 - 2005-10-13 : 10:50:12

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 - 2005-10-13 : 10:53:08
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

22864 Posts

Posted - 2005-10-14 : 01:08:16
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 - 2005-10-14 : 16:03:10
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)

7020 Posts

Posted - 2005-10-14 : 18:20:05
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
Go to Top of Page
   

- Advertisement -