Default Values !!!!!!!! Urgent [message #19323] |
Tue, 12 March 2002 00:25 |
Rm69
Messages: 39 Registered: January 2002
|
Member |
|
|
l want to have a condition that gives me a value zero in my scripts so that if the institution is not african bank then my value in the total should be zero so that when l subtract the CAPITAL-SUM(TOTAL)) l get the Capital.
CREATE TABLE TABLE_BSP
AS
SELECT
DISTINCT(DEALREF),pw38600p.lof386 loanOff,pw38600p.bro386 Brokercd,CAPITAL,(CAPITAL-SUM(TOTAL)) TOTAL,
COUNT(TOTAL) LOAN_COUNT
FROM MIS_PERSAL,pw38600p
WHERE INSTITUTION LIKE '%AFRICAN BANK%' and dealref=pw38600p.dea386
GROUP BY DEALREF,CAPITAL,lof386,bro386
--Use to extract hmcs
CREATE TABLE TABLE_HMC
AS
SELECT
DISTINCT(DEALREF),pw38600p.lof386 loanOff,pw38600p.bro386 Brokercd,CAPITAL,(CAPITAL-SUM(TOTAL)) TOTAL,COUNT(TOTAL) LOAN_COUNT
FROM MIS_PERSAL,pw38600p
WHERE INSTITUTION LIKE '%AFRICAN BANK%' AND brocker = 'HMC' AND
dealref=pw38600p.dea386
GROUP BY DEALREF,CAPITAL,lof386,bro386
|
|
|
|