Procedure help Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: Procedure help

Threaded View

  1. #1
    Join Date
    Feb 2002

    Procedure help


    I have two tables



    We have a front end search Screen, which has to display the count of employees, based on certain conditons, say where Account=xyz or
    Customer='abc' or T1_Date between

    I am planning to have a Procedure with all the possible search parameters as IN parameters and have a single query as follows.

    select count(emp_id)
    from emp_main a, emp_info b
    where t1_Date between and
    and Account=
    and customer=
    and a.emp_id=b.emp_id

    Now my problem is, if the front end user wants to search only based on T1_date, rest of the IN parameters will be null.

    Say account,customer will be null.

    Some other user may search with with all the values for all the conditions.

    How can i handle this situation, when he searches based on only one value.

    can some body guide me.

    Last edited by Sonia; 01-28-2004 at 04:25 AM.

Posting Permissions

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

Click Here to Expand Forum to Full Width