Start Free Trial
Come for the solution, stay for everything else.
Start Free Trial
MS query to obtain a single row of data with multile rows
I would like to find out how can I modify my query to change the way my query result displays.
Here is my query:
SELECT product_id, warehouse_loc
ORDER BY product_id
My display result will look like this:
Is there a way that I can modify my result to look like this:
Microsoft SQL Server 2008
8/22/2022 - Mon
Not without a fair amount of pain. It is the opinion of most developers that cosmetics like this are better served in whatever reporting application you are using as opposed to in T-SQL, as doing it that way in a set would hose up grouping/sorting.
For example, in SQL Server Reporting Services (SSRS) in the textbox for the product_id column the HideDuplicates property can be set to True, which would blank out all 'duplicates' beyond the first row.
ASKER CERTIFIED SOLUTION
Log in or sign up to see answer
Become an EE member today
7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Do you want 3 rows with blank in 2 and 3rd row for first column?
Jim Dettman (EE MVE)
<<For example, in SSIS in the textbox for the product_id column the HideDuplicates property can be set to True, which would blank out all 'duplicates' beyond the first row.>>
Same is true in the Access report writer, but not in a query.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
typo correction, in my original comment I had SS
S instead of SQL Server Reporting Services (SS
Plans and Pricing
Certified Expert Program
© 1996-2023 Experts Exchange, LLC. All rights reserved. Covered by US Patent