I already used this method, but now I have to use some colors depending on the values. So, I have the following information in a table:
Material | Q1 | Q2
------
How about something like this.
CREATE TABLE #tempo(
q1 INT, q2 INT, name VARCHAR(10)
)
INSERT INTO #tempo(q1,q2,name)VALUES(10,5,'low')
INSERT INTO #tempo(q1,q2,name)VALUES(10,10,'same')
INSERT INTO #tempo(q1,q2,name)VALUES(10,20,'high')
DECLARE @html varchar(MAX) = '
q1
q2
Compare
'
SELECT @html = @html + '' + convert(varchar(10), q1) + ' ' + convert(varchar(10), q2) + ' '
FROM #tempo
select @html = @html + '
'
select @html
DROP TABLE #tempo