Can osql use tabs as delimiters? -s "\t" doesn't work.
In which context are you trying to use Tabs?
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Roberto" <Roberto@.discussions.microsoft.com> wrote in message
news:0BB91E4F-5D23-43D6-927A-E652F776FBCA@.microsoft.com...
Can osql use tabs as delimiters? -s "\t" doesn't work.
|||I want to create a tab delimited output file.
My command is:[vbcol=seagreen]
osql -E -S servername -d dbname -s "\t" -w 250 -Q "SELECT Column1, Column2,
Column3 FROM viewname" -o TabDelimitedFileForExcel.txt
<<
"Narayana Vyas Kondreddi" wrote:
> In which context are you trying to use Tabs?
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Roberto" <Roberto@.discussions.microsoft.com> wrote in message
> news:0BB91E4F-5D23-43D6-927A-E652F776FBCA@.microsoft.com...
> Can osql use tabs as delimiters? -s "\t" doesn't work.
>
>
|||I am not aware of any built-in feature like that in OSQL. You will have to
concatenate your columns in your SELECT statement to produce a tab delimited
row. I suggest you do this from a DTS package instead, as DTS provides this
and other formats for output files.
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Roberto" <Roberto@.discussions.microsoft.com> wrote in message
news:420187EF-7E9D-4FBF-9127-3CB51BABCB82@.microsoft.com...
I want to create a tab delimited output file.
My command is:[vbcol=seagreen]
osql -E -S servername -d dbname -s "\t" -w 250 -Q "SELECT Column1, Column2,
Column3 FROM viewname" -o TabDelimitedFileForExcel.txt
<<
"Narayana Vyas Kondreddi" wrote:
> In which context are you trying to use Tabs?
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Roberto" <Roberto@.discussions.microsoft.com> wrote in message
> news:0BB91E4F-5D23-43D6-927A-E652F776FBCA@.microsoft.com...
> Can osql use tabs as delimiters? -s "\t" doesn't work.
>
>
|||You might want to look at using BCP or DTS instead to do that.
Andrew J. Kelly SQL MVP
"Roberto" <Roberto@.discussions.microsoft.com> wrote in message
news:420187EF-7E9D-4FBF-9127-3CB51BABCB82@.microsoft.com...[vbcol=seagreen]
>I want to create a tab delimited output file.
> My command is:
> osql -E -S servername -d dbname -s "\t" -w 250 -Q "SELECT Column1,
> Column2,
> Column3 FROM viewname" -o TabDelimitedFileForExcel.txt
> <<
> "Narayana Vyas Kondreddi" wrote:
|||Agreed. If necessary, turn the query into a stored proc or view and bcp
from there.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:%23UT2QMCWFHA.2128@.TK2MSFTNGP15.phx.gbl...
You might want to look at using BCP or DTS instead to do that.
Andrew J. Kelly SQL MVP
"Roberto" <Roberto@.discussions.microsoft.com> wrote in message
news:420187EF-7E9D-4FBF-9127-3CB51BABCB82@.microsoft.com...[vbcol=seagreen]
>I want to create a tab delimited output file.
> My command is:
> osql -E -S servername -d dbname -s "\t" -w 250 -Q "SELECT Column1,
> Column2,
> Column3 FROM viewname" -o TabDelimitedFileForExcel.txt
> <<
> "Narayana Vyas Kondreddi" wrote:
|||Good enough.
Thanks all.
"Tom Moreau" wrote:
> Agreed. If necessary, turn the query into a stored proc or view and bcp
> from there.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> ..
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:%23UT2QMCWFHA.2128@.TK2MSFTNGP15.phx.gbl...
> You might want to look at using BCP or DTS instead to do that.
> --
> Andrew J. Kelly SQL MVP
>
> "Roberto" <Roberto@.discussions.microsoft.com> wrote in message
> news:420187EF-7E9D-4FBF-9127-3CB51BABCB82@.microsoft.com...
>
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment