Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 select top 999998 into another table

Author  Topic 

WJHamel
Aged Yak Warrior

651 Posts

Posted - 2012-02-24 : 12:16:35
Help.

I would like to be able to do a select of all columns from one table into a new table, but only the first 999998 rows. If necessary, i could order the select by the Personid column if it helps my next step.

After i accopmlish that, i need to select the rows between 999998 and 1568354 into a second new table in the same manner.

So the question is, how do these selects look?

thanks

WJHamel
Aged Yak Warrior

651 Posts

Posted - 2012-02-24 : 12:20:14
Ugh. sorry, prematurely posted. figured it out.
Go to Top of Page

WJHamel
Aged Yak Warrior

651 Posts

Posted - 2012-02-24 : 12:27:49
by the way, credit for the above statement goes to all the people on this board who have helped me learn SO much in this process (Thanks to Tara, Visakh, Sunita, TransactCharlie and the dozens of others whose names i can't recall right now) More often than not now, as a result of your help, i find myself not even needing to finish typing a new post because before i reach the "submit" button, i've untangled myself from my own problems!
Thanks!
james
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-02-24 : 13:14:39


Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2012-02-24 : 13:26:59


Water Closet

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page
   

- Advertisement -