
April 29th, 2005, 11:42 AM
|
|
Registered User
|
|
Join Date: Nov 2004
Posts: 5
Time spent in forums: 3 h 55 m 19 sec
Reputation Power: 0
|
|
|
Using DB table to Retrieve Data
SELECT SEGMENT2,PERIOD_NAME,sum(BEGIN_BALANCE_DR) as BEGIN_BALANCE_DR,sum(BEGIN_BALANCE_CR) as BEGIN_BALANCE_CR,sum(PERIOD_NET_DR) as PERIOD_NET_DR,sum(PERIOD_NET_CR) as PERIOD_NET_CR
FROM GL_BALANCES,GL_CODE_COMBINATIONS
WHERE GL_BALANCES.CODE_COMBINATION_ID = GL_CODE_COMBINATIONS.CODE_COMBINATION_ID AND
((GL_BALANCES.PERIOD_NAME = ? AND 1 = ?) OR (substr(GL_BALANCES.PERIOD_NAME,5,2) = ? AND 1 = ?)) AND
(GL_CODE_COMBINATIONS.SEGMENT2 LIKE
(SELECT CFACCOUNT FROM (EMPIREDW (D_CASHFLOW)) )AND
---Here is my Problem, I am trying to use the account sin table D_CASHFLOW in the EMPIREDW db to
---retrieve the data from Oracle. It is not recognizing the table as a bd, but rather a Oracle table I think.
---Any helop would be great, thanks.
ACTUAL_FLAG = 'A' AND
GL_CODE_COMBINATIONS.SEGMENT1 < '50' AND
CURRENCY_CODE = 'USD' AND
GL_BALANCES.TEMPLATE_ID = 168
group by SEGMENT2,PERIOD_NAME
|