Solved

NTILE problem

Posted on 2013-01-18
8
247 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

If you having speed problem in loading SQL Server Management Studio, try to uncheck these options in your internet browser (IE -> Internet Options / Advanced / Security):    . Check for publisher's certificate revocation    . Check for server ce…
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
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…

810 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