Viewing 15 posts - 181 through 195 (of 240 total)
You need to use GROUP BY and CASE. But in your example Id is unique, so you not going to get any aggregation.
Something like this:
SELECT
Id
,TotalCost...
August 11, 2012 at 10:33 pm
This is called PIVOT or CROSS TAB[/url] query.
August 11, 2012 at 10:05 pm
Jeff Moden (8/11/2012)
August 11, 2012 at 9:30 pm
Pick your one item from box labeled [N and Q]. Let's say you pull nickel. So, this is [N] box. Swap labels with box that have [N] label. Then swap...
August 11, 2012 at 9:08 pm
Did you try to set property Hidden = True?
August 11, 2012 at 2:14 am
Table is probably bound to dataset that doesn't have that field you refer to in text box.
August 11, 2012 at 2:10 am
Check this article:
http://www.simple-talk.com/sql/t-sql-programming/concatenating-row-values-in-transact-sql/
August 11, 2012 at 1:52 am
The dynamic SQL will probably be the best. See Gail's blog:
http://sqlinthewild.co.za/index.php/2009/03/19/catch-all-queries/
August 11, 2012 at 1:26 am
Jeff Moden (8/10/2012)
The loop and the resulting multiple updates can be avoided. Please see the following article.
Thank you, Jeff, great article.
OK, there is another way, without loop and ALTER/UPDATE.
CREATE...
August 10, 2012 at 11:14 pm
I can do it for given dataset but generally speaking how would you know which TextA should be paired with which TextB? I do it simply by including [Text] in...
August 10, 2012 at 2:58 pm
Just a few gueses/ideas:
When you run it in VS it probably renders on your local machine. Deployed report rendered on server. If i'm not mistaken SSRS service runs outside of...
August 10, 2012 at 2:24 pm
Combination of File + Main + Sub should be unique. Is that so?
August 10, 2012 at 1:12 pm
Exactly!
If sample you provided doesn't accurately reflect you actual situation then you need to provide a better sample.
People will be more willing to help if you include CREATE TABLE and...
August 10, 2012 at 12:12 pm
If it fixed number of columns classic cross tab should work:
CREATE TABLE #Temp([File] INT, Main INT, Sub CHAR(2), [Text] VARCHAR(20));
INSERT INTO #Temp ([File], Main, Sub, [Text])
VALUES (1,...
August 10, 2012 at 11:38 am
Viewing 15 posts - 181 through 195 (of 240 total)