Displayed below is a portion of the sql that is used in Sql Server 2005 to extract data from a Sql Server database.
Upon running the query, the results are not formatted with any decimal points or commas...
What modifications are needed so that the query results are formatted with a comma at the thousands place and there
only 2 digits after the decimal point?
Upon running the query, the results are not formatted with any decimal points or commas...
What modifications are needed so that the query results are formatted with a comma at the thousands place and there
only 2 digits after the decimal point?
Code:
,SUM (BT.PROCESS_ALLOC_CHRG_AMT)AS ALLOC_CHRG
,SUM (BT.PROCESS_ALLOC_PAID_AMT) AS ALLOC_PD
,SUM (BT.PROCESS_CHRG_AMT) AS CHARGES
,SUM (BT.PROCESS_PAID_AMT) AS PAID
,SUM (BT.PROCESS_DAY_CNT) AS DAYS
,SUM (BT.PROCESS_ENCOUNTER_CNT) AS ADMITS
,CASE WHEN SUM(BT.PROCESS_ALLOC_CHRG_AMT) =0 OR SUM(BT.PROCESS_ENCOUNTER_CNT) = 0 THEN 0 ELSE SUM(BT.PROCESS_ALLOC_CHRG_AMT)/SUM(BT.PROCESS_ENCOUNTER_CNT) END ChgPerAdmit
,CASE WHEN SUM (BT.PROCESS_ALLOC_PAID_AMT) =0 OR SUM(BT.PROCESS_ENCOUNTER_CNT) = 0 THEN 0 ELSE SUM (BT.PROCESS_ALLOC_PAID_AMT)/SUM (BT.PROCESS_ENCOUNTER_CNT) END PaidPerAdmit
,CASE WHEN SUM(BT.PROCESS_DAY_CNT) =0 OR SUM(BT.PROCESS_ENCOUNTER_CNT) = 0 THEN 0 ELSE SUM (BT.PROCESS_DAY_CNT)/SUM (BT.PROCESS_ENCOUNTER_CNT) END ALOS
,CASE WHEN SUM (BT.PROCESS_ALLOC_CHRG_AMT) =0 OR SUM(BT.PROCESS_DAY_CNT) = 0 THEN 0 ELSE SUM (BT.PROCESS_ALLOC_CHRG_AMT)/SUM (BT.PROCESS_DAY_CNT) END AllocChrgPerDay
,CASE WHEN SUM (BT.PROCESS_ALLOC_PAID_AMT) =0 OR SUM(BT.PROCESS_DAY_CNT) = 0 THEN 0 ELSE SUM (BT.PROCESS_ALLOC_PAID_AMT)/SUM (BT.PROCESS_DAY_CNT) END AllocPaidPerDay
,CASE WHEN SUM (BT.PROCESS_ALLOC_PAID_AMT) =0 OR SUM (BT.PROCESS_ALLOC_CHRG_AMT) = 0 THEN 0 ELSE SUM (BT.PROCESS_ALLOC_PAID_AMT)/SUM (BT.PROCESS_ALLOC_CHRG_AMT) END PaidPercentage