TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
David Smith
NA
2k
0
SQL SERVER 2008 : bcp command. not copying file to disk
Mar 28 2012 9:20 AM
Below when I executing the stored procedure in either code or in management studio 2008 it saids it copied successfully, But I am not for sure why its not writing the file to disk. can some please help me, I have been struggling with this for the pass few days.
USE [ColorDb]
GO
ALTER PROCEDURE [dbo].[prc_WriteTableToTextDelimitedFile]
(
@FilePath VarChar(256)
)
AS
BEGIN
DECLARE @sql varchar(8000)
SET @sql = 'bcp "SELECT * FROM ColorDb.dbo.ColorTable" queryout "'+ @FilePath +'" -c -t; -T -SXXXXXXXXXXXX'
Print @sql
exec master..xp_cmdshell @sql
END
RETURN
Reply
Answers (
0
)
XML Query is very slow
Stored Procedure and Function