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 > Cast character into integer for Case Statement

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-31-03, 13:10
kburns1649 kburns1649 is offline
Registered User
 
Join Date: Nov 2003
Posts: 9
Cast character into integer for Case Statement

The following doesn't work with operator "<' and 0.....All fields are character from DB2. I know I need to cast the data into an Integer? Can't seem to get around it ...Any thoughts?

Select

SUM (Case a.BIL_AMT WHEN > 0 Then 0 ELSE a.BIL_AMT END) - a.BIL_CRY_FWD_AMT) AS "Current Amt Due"

From a.Bill
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