Home All Groups Group Topic Archive Search About

Strange Query Analyzer result

Author
23 Jun 2006 1:15 PM
Brent White
I am looking at archiving some tables.  One of them is a table called
TXUYLS01.  It is a fairly large table (about 650K rows).  My issue is
this:

If I do this query in Enterprise Manager:

SELECT     *
FROM         TXUYLS01
WHERE     (L1SNR <= '0000108426') AND (L1BNR = '001')

I get about 400K+ rows, about what I would expect.

If I run it in Query Analyzer, it returns only 3420 rows.  If, instead
of SELECT * I use SELECT COUNT(*), both return the same count, a number
of about 440K if I remember correctly.

I'm trying to figure out exactly how much data I'm moving and I need
all the right rows to move into another database to save the load on
our application server.  I'm afraid if I use Query Analyzer to move the
rows, it'll only move these rows.

I understand EM probably can run the SELECT INTO query, but this
concerns me a little.

Author
23 Jun 2006 1:46 PM
Sylvain Lafontaine
Check that the RowCount is set to 0 in the Connection Properties tab under
the Options menu.

Try sending the results to Text or to a File instead of a Grid (under the
Results tab).

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF


Show quote
"Brent White" <bwh***@badgersportswear.com> wrote in message
news:1151068541.651159.301240@g10g2000cwb.googlegroups.com...
>I am looking at archiving some tables.  One of them is a table called
> TXUYLS01.  It is a fairly large table (about 650K rows).  My issue is
> this:
>
> If I do this query in Enterprise Manager:
>
> SELECT     *
> FROM         TXUYLS01
> WHERE     (L1SNR <= '0000108426') AND (L1BNR = '001')
>
> I get about 400K+ rows, about what I would expect.
>
> If I run it in Query Analyzer, it returns only 3420 rows.  If, instead
> of SELECT * I use SELECT COUNT(*), both return the same count, a number
> of about 440K if I remember correctly.
>
> I'm trying to figure out exactly how much data I'm moving and I need
> all the right rows to move into another database to save the load on
> our application server.  I'm afraid if I use Query Analyzer to move the
> rows, it'll only move these rows.
>
> I understand EM probably can run the SELECT INTO query, but this
> concerns me a little.
>
Author
23 Jun 2006 2:24 PM
Brent White
I just checked the "messages" pane and it says "Numeric Value out of
range".

Wonder why EM didn't show that.

Sylvain Lafontaine (fill the blanks, no spam please) wrote:
Show quote
> Check that the RowCount is set to 0 in the Connection Properties tab under
> the Options menu.
>
> Try sending the results to Text or to a File instead of a Grid (under the
> Results tab).
>
> --
> Sylvain Lafontaine, ing.
> MVP - Technologies Virtual-PC
> E-mail: http://cerbermail.com/?QugbLEWINF
>
>
> "Brent White" <bwh***@badgersportswear.com> wrote in message
> news:1151068541.651159.301240@g10g2000cwb.googlegroups.com...
> >I am looking at archiving some tables.  One of them is a table called
> > TXUYLS01.  It is a fairly large table (about 650K rows).  My issue is
> > this:
> >
> > If I do this query in Enterprise Manager:
> >
> > SELECT     *
> > FROM         TXUYLS01
> > WHERE     (L1SNR <= '0000108426') AND (L1BNR = '001')
> >
> > I get about 400K+ rows, about what I would expect.
> >
> > If I run it in Query Analyzer, it returns only 3420 rows.  If, instead
> > of SELECT * I use SELECT COUNT(*), both return the same count, a number
> > of about 440K if I remember correctly.
> >
> > I'm trying to figure out exactly how much data I'm moving and I need
> > all the right rows to move into another database to save the load on
> > our application server.  I'm afraid if I use Query Analyzer to move the
> > rows, it'll only move these rows.
> >
> > I understand EM probably can run the SELECT INTO query, but this
> > concerns me a little.
> >
Author
23 Jun 2006 2:58 PM
Aaron Bertrand [SQL Server MVP]
I strongly recommend not using EM for viewing/manipulating data.


Show quote
>I just checked the "messages" pane and it says "Numeric Value out of
> range".
>
> Wonder why EM didn't show that.
Author
23 Jun 2006 8:29 PM
Tracy McKibben
Aaron Bertrand [SQL Server MVP] wrote:
> I strongly recommend not using EM for viewing/manipulating data.
>

But all of the pointy-clicky stuff is in there!!  :-)
Author
23 Jun 2006 9:21 PM
Stu
Are you attempting to do an INSERT using Query Analyzer and simply
doing the SELECT in EM?  The error you're receiving sounds like you're
INSERTing a non-numeric row into the destination database.

Stu

Brent White wrote:
Show quote
> I just checked the "messages" pane and it says "Numeric Value out of
> range".
>
> Wonder why EM didn't show that.
>
> Sylvain Lafontaine (fill the blanks, no spam please) wrote:
> > Check that the RowCount is set to 0 in the Connection Properties tab under
> > the Options menu.
> >
> > Try sending the results to Text or to a File instead of a Grid (under the
> > Results tab).
> >
> > --
> > Sylvain Lafontaine, ing.
> > MVP - Technologies Virtual-PC
> > E-mail: http://cerbermail.com/?QugbLEWINF
> >
> >
> > "Brent White" <bwh***@badgersportswear.com> wrote in message
> > news:1151068541.651159.301240@g10g2000cwb.googlegroups.com...
> > >I am looking at archiving some tables.  One of them is a table called
> > > TXUYLS01.  It is a fairly large table (about 650K rows).  My issue is
> > > this:
> > >
> > > If I do this query in Enterprise Manager:
> > >
> > > SELECT     *
> > > FROM         TXUYLS01
> > > WHERE     (L1SNR <= '0000108426') AND (L1BNR = '001')
> > >
> > > I get about 400K+ rows, about what I would expect.
> > >
> > > If I run it in Query Analyzer, it returns only 3420 rows.  If, instead
> > > of SELECT * I use SELECT COUNT(*), both return the same count, a number
> > > of about 440K if I remember correctly.
> > >
> > > I'm trying to figure out exactly how much data I'm moving and I need
> > > all the right rows to move into another database to save the load on
> > > our application server.  I'm afraid if I use Query Analyzer to move the
> > > rows, it'll only move these rows.
> > >
> > > I understand EM probably can run the SELECT INTO query, but this
> > > concerns me a little.
> > >

AddThis Social Bookmark Button