conditional check in oracle


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: conditional check in oracle

  1. #1
    Join Date
    May 2005
    Posts
    2

    Unhappy conditional check in oracle

    HI

    I have the following query in a procedure

    select a.S_No,
    a.transaction,
    a.r_no,
    b.credit_card_No,
    b.credit_card_amount,
    c.check_number,
    c.check_amount,
    from rpt a,
    credit_card b,
    check b,
    where a.r_no = b.r_no(+)
    and a.r_no = c.r_no(+)

    I m passing a value to the procedure ("check" or "card")

    if the value is blank then I have to consider all the tables, but if I pass "Check" then I have to consider only rpt and check table. And if I pass "Card" then I have to consider only rpt and credit_card tables.

    Can some one guide me on how I can do the coditional check

    thanking in advance

  2. #2
    Join Date
    Dec 2003
    Posts
    2,750
    You can use the Case expression:

    http://www.oracle-base.com/articles/9i/Case9i.php
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

Similar Threads

  1. setting up asp.net server
    By kylemcna in forum ASP.NET
    Replies: 5
    Last Post: 04-13-2007, 03:23 AM
  2. Re: ORACLE Speed with ADO - try comand object
    By Kevin MacCallum in forum VB Classic
    Replies: 0
    Last Post: 08-28-2002, 12:46 PM
  3. Check box isssue when bound to a database column
    By Narayan in forum VB Classic
    Replies: 0
    Last Post: 04-10-2001, 11:30 AM
  4. MTS, Oracle 7 /NT and remote databases
    By Eugene Chernyak in forum Enterprise
    Replies: 0
    Last Post: 07-27-2000, 10:35 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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center