If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Compare and select 2 diff files with same columns

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-01-10, 11:49
rajansql rajansql is offline
Registered User
 
Join Date: Sep 2010
Posts: 1
Unhappy Compare and select 2 diff files with same columns

Respectful SQL Gurus,

I need to compare 2 different files which have same columns.
FILE 1 : policy, Amt1, Amt2, Amt3, Amt4, and Amt5... Amt16
FILE 2 : policy, Amt1, Amt2, Amt3, Amt4, and Amt5....Amt16

If any amount field in FILE 1 has ZERO, but has a value in the same amount field in FILE 2, then, I need to select that record.

It will be great, if i can show both values adjucent to each other.
Example : Policy#, 0.00/500.85

Any clue will be greatly appreciated. Oh, by the way, i use DB2. but, if you can give a hint in SQL SERVER, I can try change that in DB2.
Thank you so much
Raj
Reply With Quote
  #2 (permalink)  
Old 09-01-10, 11:52
dav1mo dav1mo is offline
Registered User
 
Join Date: Dec 2007
Location: Richmond, VA
Posts: 782
First, are you even talking about writing a query against tables? If you are then try looking at outer joins.
Dave
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On