Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQL server table on a PC Expand / Collapse
Author
Message
Posted Friday, June 8, 2012 10:26 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, July 25, 2012 12:27 PM
Points: 31, Visits: 85
Hello,
can we create a SQL server table on a PC based on a query on the sql server ?
Thank you
Post #1313263
Posted Friday, June 8, 2012 10:29 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 7:41 PM
Points: 23,033, Visits: 31,555
Beginner2012 (6/8/2012)
Hello,
can we create a SQL server table on a PC based on a query on the sql server ?
Thank you


What? Can you explain in greater detail what you are asking?



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1313268
Posted Friday, June 8, 2012 10:31 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, July 25, 2012 12:27 PM
Points: 31, Visits: 85
I want to save a table from a sql server on my local pc..
Post #1313273
Posted Friday, June 8, 2012 10:34 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 7:41 PM
Points: 23,033, Visits: 31,555
Beginner2012 (6/8/2012)
I want to save a table from a sql server on my local pc..


Still not sure what you mean. You could export the data to a file and store the file on your PC.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1313276
Posted Tuesday, August 14, 2012 12:08 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, June 19, 2014 1:04 PM
Points: 45, Visits: 129
You could try this (it worked for me when I installed SQL Server 2008 over my SQL Server 2005 instance and SQL Server 2005 databases - after I could not get any data from my Server). I copied my database and log files and opened it on another SQL Server 2005, then running following step:

1. Open SQL Server 2005 Management Studio Express, connect to your server.
2. Open the New Query window [(just below menu (File, New...)].
3. Type USE db (or whatever name of your database is, for instance if your db name is USA, type USE USA).
4. SELECT * From table1 (table1 is a name of table that you want to save on your computer) AS data.
5. Find button on the top-right side of that window and above that should be named Results to file (third line from the top, 11th, command after command Execute, just point mouse above each of commands and search for one called Results to file...).
6. Click F5 on key board
7. Click it and when new window opens up choose a location of your data. In file name type whatever you want and after type, for example data.txt (data is a name of your file, let's say).

It should get your data in text file on your PC from your SQL Server table.

I hope this could be useful to you.

Sincerely yours,

Fr. ivan Delic
Serbia
Post #1344939
Posted Thursday, August 16, 2012 6:27 PM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Yesterday @ 4:49 AM
Points: 556, Visits: 2,581
Beginner2012 (6/8/2012)
Hello,
can we create a SQL server table on a PC based on a query on the sql server ?
Thank you


edited... Misunderstood your question.

... Perhaps some more detail would help.


-- Alan Burstein



Read this article for best practices on asking questions.
Need to split a string? Try this (Jeff Moden)
Need a pattern-based string spitter? Try this (Dwain Camps)
My blog
Post #1346306
Posted Monday, August 20, 2012 8:33 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, April 1, 2014 3:27 PM
Points: 115, Visits: 957
XMLSQLNinja (8/16/2012)

... Perhaps some more detail would help.


For example...
-How do want the data from the server to be shown on the PC? Flat file, XML, Excel, CSV, what?

-Do you have an instance of SQL server on your PC with a target database available to receive the table? In that case, a simple
SELECT <fieldlist>
INTO <your.local.PC.table>
FROM <your.SQL.source.table>
would suffice.

-Do you want to have the data in Excel? Do an Export from SSMS.

The answer to your question is "Yes", but you didn't give us enough detail to allow us to help you get to your preferred end-state.
Post #1347227
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse