Solved

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

Posted on 2002-04-22
5
2,061 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
ID: 6959347
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
ID: 6959420
count(*) will never be NULL. So, no need to use NVL


sora
0
 
LVL 5

Expert Comment

by:sora
ID: 6959424
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
ID: 6959436
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
ID: 6959457
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.

Question has a verified solution.

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

Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to recover a database from a user managed backup

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