In TDP 5.0 when I modify a query and select 'Visualize the Statement in Query Tab", the SQL statement refreshes and there are spaces in between the table alias and column names near the end of the SQL statement (see below). For example, the column "AL1.PROJ_ID" is displayed as "AL1 . PROJ_ID" in the GROUP BY section (extra spaces before and after the "." delimiter).
SELECT AL1.INVT_ABBRV_CD,
SUBSTRING (AL1.INVT_ABBRV_CD, 4, 3)
AS INV_TYPE,
AL1.PROJ_ID,
AL1.PART_KEY,
AL1.PART_ID,
AL4.ITEM_DESC,
AL1.INVT_DT,
AL5.S_MAKE_BUY_CD,
AL1.PART_RVSN_ID,
MAX (AL2.RECPT_DT)
AS RECEPT_DT,
ISNULL (MAX (AL2.RECPT_DT), AL1.LAST_RECPT_DT)
AS RECPT_DT_CALC,
AL1.LAST_ISS_DT,
AL1.LAST_RECPT_DT,
AL1.LAST_ADJ_DT,
AL1.YTD_USAGE_QTY,
AL1.LAST_YR_USAGE_QTY,
AL1.INCEPT_TO_DT_QTY,
AL5.S_STATUS_TYPE,
AL1.ON_HAND_QTY,
AL1.ON_HAND_QTY * (AL1.MATL_CST_AMT + AL1.SUBCT_CST_AMT)
AS ON_HAND_EXT_AMT,
AL1.ON_ORD_QTY,
AL1.RES_QTY,
AL1.ON_RQ_QTY,
AL1.IN_INSP_QTY,
AL1.IN_MRB_QTY,
AL1.ON_HOLD_QTY,
AL1.ON_HOLD_QTY * (AL1.MATL_CST_AMT + AL1.SUBCT_CST_AMT)
AS ON_HOLD_EXT_AMT,
AL1.IN_SHIP_QTY,
AL1.MODIFIED_BY,
AL1.TIME_STAMP,
AL1.COMPANY_ID,
AL1.OWED_QTY,
AL1.MATL_CST_AMT,
AL1.LAB_CST_AMT,
AL1.SUBCT_CST_AMT,
AL1.MISC1_CST_AMT,
AL1.MISC2_CST_AMT,
AL1.MATL_BURD_CST_AMT,
AL1.LAB_BURD_CST_AMT,
AL1.SUBCT_BURD_CST_AMT,
AL1.MISC1_BURD_CST_AMT,
AL1.MISC2_BURD_CST_AMT,
AL1.PLND_RES_QTY,
AL1.PLND_OWED_QTY,
AL1.EXPDT_TX,
AL1.AVG_LABOR_HRS,
AL1.AVG_SUBCT_HRS,
AL1.ROWVERSION
FROM DELTEKCP.DELTEK.PART AL5
CROSS JOIN
(
( (DELTEKCP.DELTEK.RECPT_LN AL3
CROSS JOIN DELTEKCP.DELTEK.RECPT_HDR AL2 ON ( AL3 . RECPT_KEY = AL2 . RECPT_KEY))
RIGHT OUTER JOIN DELTEKCP.dbo.INVT_HIST AL1
ON (AL1.PART_KEY = AL3.ITEM_KEY))
LEFT OUTER JOIN DELTEKCP.DELTEK.ITEM AL4
ON (AL1.PART_KEY = AL4.ITEM_KEY)
AND (AL1.PART_ID = AL4.ITEM_ID)
AND (AL1.PART_RVSN_ID = AL4.ITEM_RVSN_ID) )
LEFT OUTER JOIN
DELTEKCP . dbo . INVT_WHSE_LOC_HIST AL6
ON ( AL1 . INVT_ABBRV_CD = AL6 . INVT_ABBRV_CD ) AND ( AL1 . PART_KEY = AL6 . PART_KEY )
WHERE ( ( ( ( AL1 . PART_KEY = AL5 . PART_KEY AND AL1 . INVT_DT = AL6 . INVT_DT ) AND ( AL1 . ON_HAND_QTY <> 0 OR AL1 . ON_HOLD_QTY <> 0 ) ) AND AL1 . INVT_DT = :INVT_DT ) AND SUBSTRING ( AL1 . INVT_ABBRV_CD , 4 , 3 ) <> 'GFE'
)
GROUP BY AL1 . INVT_ABBRV_CD
, SUBSTRING ( AL1 . INVT_ABBRV_CD , 4 , 3 )
, AL1 . PROJ_ID
, AL1 . PART_KEY
, AL1 . PART_ID
, AL4 . ITEM_DESC
, AL1 . INVT_DT
, AL5 . S_MAKE_BUY_CD
, AL1 . PART_RVSN_ID
, AL1 . LAST_ISS_DT
, AL1 . LAST_RECPT_DT
, AL1 . LAST_ADJ_DT
, AL1 . YTD_USAGE_QTY
, AL1 . LAST_YR_USAGE_QTY
, AL1 . INCEPT_TO_DT_QTY
, AL5 . S_STATUS_TYPE
, AL1 . ON_HAND_QTY
, AL1 . ON_ORD_QTY
, AL1 . RES_QTY
, AL1 . ON_RQ_QTY
, AL1 . IN_INSP_QTY
, AL1 . IN_MRB_QTY
, AL1 . ON_HOLD_QTY
, AL1 . IN_SHIP_QTY
, AL1 . MODIFIED_BY
, AL1 . TIME_STAMP
, AL1 . COMPANY_ID
, AL1 . OWED_QTY
, AL1 . MATL_CST_AMT
, AL1 . LAB_CST_AMT
, AL1 . SUBCT_CST_AMT
, AL1 . MISC1_CST_AMT
, AL1 . MISC2_CST_AMT
, AL1 . MATL_BURD_CST_AMT
, AL1 . LAB_BURD_CST_AMT
, AL1 . SUBCT_BURD_CST_AMT
, AL1 . MISC1_BURD_CST_AMT
, AL1 . MISC2_BURD_CST_AMT
, AL1 . PLND_RES_QTY
, AL1 . PLND_OWED_QTY
, AL1 . EXPDT_TX
, AL1 . AVG_LABOR_HRS
, AL1 . AVG_SUBCT_HRS
, AL1 . ROWVERSION