473,394 Members | 2,052 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Help with TEXTCOPY

I know it may not be good design standards, but SQL7 can handle
database names that have embedded spaces just fine, you just need to
enclose the database name in square brackets. But can TEXTCOPY handle
spaces in the database name?

I first tried something like:

TEXTCOPY /S server /U sa /P password /D mydatabase /t [table name]
/C columnname /W "where id = 1" /F file.txt /O

Ultimate goal here is to extract the text contents from the column
columnname and write it to a file called file.txt. But the command
puked on the square brackets. I tried the same command structured like
this:

TEXTCOPY /S server /U sa /P password /D mydatabase /t "table name"
/C columnname /W "where id = 1" /F file.txt /O

But it didn't like that either. Any suggestions? I ended up renaming
the table to a table name without any spaces, like table_name, but I
would rather have not solved the situation in that manner.
Jul 20 '05 #1
1 3509
Zack Sessions (zc********@visionair.com) writes:
I know it may not be good design standards, but SQL7 can handle
database names that have embedded spaces just fine, you just need to
enclose the database name in square brackets. But can TEXTCOPY handle
spaces in the database name?

I first tried something like:

TEXTCOPY /S server /U sa /P password /D mydatabase /t [table name]
/C columnname /W "where id = 1" /F file.txt /O

Ultimate goal here is to extract the text contents from the column
columnname and write it to a file called file.txt. But the command
puked on the square brackets. I tried the same command structured like
this:

TEXTCOPY /S server /U sa /P password /D mydatabase /t "table name"
/C columnname /W "where id = 1" /F file.txt /O

But it didn't like that either. Any suggestions? I ended up renaming
the table to a table name without any spaces, like table_name, but I
would rather have not solved the situation in that manner.


I think you need "[table name]". The "" are needed to get CMD.EXE to
understand that this is one argument, not two. And then you need the
brackets to make T-SQL happy.

--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help...
6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
3
by: Colin J. Williams | last post by:
Python advertises some basic service: C:\Python24>python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) on win32 Type "help", "copyright", "credits" or "license" for more information. >>> With...
7
by: Corepaul | last post by:
Missing Help Files When I enter "recordset" as the keyword and search the Visual Basic Help index, I get many topics of interest in the resulting list. But there isn't any information available...
5
by: Steve | last post by:
I have written a help file (chm) for a DLL and referenced it using Help.ShowHelp My expectation is that a developer using my DLL would be able to access this help file during his development time...
8
by: Mark | last post by:
I have loaded Visual Studio .net on my home computer and my laptop, but my home computer has an abbreviated help screen not 2% of the help on my laptop. All the settings look the same on both...
10
by: JonathanOrlev | last post by:
Hello everybody, I wrote this comment in another message of mine, but decided to post it again as a standalone message. I think that Microsoft's Office 2003 help system is horrible, probably...
5
by: Connie | last post by:
I am running the following script: begin set quoted_identifier off declare @pk int declare @where_clause varchar(100) declare @file_name varchar (50)
1
by: snavebelac | last post by:
Hi everyone I have a system running on a 2 server environment. One server has the internal database (SQL SERVER 2000 with an MSAccess front end on the clients) and is not open to the internet. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.