Ramco Ramco

Ramco Ramco

  • 419
  • 3.4k
  • 528.1k

Color a particular column on basis of condition

Aug 14 2023 9:45 AM

hi

  I have below query . I want to highlight a particular column. Is it pssoble

(SELECT 'A/C Bal.' 'Type',cast(getdate() as date) [Posting Date],'' [Document No],'' [Voucher No.],'' Line_ID,'ABC Bank Ltd' + ' ' +'('+' '+'Closing Bal.'+' '+'='+' '+cast(cast(ISNULL(SUM(S.Debit)-SUM(s.Credit),0.00) +(select sum(debit)-sum(Credit) from jdt1 where jdt1.refdate<cast(DATEADD(day, DATEDIFF(day, 0, GETDATE()), 0) as date) ) as numeric(19,2)) as nvarchar(max))+')' 'Particulars',null [Debit(LC)]

,null[Credit(LC)],null [Debit(FC)]

,null[Credit(FC)]

FROM JDT1 S left join oact d on d.AcctCode=s.ShortName

WHERE S.RefDate=cast(DATEADD(day, DATEDIFF(day, 0, GETDATE()), 0) as date) )

Thanks


Answers (2)