dcsimg
I am having a propblem with jdbc
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   zriekumaer_z
Posted On:   Friday, November 7, 2003 07:40 PM

String sSq = lSELECT T11.PART_NAME,DSM103.DELI_YMD,DSM103.PART_ID,SUM(DSM103.LOCAL_TAX) AS TotalAmountOfLocalTax,"; sSql = sSql + " SUM(DSM103.INCOME_TAX) AS TotalAmountOfIncomeTax,SUM(DSM103.TAX_ALLOC_AMT) AS TotalAmountOfTaxableAmount, "; sSql = sSql + "SUM(DSM103.TAXFREE_ALLOC_AMT) as TotalAmountOfTaxFreeAmount FROM DSM103 LEFT JOIN "; sSql = sSql + "(SELECT DSM101.PART_ID, DSM101.PART_NAME FROM DSM101 WHERE DSM101.DEL_SIN='00') AS T11 ON DSM103.PART_ID=T11.PART_ID "; sSql = sSql + "LEFT JOIN (SELECT *FROM DSM101) AS T12 ON DSM103.PART_ID=T12.PART_ID WHERE DSM103.DELI_YMD BETWEEN 200245 AND 200345 AND "; sSql = sSql + "DSM103.FUND_SBT_CD='91' AND DSM103.PLAN_ID IN('') and (   More>>

String sSq = lSELECT T11.PART_NAME,DSM103.DELI_YMD,DSM103.PART_ID,SUM(DSM103.LOCAL_TAX) AS TotalAmountOfLocalTax,";
sSql = sSql + " SUM(DSM103.INCOME_TAX) AS TotalAmountOfIncomeTax,SUM(DSM103.TAX_ALLOC_AMT) AS TotalAmountOfTaxableAmount, ";
sSql = sSql + "SUM(DSM103.TAXFREE_ALLOC_AMT) as TotalAmountOfTaxFreeAmount FROM DSM103 LEFT JOIN ";
sSql = sSql + "(SELECT DSM101.PART_ID, DSM101.PART_NAME FROM DSM101 WHERE DSM101.DEL_SIN='00') AS T11 ON DSM103.PART_ID=T11.PART_ID ";
sSql = sSql + "LEFT JOIN (SELECT *FROM DSM101) AS T12 ON DSM103.PART_ID=T12.PART_ID WHERE DSM103.DELI_YMD BETWEEN 200245 AND 200345 AND ";
sSql = sSql + "DSM103.FUND_SBT_CD='91' AND DSM103.PLAN_ID IN('') and ((DSM103.SALE_KBN='00' AND DSM103.TRADE_RSN_CD='9105') OR ";
sSql = sSql + "(DSM103.SALE_KBN='00' AND DSM103.TRADE_RSN_CD='9107') OR (DSM103.SALE_KBN='10')) AND DSM103.INCOME_TAX > 0 AND ";
sSql = sSql + "DSM103.UPD_TRNS_KBN in('00','20') AND DSM103.DEL_SIN='00' GROUP BY T11.PART_NAME,DSM103.DELI_YMD, ";
sSql = sSql + "DSM103.PART_ID";
// ORDER BY DSM103.DELI_YMD,DSM103.PART_ID";
This is the sql statement i use in my java program. if i include the order by statement i am getting an error Invalid cursor state. if i execute this sql in SQL server Query analyser it is working fine. but there is no values.

what is the problem i got stuck here please help me

   <<Less
About | Sitemap | Contact