Viewing 15 posts - 1,891 through 1,905 (of 3,507 total)
Can't you do a simple
INSERT INTO DestinationTable(Col1, Col2, Col3...)
SELECT GrpBy1, GrpBy2, SUM(NumericField)
FROM SrcTable
GROUP BY GrpBy1, GrpBy2;
July 6, 2016 at 3:34 pm
TinDog,
If you haven't done so already, check out PragmaticWorks.com Brian Knight knows SSAS inside and out. There are a bunch of free tutorials on their website. I think...
July 6, 2016 at 12:26 pm
Read this article[/url]. Note the warning: "Downgrading to a lower edition cannot be done in place. This tip will describe the steps needed to downgrade."
If you can, install a copy...
July 6, 2016 at 10:32 am
Welcome to SSC!
Since you're new and haven't quite figured out how to ask a good question, please help us to help you by reading this article[/url] and following the instructions...
July 4, 2016 at 11:10 pm
If you create a table of dates for the MWF dates, then you can use ROWNUMBER() to assign a sequential value to each date... then you can find a gap...
July 1, 2016 at 5:47 pm
If you're using 2012 or later, you can use LAG.
SELECT ID
, FLAG
, LAG(DT, 1) OVER (PARTITION BY ID ORDER BY DT) AS EffectiveDate
, DT AS TermDate
FROM ##Test;
Note that I'm assuming...
July 1, 2016 at 12:05 am
I guess if you're forced to do something "clever" then you have to document your code inside the code... not in some "book" somewhere that nobody can find. (Yeah, I've...
June 30, 2016 at 2:48 pm
I have a task where we need to populate data from one table to another one.
What's wrong with the INSERT INTO without all the variables?
INSERT INTO DestTable(col1, col2, col3)
SELECT [DISTINCT]...
June 30, 2016 at 11:21 am
a tally or numbers table is perfect for this. Jeff Moden has a great article on it here[/url].
Basically, you join your table that has the quantity you want to...
June 29, 2016 at 1:58 pm
Maybe he wants to see how painfully slow they are?
June 29, 2016 at 12:49 pm
Full address is in a single field? That might cause you problems.
If you had zip code/postal code in its own field, you could add a trigger on the table's zip...
June 29, 2016 at 9:24 am
Could you please read this article[/url] and follow instructions for posting? It's just really hard to help without consumable data. (Don't worry, it's all explained in the article...
June 28, 2016 at 11:51 pm
I'm NOT an SSRS expert, and I wanted to read up on this because I was curious.... That said, I found some articles that you might find interesting/helpful:
June 28, 2016 at 9:27 pm
Do you understand how windowing functions work? Read up on the LAG function. It will explain it all.
June 28, 2016 at 3:31 pm
Like this is one way:
-- show number of days between successive visits
SELECT PatientID
,VisitID
,VisitNo
,VisitDate
,DATEDIFF(day,LAG(VisitDate,1) OVER (PARTITION BY PatientID ORDER BY VisitDate),VisitDate) AS Elapsed
FROM
(
SELECT 1 AS VisitID,1 AS PatientID,1 AS VisitNo,'12-Jan-2005' AS...
June 28, 2016 at 3:17 pm
Viewing 15 posts - 1,891 through 1,905 (of 3,507 total)