Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to create spool file on SQL Server?

Posted on 2014-08-12
2
Medium Priority
?
297 Views
Last Modified: 2014-08-18
How to create spool file on sql server and what sql commands we need to set for genetrating the file?
My file contains only Id column .

Please help .
0
Comment
Question by:digs developer
2 Comments
 

Author Comment

by:digs developer
ID: 40255860
Below is my statement . I have run this state
sqlcmd -S aaa.aaaprod.com -U usernam -Pdigspwd -d xyz -i sqlquery.sql -o testfile.txt  -y 8000 -h -1

It works proper .
Thank you !!
0
 
LVL 81

Accepted Solution

by:
arnold earned 1080 total points
ID: 40257560
Bcp is the utility to run as a t-SQl

Are you looking for a job that will run and generate a file?
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question