0

I am looking for a way to set the width on the returned column result from a SQL query.

I run a query like Select Product from ConfigScheduling where Product is an Nvarchar(Max) column. The result in SQL Server Management Studio with Results to Grid is a 90 char wide visible column, with the full result present, but not visible.

Thank you

3 Answers 3

2

Couldn't find it by default, but if you double-click on the right part of the Column Header it will stretch like in Excel.

Sign up to request clarification or add additional context in comments.

Comments

2

Tools>Options>Query Results>SQL Server>Results to Grid>Non XML data Tools>Options>Query Results>SQL Server>Results to Text>Maximum number of characters displayed in each column.

If these still don't suit your needs, you'll need to use another tool such as bcp or sqlcmd/osql.

Comments

1

If I remember correctly, SQL Server Management Studio cannot pull the whole nvarchar(max) field into display and won't attempt to either. The only way to fully access the resultset is to use a third party tool or display it in a gridview or something in a webapp.

1 Comment

Results to text file gives the entire results.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.