Viewing 15 posts - 2,386 through 2,400 (of 3,489 total)
You can use something like this:
Note: DummyMVParam is a multi-value parameter in my report.
so this is what my test is doing:
If there are less than 4 values selected from the...
July 31, 2015 at 5:54 pm
without sample data, it's hard to tell, but my guess is that you're missing a WHERE clause...
SELECT PartNumber, SerialNumber, MAX(InspectionDate) AS LastInspection
FROM MyTable
WHERE PartNumber IS NOT NULL
GROUP BY PartNumber, SerialNumber
ORDER...
July 30, 2015 at 6:32 pm
like falling down...
SELECT PartNumber, SerialNumber, MAX(InspectionDate) AS LastInspection
FROM MyTable
GROUP BY PartNumber, SerialNumber
ORDER BY PartNumber, SerialNumber;
July 30, 2015 at 5:55 pm
Okay, so humor everybody...
post the entire stored procedure... pin the tail on the donkey isn't our favorite game.
July 30, 2015 at 12:19 pm
something like this:
SELECT test.Manager, test.Device, split.ItemNumber, Item = RTRIM(split.Item)
FROM #tbl_data test
CROSS APPLY dbo.DelimitedSplit8k(test.Manager,',') split;
July 30, 2015 at 11:06 am
CTEs are no different than any other query in that respect. You can pass parameters to them exactly the way you would in any other stored procedure.
SELECT ...
FROM ...
WHERE field...
July 29, 2015 at 6:31 pm
I left the balance part out because it's (sort of) a derived column. You could use a windowing function to do a running total to get it. Just...
July 26, 2015 at 6:45 pm
I did the CREATE TABLE and INSERT part...
CREATE TABLE accounts(
AcctID INT,
TranSeq INT,
TranDate DATE,
Amount MONEY
CONSTRAINT pkAccounts PRIMARY KEY (AcctID,TranSeq));
GO
INSERT INTO accounts(AcctID, TranSeq,tranDate,Amount)
VALUES (1, 1,'04/03/2014',223.00),
(1,2,'04/03/2014',129.00),
(1,3,'07/08/2014',-90.00),
(1,4,'07/08/2014',-73.00),
(1,5,'07/08/2014',-129.00),
(1,6,'08/07/2014',-58.80),
(1,7,'08/07/2014',-69.09),
(1,8,'11/26/2014',67.89),
(1,9,'12/30/2014',-67.89),
(1,10,'12/31/2014',-67.89),
(1,11,'05/29/2015',-67.89);
Was about to...
July 26, 2015 at 6:06 pm
Sorry but "doesn't seem to work" doesn't explain much. Please read this article this article[/url] and post the table definition, some sample data (not real data, just representative is...
July 23, 2015 at 5:33 pm
July 23, 2015 at 2:36 pm
I fixed up your create table/insert scripts. No Semi-colons?
use tempdb;
go
Create table EMP
(ID INT,
NAME NVARCHAR(10)
);
GO
insert into EMP values (1, 'JOHN')
create table EMP_INFO
(ID INT,
STARTDATE DATE,
ENDDATE DATE);
GO
insert into EMP_INFO values
(1,...
July 23, 2015 at 1:35 pm
Maybe start here:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
The data you posted explains your table structures, but it's not usable.
July 23, 2015 at 9:23 am
Steps to get this to work... (seems I always say that!)
1. Create your stored procedure...
ALTER PROC [dbo].[ReferralsData]
AS
SELECT ReferralID,
RefDate,
CASE RefType WHEN 1 THEN 'Internal' ELSE 'External' END ReferralType
FROM Referral;
Note that there...
July 22, 2015 at 3:07 pm
Sorry for the vague response, but I think I remember seeing this in Teo Lachev's SSRS book on SSRS 2008. You can basically build an expression for the datasource...
July 22, 2015 at 1:49 pm
one way to do it is to remove the Active=@Active parameter from your stored procedure and put it in your report as a filter. You can create a parameter,...
July 22, 2015 at 1:43 pm
Viewing 15 posts - 2,386 through 2,400 (of 3,489 total)