Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

NTILE problem

Posted on 2013-01-18
8
249 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

839 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