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
 SQL Server Development (2000)
 space separated in sqlserver 2000

Author  Topic 

sqldba2k6
Posting Yak Master

176 Posts

Posted - 2007-02-27 : 16:48:26
I want to display a data in space separated columns in a file.
Please Help..

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-02-27 : 16:53:17
You can use bcp out to export data to a file. If this isn't what you want, then please be more clear in your post.

Tara Kizer
Go to Top of Page

sqldba2k6
Posting Yak Master

176 Posts

Posted - 2007-02-27 : 17:17:38
Tara Kizer

I want show the result of my query(stored proc) with a space separted in a file...
Can i do in bcp???
Go to Top of Page

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2007-02-28 : 07:01:09
"...then please be more clear in your post."
Can you post some sample input data, "Current" output data from your query run in SQL QA....and maybe this can move forwards. Your requirements as written are a bit vague. Help us 2 Help you.
Go to Top of Page

sqldba2k6
Posting Yak Master

176 Posts

Posted - 2007-02-28 : 09:56:44
I want to export the data to a file with space separated.

Ex:
Location Length
-------- ------
Col1value 1 10
Column2 12 2
Col3value 18 3

Please help me.I did tried by enabling in the tools- options-results tab.
The first columns value should occupy 1-10 then column2 value should start from 12 position.there should be one space in between..
Go to Top of Page

rlaubert
Yak Posting Veteran

96 Posts

Posted - 2007-02-28 : 15:47:51
Not pretty but you can assign each column to a variable and then use SQL formating to format and concat each of the variable into a string prior to export.

Raymond Laubert
MCDBA, MCITP:Administration, MCT
Go to Top of Page
   

- Advertisement -