Focal Point
(Foc14006) SQL Translator Error Null join to table holdtable()

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/1757000336

August 23, 2013, 06:01 AM
Vikrantsabari88
(Foc14006) SQL Translator Error Null join to table holdtable()
Here is the SQL statement generated in I way migrator. It is also throwing (FOC14019) Error.It Would be very helpful if anyone help me to resolve this issue.

SELECT
T5.VENDOR_SKU
FROM
(SELECT
T3.VENDOR_SKU
FROM
((SELECT
T4.VENDOR_SKU
FROM
(f_rso_stg_ds T4 LEFT OUTER JOIN d_product T1
ON
T4.VENDOR_SKU = T1.PRODUCT_KEY )
WHERE
T1.PRODUCT_KEY IS NULL
) T3
LEFT OUTER JOIN xref_product T2
ON
T3.VENDOR_SKU = T2.CROSS_REF_PRODUCT_KEY )
WHERE
T2.CROSS_REF_PRODUCT_KEY IS NULL
) T5


WebFOCUS 7.6
Windows, All Outputs

August 26, 2013, 02:31 PM
Clif
Your signature says WebFOCUS 7.6 but since support for sub queries was added in DataMigrator Release 7.7 I'm going to assume that you are using the current release.

A FOC14019 is a SQL Translator general error. What relational database is your source? I think to diagnose this further it may be best to open a hottrack case and provide the three source synonyms and data flow.

Alternatively you could take another approach.

If PRODUCT_KEY is a the key of d_product it can't be NULL in the source table, so the only NULL values would be those created by the OUTER JOIN

So it looks like what you want is all the rows f_rso_stg_ds where the VENDOR_KEY is not found in d_product.

If that's correct instead of a SUB-SELECT and a JOIN another way to obtain that result is with a WHERE condition:

NOT EXISTS(SELECT * FROM d_product SQ WHERE SQ.PRODUCT_KEY = VENDOR_KEY)


You could add another WHERE condition to check the xref_product table. Then you wouldn't need any JOINS to get the results.