Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5964359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:25:04+00:00 2026-05-22T19:25:04+00:00

I have a SQL Server field of type varchar(max). I have an automated batch

  • 0

I have a SQL Server field of type varchar(max). I have an automated batch process that uses sqlcmd to pull data from a database and dump it into a text file. We have fields with more than 256 characters in them, and these fields get cut off unless I add something like “-y 0” to the flags in the sqlcmd call.

This gives me the full text for fields larger than 256 characters, but it also adds a great deal of whitespace–the fields are padded to make each field as big as it could possibly be according to its data type, essentially given me huge files with lots of padding and waste space.

I could fix this by adding -W to my sqlcmd flags, but this gives me an error saying that -W and -y are incompatible.

Has anyone had this problem before? Thoughts on how to solve it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T19:25:05+00:00Added an answer on May 22, 2026 at 7:25 pm

    How long is your longest value? You may get away with the switches

    -w 65535 -W
    

    which will cope with a width of up to 65535 characters, but will not help you beyond that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok I'm using SQL Server 2008 and have a table field of type VARCHAR(MAX)
I have a field type varchar in sql server. It contains data like 010109
I have an SQL Server 2005 table that has a varchar(250) field which contains
I have a Microsoft SQL Server database that contains a data field of BIT
I have a 1) text field type in my Sql server that I would
I have a brown-field SQL Server 2005 database that uses standard, unsorted GUIDs as
I have a SQL Server table with a CreatedDate field of type DateTimeOffset(2). A
I have one field in Database ( Sql Server DB 2000) with varchar field
I have a numeric database field (numeric(3) in SQL Server 2000) that allows nulls,
I have a DateTime field in SQL Server for some products expiration (ExpirationDate). I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.