View Single Post
Old 03-25-2012, 06:48 PM   #168576
Registered User
Join Date: Mar 2008
Location: Inland Empire, SoCal
Posts: 20,233
My Ride: 633csi & 325i
I want to turn a value into a negative number if it has a credit against it.

This is what im trying and its not working i feel ike im close but its not working.

select (l.qty_to_ship*-1 when (h.orig_ord_type < > 'C')) as Credit_QTY
from oeordlin_sql l

nevermind i got it.

Select case when h.orig_ord_type = 'C' then qty_to_ship*-1 else qty_to_ship end as Credit_QTY
from oelinhst_sql l

Last edited by evilstar; 03-25-2012 at 08:42 PM.
evilstar is online now   Reply With Quote