?
Solved

Dosent transfer all records ?

Posted on 2012-09-03
2
Medium Priority
?
499 Views
Last Modified: 2012-09-04
Hi!

I am using this query:

SELECT *
INTO SALG_STATISTIKKNEW3
FROM SALG_STATISTIKK

Open in new window


SALG_STATISTIKK is a view that contains of 2 million records..

After it have created the new TABLE SALG_STATISTIKKNEW3
Table SALG_STATISTIKKNEW3 contains of only 1000 records ?

Why ?
0
Comment
Question by:team2005
2 Comments
 
LVL 12

Assisted Solution

by:Habib Pourfard
Habib Pourfard earned 1000 total points
ID: 38360217
SET ROWCOUNT Causes SQL Server to stop processing the query after the specified number of rows are returned.

To set this option off so that all rows are returned, specify SET ROWCOUNT 0

try:

SET ROWCOUNT 0;

SELECT *
INTO SALG_STATISTIKKNEW3
FROM SALG_STATISTIKK

Open in new window

0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 1000 total points
ID: 38361532
After it have created the new TABLE SALG_STATISTIKKNEW3
Table SALG_STATISTIKKNEW3 contains of only 1000 records ?

How did you verify this?  How many rows were affected?  If the answer is not 1000, did you try:
SELECT COUNT(*)
FROM SALG_STATISTIKKNEW3
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

755 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question