Solved

Select NVL(count(*),0) from TABLA

Posted on 2002-04-22
5
2,009 Views
Last Modified: 2011-10-03
Hemos desarrollado un Report en el que utilizamos la expresión:
   Select NVL(count(*),0) from TABLA

Sabemos que esta expresión es correcta pero nos sale el error ORA-00936: falta una expresión.

El Report está desarrollado en la version 6.0 de Developer y la BBDD es la 8.0.5

¿Nos podías ayudar a solucionarlo?

Gracias.
0
Comment
Question by:juanho
  • 3
  • 2
5 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 100 total points
Comment Utility
didn't understand what you wrote,
but you do not need an NVL if you want only to count,
even is the table empty you will get a 0 as result

also use
Select count(*) from TABLA

meikl ;-)

0
 
LVL 5

Expert Comment

by:sora
Comment Utility
count(*) will never be NULL. So, no need to use NVL


sora
0
 
LVL 5

Expert Comment

by:sora
Comment Utility
kretzschmar - sorry I missed reading your comment in which you already said the same thing

can we have a translator, please :-)


sora
0
 
LVL 27

Expert Comment

by:kretzschmar
Comment Utility
translated by babelfish:
We have developed a Report in which we used the expression: Select NVL(count(*), 0) from TABLE We know that this expression is correct but it leaves the Ora-00936 error to us: it lacks an expression. The Report is developed in version 6.0 of Developer and the BBDD is the 8.0.5 You could help to solve it us? Thanks.
0
 
LVL 27

Expert Comment

by:kretzschmar
Comment Utility
oops, not seen the grading, before

glad to helped you

meikl ;-)
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.

743 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

15 Experts available now in Live!

Get 1:1 Help Now