Advertisement

07.02.2008 at 08:03AM PDT, ID: 23533813
[x]
Attachment Details

View Keeps Reverting To SELECT TOP (100)

Asked by chrisryhal in SQL Server 2005

I am just trying to do a simple select statement the below code keeps AUTO reverting to SELECT TOP (100).  Is this a problem?  I figured that if this kept up, it would only show me 100 rows, where this SELECT statement could EASILY be thousands.


SELECT    LABEL, TIME, TIMEZONE, MESSAGE, IN, NUMBER, STREET,
                      CITY, STATE, ZIP, LANDMARK
FROM         dbo.INBOUND
WHERE     (RIGHT(VEHICLE, 1) = 'Y') AND (TIME BETWEEN DATEADD(d, - 1, GETDATE()) AND GETDATE())
ORDER BY TIME, LABEL
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
THIS CODE IS WHAT IT CONTINUES TO REVERT TOO
 
 
 
SELECT     TOP (100) LABEL, TIME, TIMEZONE, MESSAGE, IN, NUMBER, STREET, 
                      CITY, STATE, ZIP, LANDMARK
FROM         dbo.INBOUND
WHERE     (RIGHT(VEHICLE, 1) = 'Y') AND (TIME BETWEEN DATEADD(d, - 1, GETDATE()) AND GETDATE())
ORDER BY TIME, LABEL
 
Loading Advertisement...
 
[+][-]07.02.2008 at 08:08AM PDT, ID: 21917153

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: SQL Server 2005
Sign Up Now!
Solution Provided By: chapmandew
Participating Experts: 2
Solution Grade: A
 
 
[+][-]07.02.2008 at 08:14AM PDT, ID: 21917207

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 08:28AM PDT, ID: 21917381

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.02.2008 at 08:34AM PDT, ID: 21917458

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 08:41AM PDT, ID: 21917543

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628