I am having problem with the query below.
I need to delete rows in table LLC.GAPW12_COMPPRIC_TB where GAPW01.CU_ID_NR = '10502187' and AND GAPW12.FEE_TYPE_ID_NR ='0000000000000000009'
But what is happening is that that its deleting all rows in LLC.GAPW12_COMPPRIC_TB where the GAPW011.PRIC_MODEL_ID_NR is the same as the same as the records where GAPW01.CU_ID_NR = '10502187' and AND GAPW12.FEE_TYPE_ID_NR ='0000000000000000009'
So its deleting more records than I want to.
Any sugestions on what I am doing wrong?
DELETE FROM LLC.GAPW12_COMPPRIC_TB
WHERE PRIC_MODEL_ID_NR IN
from LLC.GAPW01_GAPCNFG_TB GAPW01, LLC.GAPW11_PRICMODL_TB GAPW011, LLC.GAPW18_FEETYPE_TB GAPW18, LLC.GAPW12_COMPPRIC_TB GAPW12
where GAPW01.GAP_CNFG_ID_NR = GAPW011.GAP_CNFG_ID_NR
AND GAPW011.PRIC_MODEL_ID_NR = GAPW12.PRIC_MODEL_ID_NR
AND GAPW01.CU_ID_NR = '10502187'
AND GAPW12.FEE_TYPE_ID_NR ='0000000000000000009')