Drill Throughs not accepting left Joins SQL- but accept where joins
Posted: Tue Feb 27, 2024 12:31 am
Hi
Issue: TM1 Drill through SQL does not allow me to write "left joins" to a relational database. (there are other inconsistencies but left join is easiest to use as an example) But TM1 does allow me to Join in the where clause.
Example : Per the below both queries work in SSMS. But only the first one works as a drill through in TM1. (with very limited error log "Unable to fetch data")
Request: Can anyone advise why this is happening and if I can fix it? (as I would like to use the second one to keep consistent coding methodology across platforms) Is there documentation I can follow (its not only "left joins" there are other inconsistencies that are hard to diagnose with TM1's standard error messages)
''#########THIS Code works when I write the join in the where clause
SELECT TOP (10)
[fact_gl_transaction].[job_code]
,[dim_supplier].[gtgetdisplaycaption]
FROM [DW].[dbo].[fact_gl_transaction], [CompassDW].[dbo].[dim_supplier]
where
[fact_gl_transaction].[dim_Supplier_key] = [dim_supplier].[dim_supplier_key]
''#########THIS Code does not work in TM1 when using left joins (but works fine in SSMS)
SELECT TOP (10)
[fact_gl_transaction].[job_code]
,[dim_supplier].[gtgetdisplaycaption]
FROM [DW].[dbo].[fact_gl_transaction]
left JOIN [dim_supplier] ON
[fact_gl_transaction].[dim_Supplier_key] = [dim_supplier].[dim_supplier_key]
Issue: TM1 Drill through SQL does not allow me to write "left joins" to a relational database. (there are other inconsistencies but left join is easiest to use as an example) But TM1 does allow me to Join in the where clause.
Example : Per the below both queries work in SSMS. But only the first one works as a drill through in TM1. (with very limited error log "Unable to fetch data")
Request: Can anyone advise why this is happening and if I can fix it? (as I would like to use the second one to keep consistent coding methodology across platforms) Is there documentation I can follow (its not only "left joins" there are other inconsistencies that are hard to diagnose with TM1's standard error messages)
''#########THIS Code works when I write the join in the where clause
SELECT TOP (10)
[fact_gl_transaction].[job_code]
,[dim_supplier].[gtgetdisplaycaption]
FROM [DW].[dbo].[fact_gl_transaction], [CompassDW].[dbo].[dim_supplier]
where
[fact_gl_transaction].[dim_Supplier_key] = [dim_supplier].[dim_supplier_key]
''#########THIS Code does not work in TM1 when using left joins (but works fine in SSMS)
SELECT TOP (10)
[fact_gl_transaction].[job_code]
,[dim_supplier].[gtgetdisplaycaption]
FROM [DW].[dbo].[fact_gl_transaction]
left JOIN [dim_supplier] ON
[fact_gl_transaction].[dim_Supplier_key] = [dim_supplier].[dim_supplier_key]