To implement certain complex requirements in terms of display, I have to write a custom Sql. The underlying database is Sql Serve 2008r. The following query is giving error whereas it runs fine on Sql and give the correct result.
Can any body guide me on that?
|L1.LedgerAccount, L1.SubLedger, L1.[ LedgerAccountDescription ],|
|L2.LedgerAccount, L2.SubLedger, L2.[ LedgerAccountDescription ]|
|From||COA L1 ,COA L2|
|Where||cast(L1.LedgerAccount as varchar(20))+'0' = LEFT(cast(L2.LedgerAccount as varchar(20)),2)|
|And||L1.SubLedger IN (80)|
|And||L2.SubLedger IN (70)|
After posting the issue I searched the online help found the following one on the custom Sql.
Is there any workaround to achieve what I asked for?