viji Beginner
Joined: 03 Dec 2002 Posts: 17 Topics: 11
|
Posted: Wed Jul 23, 2003 12:59 am Post subject: How can I use CASE in... |
|
|
Hello,
Consider
I have a EMPLOYEE table with employeeID,InsuranceID,Employee Name,ClaimNo....
I have nearly 3 Insurance company....Each Insurance company different tables to store all its details like ClaimNo,PaymentDate,...Here ClaimNo is the unique key.
My requirement is depending on the InsuranceID i have to take the details from the corresponding Insurance table. Right now, i am reading the EMPLOYEE table and if the InsuanceID=1 then i have a separate SQL to read the InsuranceTable1 and if InsuranceID=2 then i have another separate SQL to read InsuranceTable2.....
Can I combine all these queries into a single query using CASE statement? |
|