Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2012

    Post Unanswered: count with condition

    select count(*)<=1 from queue where qu-id='A003924'.

    queue is name of the table. qu-id is field name.

    the output of this query is yes.

    if count (*)<=1. i do not want boolean value instead i want the count.

    please help me.!!!

  2. #2
    Join Date
    Nov 2003
    Provided Answers: 8
    I am not sure if I understand your question, but it sounds like you want:

    select count(*)
    from queue 
    where qu-id='A003924'
    having count(*) <= 1
    Please use [code] tags in the future to format your SQL statements
    I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags:

    Tips for good questions:

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts