Solved

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

Posted on 2002-04-22
5
2,123 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
[X]
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
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

718 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