Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Replacing text with images

Author  Topic 

pee2002
Starting Member

16 Posts

Posted - 2009-07-25 : 10:03:58
Hi there!

In my Library project i want to replace some text with images.

I have this:


Wich is generated by the following code:
SELECT IDLivro,Titulo
,LEFT(Nome, LEN(Nome) - 2) AS Nome
,LEFT(Categoria, LEN(Categoria) - 2) AS Categoria
,Posicao
,Classificacao
,Comentario

FROM
(
SELECT L.Titulo
,(
SELECT A.Nome + ' ; ' AS "text()"
FROM dbo.Autor A
JOIN dbo.LivroAutor LA
ON A.IDAutor = LA.IDAutor
WHERE LA.IDLivro = L.IDLivro
ORDER BY A.Nome DESC
FOR XML PATH('')
) AS Nome
,(
SELECT C.Categoria + ' ; ' AS "text()"
FROM dbo.Categoria C
JOIN dbo.LivroCategoria LC
ON C.IDCategoria = LC.IDCategoria
WHERE LC.IDLivro = L.IDLivro
ORDER BY C.Categoria DESC
FOR XML PATH('')
) AS Categoria
,L.Posicao
,L.Classificacao
,L.IDLivro
,L.Comentario
FROM dbo.Livro L
) D


And my goal is to have this: (Generated my PAINT lol)


Anyone can help me please?

Thanks

pee2002
Starting Member

16 Posts

Posted - 2009-07-25 : 12:30:58
Problem Solved!

Its in your application (not SQL) that you manage this.

In my case (i´m using C#) i used the CellFormatting event of the dataGridView to solve this.

Thanks
Go to Top of Page
   

- Advertisement -