Solved

NTILE problem

Posted on 2013-01-18
8
250 Views
Last Modified: 2013-02-19
When I use NTILE in a query inside of SQL server management studio it stops working. I can use NTILE in the SQL Query ANalyzer with no problem.

I do not see any entries in the Server Log about a problem.

Any ideas? Thanks.
0
Comment
Question by:mfony
  • 4
  • 4
8 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 38795301
When I use NTILE in a query inside of SQL server management studio it stops working.
Care to elaborate?  
Where specifically does it "stop working"? Query Window?  Designer (ug!), somewhere else?
How does it "stop working"?
        1. Error message, if so what was the error message?
        2. Wrong results, if so what are they and what was the expected output?
        3. Something else?

I can use NTILE in the SQL Query ANalyzer with no problem.
SQL Query Analyzer was a tool that came with SQL Server 2000, so you cannot be using that as SQL Server 2000 did not support NTILE.
0
 

Author Comment

by:mfony
ID: 38805399
I get a window that says the  management studio stopped working. Like the program had a glitch.

SQL query analyzer can connect to a 2005 database and NTILE works fine.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 38805494
I get a window that says the  management studio stopped working. Like the program had a glitch.
SQL query analyzer can connect to a 2005 database and NTILE works fine.

I am confused what are you using?  SSMS or SQL Query Analyzer?  If you are using SSMS are you using the Query window or the Query Designer?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:mfony
ID: 38805541
I'm executing an NTILE query on a table using SSMS. Open table and use SQL pane then write the NTILE query.

SELECT TICKER, performance, NTILE(4) OVER (ORDER BY performance) FROM LOAD_Performance_Peers
WHERE (Performance IS NOT NULL)
ORDER BY performance
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 500 total points
ID: 38807390
I am afraid I have no idea what is going on.  I tested your query and there was no error message.   Have you checked the integrity of your database recently (DBCC CHECKDB) ?
0
 

Author Comment

by:mfony
ID: 38810554
CHECKDB found 0 allocation errors and 0 consistency errors in database
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 38811153
Then I am afraid I have no idea.  Hopefully someone will step up to the plate.
0
 

Author Comment

by:mfony
ID: 38811185
Thanks for your help.
0

Featured Post

Free Webinar: AWS Backup & DR

Join our upcoming webinar with experts from AWS, CloudBerry Lab, and the Town of Edgartown IT to discuss best practices for simplifying online backup management and cutting costs.

Question has a verified solution.

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

There are some very powerful Data Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a discu…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

756 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