Solved

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

Posted on 2002-04-22
5
2,035 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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 …
Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

863 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