Viewing 15 posts - 3,151 through 3,165 (of 3,475 total)
Can you use SSRS, or are you doing this in a query only?
January 24, 2014 at 7:16 pm
Just wondering, but can you force the queries to run in a single transaction, so they all execute and then the report is rendered? (Sorry to hijack the post...
January 24, 2014 at 9:31 am
Maybe a naive question, but why most if not all of the grouping in SSRS? Then you can drill up and down in your report. So you would...
January 23, 2014 at 9:55 pm
Is that your intended input or output? Either way, in order to help you, please post both. I created a dummy query for the data you provided:
SELECT ...
January 23, 2014 at 2:32 pm
You need a tutorial on basic queries. Most of these are trivial - like the last answer I posted.
If you tested your code, you would know that it wouldn't...
January 22, 2014 at 7:04 am
One way...
CTE??? Isn't that overkill?
create table #tab
(
ref_group varchar(15),
product varchar(10),
qty tinyint
);
insert into #tab(ref_group,product,qty)
values ('Milk Products','Curd',25);
insert into #tab(ref_group,product,qty)
values ('Milk Products','Butter',5);
SELECT ref_group
, product
, qty
FROM #tab t1
WHERE t1.qty = (SELECT MIN(qty)
FROM #tab);
January 21, 2014 at 11:50 pm
Can't you just set the parameter to be multi-valued in the report? Then you can use JOIN() to get the items in the list into a single string...
Or did...
January 21, 2014 at 9:05 pm
Okay. I could get the name of the column outside of the code, but not inside. I'll give it another try and see if I can get closer....
January 21, 2014 at 5:43 pm
Dwain,
cool code! I'll have to dig in and figure out how it works. One thing is missing though... the Symptom name disappeared. The final output should look...
January 21, 2014 at 12:29 pm
Dwain,
cool code! I'll have to dig in and figure out how it works. One thing is missing though... the Symptom name disappeared. The final output should look...
January 21, 2014 at 12:12 pm
"There are multiple categories for each product."
That's unusual. Could you give an example? Normally, you have a category hierarchy (Category, Subcategory...)
January 20, 2014 at 11:38 pm
http://www.manning.com/nielsen/SampleChapter5.pdf
From SQL Server Deep Dives. I think I need to buy this book... <g>
There is also this article...
http://sqlmag.com/sql-server-2012/solving-gaps-and-islands-enhanced-window-functions
using LAG/LEAD. definitely worth a read!
January 20, 2014 at 2:40 pm
I would probably look for an article by Itzik Ben-Gan on it... being that he's a lot smarter than I am.
January 20, 2014 at 2:12 pm
Looks like a running total... if you're using 2012, this works:
sample data setup:
-- create table in tempdb (yes, it probably should have a PK)
CREATE TABLE #pMovement(
pDate DATE,
pallet int,
qty int
);
GO
--...
January 19, 2014 at 8:47 pm
Viewing 15 posts - 3,151 through 3,165 (of 3,475 total)