Showing posts with label include. Show all posts
Showing posts with label include. Show all posts

Wednesday, March 7, 2012

Cannot copy column names view result set

In SQL 2005 - when I display the results of a View and Copy all rows and columns, the resulting Paste in Excel does not include the column names.

How can I set SQL 2005 so the names of the columns will come along with the content of the copy function?

Background:

When I am using a SQL Query (instead of a view) I have the ability to control whether or not I am able to Include the Column Headers when copying or saving results. The control exists in the Options > Query Results > Results to Grid > Include column headings etc.

My question is how to get this same ability when attempting to copy the results of a VIEW vs. a Query.

Thank you,

Poppa Mike

The same way. Instead of opening the view into that grid thingy, open a query window and do a select from the view.|||

Yes Michael - I've thought of that but it causes me to take two steps. One to create the view and a second to get the results of the view by running a query against the view. I'd like to avoid the SQL Two-Step and just have the ability to copy the results from the view like I used to be able to do in SQL 2000. I appreciate your thoughts.

Regards, Poppa Mike

|||I was searching for the the same thing ..what i did was instead of selecting results to grid..choose the result as result to text and U can open the result file in excel and sort it out.

Thursday, February 16, 2012

Cannot connect to RS instance after Change IP of server!

Dear All,

We had changed the IP address of our SQL Database server(include the Report Server).

After we finished this, we restarted the server, but now, we cannot connect to the Report instance, database instance have no problem.

How to fix it?

Thank you.

Jeffers

Your connection string is likely stored in the installation folder in the file

<YourProjectName>.exe.config

You can open this file from the installation folder of client computer and modify the IP address manually

<connectionStrings>
<add name="MyTestApplication.My.MySettings.cnnConnection" connectionString="Data Source=123.456.789.234;Initial Catalog=TestDatabase;Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings>

Otherwise if you can open the VS project, open the app.config file and change the IP as above, then recompile and package up a new version to install on client computers.

Yet another way to change the connection string is open project properties(double click on My Project), goto "Settings" tab, change the value of the connection string from there.

Hope this helps.

Kiavash