DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  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, 02: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, 11:46 AM
  3. Check box isssue when bound to a database column
    By Narayan in forum VB Classic
    Replies: 0
    Last Post: 04-10-2001, 10:30 AM
  4. MTS, Oracle 7 /NT and remote databases
    By Eugene Chernyak in forum Enterprise
    Replies: 0
    Last Post: 07-27-2000, 09:35 AM

Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links