SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL server table on a PC


SQL server table on a PC

Author
Message
Beginner2012
Beginner2012
SSC Rookie
SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)

Group: General Forum Members
Points: 39 Visits: 85
Hello,
can we create a SQL server table on a PC based on a query on the sql server ?
Thank you
Lynn Pettis
Lynn Pettis
SSC-Dedicated
SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)

Group: General Forum Members
Points: 39025 Visits: 38511
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?

Cool
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)
Beginner2012
Beginner2012
SSC Rookie
SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)

Group: General Forum Members
Points: 39 Visits: 85
I want to save a table from a sql server on my local pc..
Lynn Pettis
Lynn Pettis
SSC-Dedicated
SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)

Group: General Forum Members
Points: 39025 Visits: 38511
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.

Cool
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)
priest Ivan Delic
priest Ivan Delic
Valued Member
Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)Valued Member (66 reputation)

Group: General Forum Members
Points: 66 Visits: 130
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
Alan.B
Alan.B
SSCertifiable
SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)SSCertifiable (5.1K reputation)

Group: General Forum Members
Points: 5095 Visits: 7697
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



Best practices for getting help on SQLServerCentral
Need to split a string? Try DelimitedSplit8K or DelimitedSplit8K_LEAD (SQL 2012+)
Need a pattern-based splitter? Try PatternSplitCM
Need to remove or replace those unwanted characters? Try PatExclude8K and PatReplace8K.

"I can't stress enough the importance of switching from a 'sequential files' mindset to 'set-based' thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code. " -- Itzek Ben-Gan 2001
ACinAZ
ACinAZ
SSC Veteran
SSC Veteran (209 reputation)SSC Veteran (209 reputation)SSC Veteran (209 reputation)SSC Veteran (209 reputation)SSC Veteran (209 reputation)SSC Veteran (209 reputation)SSC Veteran (209 reputation)SSC Veteran (209 reputation)

Group: General Forum Members
Points: 209 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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search