Solved

NTILE problem

Posted on 2013-01-18
8
241 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
 

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now