All Questions
11 questions
0
votes
0
answers
267
views
T-SQL exec master..xp_cmdshell sqlcmd command unable to include variable output path
I am trying to generate the output result to a .txt file dynamically with whatever the value of @name will be, it will be generated automatically via cursor, just to show an example, I've showed as ...
0
votes
0
answers
185
views
BCP failing to upload CSV file ("Unexpected EOF encountered in BCP data-file" )
I'm trying to automate the copying of some of the columns of a table in one database to a table on another server with my limited skill set.
Approach I've been attempting:
Using SQLCMD to run a ...
0
votes
1
answer
3k
views
Export data to csv files using sqlcmd with special characters in SQL Server
I am facing an issue while exporting data from a table to CSV file format using SQLCMD using SQL Query. The issue is with the data which contains special characters like degree Celsius (°) or ®. The ...
2
votes
1
answer
1k
views
SQL BCP Unknown Error while attempting to read format file on Ubuntu
I'm trying to automate some importing jobs to my SQL Server database and have the following XML format file:
<?xml version="1.0"?>
<BCPFORMAT xmlns="http://schemas.microsoft.com/sqlserver/...
1
vote
2
answers
793
views
SQL query to flatfile csv with column header, separator column ";" and text qualifier double-quote
I would like export SQL query to csv flatfile in ExecuteProcessTask in SSIS.
I can't see an export with the header, separator and qualify it as text.
I tried with sqlcmd and bcp.
For information, I ...
0
votes
0
answers
134
views
Exporting from SQL Server to Excel file and store in another server
I have my SQL Server database on one server and my web application on another server (ASP.NET MVC). I would like to generate some reports (basically just a stored procedure / select a view) and store ...
1
vote
1
answer
4k
views
SQLCMD, BCP - stored procedures don't exist
I'm trying to get a 'Hello World' going as a proof of concept using sqlcmd but I'm having a hard time:
Command:
sqlcmd 'cmd.exe'
Error:
Could not find stored procedure 'sqlcmd'.
I'm having ...
-1
votes
1
answer
3k
views
How to execute SQL query using SQLCMD with different user
I have requirement to run a SQL query on specific time daily and generate an output file. I'm already using bcp tool inside query to generate report. But, problem is, script is not generating output ...
0
votes
3
answers
2k
views
BCP / sqlcmd / osql with encapsulated text fields?
Can any of these command line tools export to .csv like:
"int_field", "varchar_field", "another_int_field"
10, "some text", 10
5, "more text", 1
etc?
i don't want to use a view or stored procedure ...
4
votes
2
answers
2k
views
BCP Command gives different output in SQL Server 2005 compared to 2008?
I have executed two identical bcp commands on two different setups with the same data.
Machine A = Windows Vista machine which is running SQL Server 2008
Machine B = Windows Server 2003 machine ...
65
votes
13
answers
188k
views
How to export SQL Server 2005 query to CSV
I want to export some SQL Server 2005 data to CSV format (comma-separated with quotes). I can think of a lot of complicated ways to do it, but I want to do it the right way. I've looked at bcp, but I ...