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
 General SQL Server Forums
 New to SQL Server Programming
 Multiple field result in a single row or Column

Author  Topic 

roseline43
Starting Member

1 Post

Posted - 2009-10-07 : 14:53:11
We are scanning tiff from different newspapar and put them on DVDs.
I have a problem formating the ouput of my query.

My Query

select
"DOSSIER"."ID" as "DOSSIERID",
"DOSSIER"."TITLE" as "TITLE",
"DVD"."ID" as "DVDID",
"DVD"."NAME" as "DVDNAME",
"DVD"."ID_DOSSIER" as "DVD_ID_DOSSIER",
"ELEMENTS"."ID" as "ELEMENTSID",
"ELEMENTS"."NAME" as "ELEMENTSNAME",
"ELEMENTS"."ID_DVD" as "ELEMENTS_ID_DVD"
from "DOSSIER" "DOSSIER",
"DVD" "DVD",
"ELEMENTS" "ELEMENTS"
where "DVD"."ID_DOSSIER"="DOSSIER"."ID"
and "ELEMENTS"."ID_DVD"="DVD"."ID"
and "DOSSIER"."TITLE" = 'FIGARO'


And I have this result

FIGARO C2008-203 12l10201.tif
FIGARO C2008-203 12l10202.tif
FIGARO C2008-203 12l11101.tif
FIGARO C2008-203 12l11102.tif
FIGARO C2008-203 12l11201.tif
FIGARO C2008-203 12l11202.tif
FIGARO C2008-203 12l12101.tif
FIGARO C2008-203 12l12102.tif
FIGARO C2008-204 12l12202.tif
FIGARO C2008-204 12l13101.tif
FIGARO C2008-204 12l13102.tif
FIGARO C2008-204 12l13201.tif
FIGARO C2008-204 12l13202.tif
FIGARO C2008-204 12l14101.tif
FIGARO C2008-204 12l14102.tif
FIGARO C2008-204 12l14201.tif
FIGARO C2008-204 12l14202.tif
FIGARO C2008-204 12l15101.tif
FIGARO C2008-204 12l15102.tif
FIGARO C2008-204 12l15201.tif


Is there a way that I can have a result like this? ( the tiff separated in columns)

FIGARO C2008-203
12l10201.tif 12l10202.tif 12l11101.tif
12l11102.tif 12l11201.tif 12l11202.tif
12l12101.tif 12l12102.tif 12l12202.tif
12l13101.tif 12l13102.tif 12l13201.tif
12l13202.tif 12l14101.tif 12l14102.tif
12l14201.tif 12l14202.tif 12l15101.tif
12l15102.tif 12l15201.tif

FIGARO C2008-204
12l15202.tif 12l16101.tif 12l16102.tif
12l16201.tif 12l16202.tif 12m01101.tif
12m01102.tif


DO I need to wrinte a function??

thanks


Roseline

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-10-07 : 16:19:55
This needs to be handled in the frontend application and not in SQL Server. Formatting is a presentation issue and therefore not suitable for T-SQL.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -