Viewing 15 posts - 556 through 570 (of 3,543 total)
sm_iransoftware (2/17/2015)
Thank you allAnd
Thank you David Burrows
I didnot Know Row_Number() Befor this.
Actually ROW_NUMBER was introduced with 2005, you might want to check out the other windowing functions as well, 2014...
February 17, 2015 at 1:26 am
Using row number
SELECT ProductId,ProductConfigId,Amount AS [MinPrice],HasGift
FROM (SELECT p.ID AS [ProductId],c.ID AS [ProductConfigId],a.Amount,c.HasGift,
ROW_NUMBER() OVER (PARTITION BY p.ID ORDER BY a.Amount ASC) AS [RowNum]
FROM dbo.TBL_Product p
JOIN dbo.TBL_ProductConfig c ON c.ProductId = p.ID
JOIN...
February 16, 2015 at 7:20 am
CREATE TABLE dbo.Person (PersonID int,FirstName varchar(20),LastName varchar(20))
CREATE TABLE dbo.Relation (RelationID int,BossID int,SlaveID int)
INSERT dbo.Person VALUES (1,'Bob','Patel'),(2,'Lun','Smith'),(3,'Julie','Taylor'),(4,'Chris','Pain'),(5,'Joe','Bloggs')
INSERT dbo.Relation VALUES (1234,1,3),(321,3,3),(231,1,5)
SELECT p.PersonID,p.FirstName,p.LastName,
STUFF((SELECT ',' + Name
FROM (SELECT DISTINCT s.FirstName + ' ' +...
February 16, 2015 at 7:02 am
Just for fun 😀
SELECT ISNULL(Category,'Total') AS [Category],SUM(Column1) AS [Total]
FROM MyTable
GROUP BY Category
WITH ROLLUP
HAVING Category IS NULL OR Category IN ('Category1','Category2','Category3','Category4')
ORDER BY GROUPING(Category) ASC,Category ASC
February 11, 2015 at 2:11 am
Hint: Use CASE statement for Category and use it in GROUP BY
February 10, 2015 at 10:27 am
Ooops my bad, I was testing using Value
Why are you using UniqueName, is the report using a cube?
If you put the expression Nazwa pomiaru.UniqueName in another textbox do you get...
February 5, 2015 at 1:49 am
I'm on SQL2008R2 and it work for me
What version are you on?
February 4, 2015 at 8:41 am
OK but like I said it stops inserting before the first record and I presume it's to do with the characters in the field of the first row.
But we cannot...
February 3, 2015 at 10:18 am
Check the XML for hidden characters as this would stop the implicit decimal conversion
February 3, 2015 at 7:46 am
Try
Switch(Fields!Nazwa_pomiaru.UniqueName = "regulacji", "IRSRZGD", Fields!Nazwa_pomiaru.UniqueName = "tryb", "IRSRZGD", True, Nothing)
although I think this will work as well
IIf(Fields!Nazwa_pomiaru.UniqueName = "regulacji" OR Fields!Nazwa_pomiaru.UniqueName = "tryb", "IRSRZGD", Nothing)
February 3, 2015 at 6:25 am
Sum(IIf(DateDiff(DateInterval.Day,Fields!SubmittedDate.Value,Today)>=31 AND DateDiff(DateInterval.Day,Fields!SubmittedDate.Value,Today)<=60,1,0))
February 3, 2015 at 1:43 am
Jeff Moden (1/31/2015)
February 2, 2015 at 6:50 am
Brian Hibbert (2/1/2015)
February 2, 2015 at 6:33 am
Try
=Sum(IIf(DateDiff(DateInterval.Day,Fields!SubmittedDate.Value,Today)<=30,1,0))
February 2, 2015 at 3:53 am
Viewing 15 posts - 556 through 570 (of 3,543 total)