Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 17th, 2006, 01:53 AM
rvandakar rvandakar is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2006
Posts: 1 rvandakar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 m 19 sec
Reputation Power: 0
How to Split and Combine Data in Tables in MS SQL 2000

Hi all,

This is my first post to this Forum. We are working on a project where scanned documents are stored into MS SQL database. There is only one table in the database. As it is with images, the size of the database is growing as 2 to 3 GB per day. To handle the database safely we thinking of splitting the database according to one key field say Book_no.
How to split the table with the query like "select * from doc_master where book_no=1", and split the table for each book numbers and later combine them to form a single original table. Please give me some suggestion/guidence. Its very urgent.

----
Regards,
Rajeev Vandakar

Reply With Quote
  #2  
Old December 25th, 2006, 07:50 AM
som_dutt som_dutt is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2006
Posts: 12 som_dutt User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 56 m 5 sec
Reputation Power: 0
Hi Rajeev!
Although, there are several ways to do it. You can use Select into statement to solve the problem. But, for each book you have to write a SQL statement. Something like this --

(I suppose the Library as name of base table)

Select * into book1 from Library where book_id=1
Select * into book2 from Library where book_id=2
...
...

This example would create two tables named book1 and book2. In which book1 contains only rows from book_id=1.

Reply soon ..

- Som Dutt

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft SQL Server > How to Split and Combine Data in Tables in MS SQL 2000


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT