First of all it's quite impossible to say how the query should be modified without the knowledge of the data structures and data you have. So every modification need to be verified.
However there are things to consider. Sub query optimization is just like with any query, you make sure that you have a fast access path to the data. If the amount of data the subquery is fetching is small then you should have proper indexes in place.
For example the
table could have an index containing fields:
This kind of index would perhaps help to fetch the relevant data in case the amount of data to fetch is small compared to the overall data in the table.
Similarly you should make sure that the table
has an index on column
and so on.
What comes to the query it probably won't execute since there's an extra comma in the end of the field list.
As said without knowing the data it's impossible to say what kind of modifications can be done but you could try modifying the main FROM clause from
FROM dbo.MFS_AR_COLLECTIVE_BILLING AS cb INNER JOIN
dbo.MFS_CUST_CUSTOMER AS cc ON cb.CUSTOMER_ID = cc.CUSTOMER_ID INNER JOIN
(SELECT CODE_DESCR, CODE_ID
WHERE (CODE_TYPE = 'APPROVAL_STATUS') AND (LANGUAGE_CODE = 'en-US')) AS CodeDesctTemp ON CodeDesctTemp.CODE_ID = cb.APPROVAL_STATUS
FROM dbo.MFS_AR_COLLECTIVE_BILLING AS cb
INNER JOIN dbo.MFS_CUST_CUSTOMER AS cc ON cb.CUSTOMER_ID = cc.CUSTOMER_ID
INNER JOIN dbo.MFS_UTIL_STC_CODE_DESCR CodeDesctTemp ON CodeDesctTemp.CODE_ID = cb.APPROVAL_STATUS
WHERE CodeDesctTemp.CODE_TYPE = 'APPROVAL_STATUS'
AND CodeDesctTemp.LANGUAGE_CODE = 'en-US'
That modification could help to remove some complexity from the query, again taken that I've interpreted the conditions correctly.