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
 Development Tools
 Reporting Services Development
 SQL Reporting services, Concatenating multiple rows to CSV

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-11-13 : 07:56:52
bobby writes "hello sql team,
i need to generate a report, am using 8 tables and Joins for that. now in the resultant report i don't want the duplicate values to be displayed. and in one row named "referenceActivities" in my report i should display the values in a csv format.
There is an option Hide Duplicates in the SQL reporting services but that just hides the row data, the rows are being displayed but with out data...so there is a lot of gap between one data and another data ... what do i do ?
please help me out.

I'm pasting my query.here under.


SELECT NominateRequest.SubmittedOn AS [DATE SUBMITTED],
NominateStatus.Status AS STATUS,
Account.Name AS ACCOUNT,
ContactInfo.Title AS CONTACT,
PartnerInfo.CompanyName AS Partner,
Product.Name AS PRODUCTS,
Users.UserName AS SUBMITTER,
Users.Email AS [SUBMITTER EMAIL],
Users.TelephoneNumber AS [SUBMITTER PHONE],
ListValue.TextValue AS [REFERENCE ACTIVITIES],
ReferenceProfile.Name AS REFERENCE

FROM NominateRequest
LEFT OUTER JOIN NominateStatus ON NominateRequest.StatusID = NominateStatus.StatusID
LEFT OUTER JOIN Account ON NominateRequest.AccountID = Account.AccountID
LEFT OUTER JOIN ContactInfo ON NominateRequest.ContactID = ContactInfo.ContactInfoID
LEFT OUTER JOIN PartnerInfo ON NominateRequest.PartnerID = PartnerInfo.PartnerID
LEFT OUTER JOIN Product ON NominateRequest.ProductID = Product.ProductID
LEFT OUTER JOIN Users ON NominateRequest.SubmittedBy = Users.UserID
LEFT OUTER JOIN NominateReference ON NominateRequest.NominateID = NominateReference.NominateID
LEFT OUTER JOIN ReferenceProfile ON NominateReference.ReferenceID = ReferenceProfile.ProfileID
INNER JOIN CustomField on CustomField.FieldID = CustomField.FieldID
LEFT OUTER JOIN ListCustomField ON ListCustomField.BaseFieldID=CustomField.FieldID
INNER JOIN ListValues ON ListCustomField.FieldID = ListValues.FieldID
INNER JOIN ListValue ON ListValues.ValueID = ListValue.ValueID


Thank you,"

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-14 : 03:44:56
Have you tried "SELECT DISTINCT ..."?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -