How do I load a bcp file into SQL Server?
I read the article "The subscription list problem": https://ask.sqlservercentral.com/questions/1227/the-subscription-list-sql-problem.html and I downloaded the registration file:...
View ArticleHow to handle SQL Server BCP bulk insert if extra fields come in data file...
I am using non-xml format file to perform bulk import from a data file. Format File: 12.0 4 1 SQLCHAR 0 7 "\t" 1 DepartmentID "" 2 SQLCHAR 0 100 "\t" 2 Name "" 3 SQLCHAR 0 100 "\t" 3 GroupName "" 4...
View ArticleHow can I add a file increment when I bcp out? my current bcp overrides every...
Here is my query.. I need the NAME+ DATE SUBMITTED+ FILE INCREMENT i.e.. 01,02,03 etc... SET @FileName = Convert(varchar(2),DatePart(MONTH,@UseDate))+ Convert(varchar(2),DatePart(DAY,@UseDate))+...
View ArticleTo what Host is the BCP host data-file error referring
I created this job (see attached) in SQL Agent which worked fine in 2008R2 and windows 2008R2. We recently migrated to a new server and are now running Windows 2012R2 and SQL Server 2014. Now the error...
View ArticleBCP Temp table into 10,000 rows per file
Hi, I have a 100,00 temp table which needs to be outputted into multiple 10k row csv files. Help please?
View ArticleUsing bcp in a loop causing performance issues
Hi, I am trying to extract data from table into a multiple text files using bcp utility. The problem is that bcp hung when it is sequentially executed in a loop (in real life example it is a fetch)....
View ArticleIs it possible to bcp into a table multiple tabs of an excel file?
Trying to avoid using SSIS and just bcp in sheets of a workbook. Is it possible? Thank you!
View ArticleXML Explicit Export
I have a table with xml columns and need to export them to an xml document. The xml was created with the FOR XML EXPLICIT. I need to have the xml export in this layout. Has anybody done this or know...
View ArticleBCP is throwing error as Invalid character value for cast specification
Hi, I am New to SQL server. I am trying to load a file from UNIX to SQL Server . When i run the BCP getting the below error but i was able to load the same file when i changed the datatype to Char....
View ArticleBCP Command
Can anyone tell if it is possible to use bcp command to insert data directly from a [Server1].[Database1].[Query] to another [Server2].[Database2].[Table] directly ? I can only find references to Query...
View ArticleSQL Export to Excel in different sheets using BCP
Hi, Using BCP command need to export date to Excel in different sheets Thanks.
View ArticleWant to save xml file passed as input parameter to stored procedure
I have written a stored procedure which takes XML as parameter and I want to store the xml parameter in a file in some folder. Below is what I am doing within the stored procedure: CREATE TABLE...
View Articleprocedure executes in sql studio, breaks in bcp
Hi,I need to execute procedure abc using bcp or ssis under sql credentials xyz.When I create a connection in sql studio for xyz, "exec abc" runs with no problems.When I run bcp for the same "exec abc",...
View ArticleProblem with bcp
Hi, I'm having problems with bcp. When I run the sp containing the bcp script in ssms it runs ok. But when the sp is called from the app it outputs an empty file. Please help. Thanks. I'm using...
View ArticleNeed to do SQL export files using BCP Command in the format of EBCDIC - code...
Need to export file using BCP Command in the format of Extended Binary Coded Decimal Interchange Code(EBCDIC) - Code Page 37.Platform - WindowsSource - SQL ServerDestination - Flat file with format of...
View Article