Re: when CASE value is negative, SELECT/CASE fails....


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Jim Guerber on August 29, 2011 at 10:21:15:

In Reply to: when CASE value is negative, SELECT/CASE fails.... posted by Bob A on August 29, 2011 at 08:53:46:

You forgot the case where sgn(xx) = 0.

That was tsken care of in the else statement that replaced it.


SELECT CASE SGN(WKPAYAMT)
CASE 0
WKPAY.CR = 0
WKPAY.DR = 0
CASE 1
WKPAY.DR = WKPAYAMT
CASE -1
WKPAY.CR = 0 - WKPAYAMT
ENDSELECT



Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]