SSAS

Stairway to MDX

Stairway to MDX - Level 12: : MDX Time/Date Series Functions: OpeningPeriod() and ClosingPeriod() Functions

  • Stairway Step

BI Architect Bill Pearson continues with the second of a set of articles surrounding a group of MDX functions specialized to support the analysis of data within the context of time / date. In this article, we will explore the OpeningPeriod() and ClosingPeriod() functions, and get hands-on practice with each in meeting sample business requirements.

2015-07-22

4,415 reads

Stairway to MDX

Stairway to MDX - Level 11: MDX Time/Date Series Functions: PeriodsToDate() and Derivative Shortcut Functions

  • Stairway Step

BI Architect Bill Pearson launches a set of articles surrounding a group of MDX functions specialized to meet the pervasive business need to analyze data within the context of time / date. In this article, we will overview the PeriodsToDate() function, and then we will introduce "shortcut" functions that are based upon it.

2015-06-17

8,732 reads

Technical Article

RE: Is This possible to do ?

  • Reply

Well I finally got it to work with the help of a co-worker...here is the code  previous_discharge_date  = (SELECT MAX(ISNULL(referral_ref.dischargedate, '')) as previous_discharge_date     FROM      referral as referral_ref     WHERE      referral_ref.dischargedate  <>'2078-12-31 00:00:00'      AND referral.memid   = referral_ref.memid), I was making it way more complex than it needed to be... Thanks to everyone for the help Leeland

2005-04-22

Technical Article

RE: Making a copy of a sql table within same DB

  • Reply

Are you actually dropping the original table? In the "Select into" you get all the data. As long as you don't drop the original table, if you want to back off the the import, you would just do: TRUNCATE TABLE TableName GO INSERT INTO TableName SELECT * FROM NewTableName GO The indexes, keys etc. should […]

2005-04-11

Technical Article

locking?

  • Topic

I need to delete millions of rows from a table older than x days. I broke this up into smaller delete batches like the following.SET ROWCOUNT 1000 WHILE 1 = 1 BEGIN    delete from events         where datediff(day, EVENT_DATE, getdate()) > 10    IF @@ROWCOUNT = 0         BREAKENDSET ROWCOUNT 0Would this lock the table at […]

2005-04-11

7 reads

Blogs

What Do I Do to Relax?

By

I’ve republished an editorial today from another author, called What do you do to...

Daily Coping 9 Dec 2022

By

Today’s coping tip is to find out something new about someone you care about....

Advent of Code 2022

By

Foreword Advent of Code is an annual event in which participants solve a series of...

Read the latest Blogs

Forums

SSRS - Add end date for all SSRS subscriptions

By pwalter83

Hi, Could you please advice if it is possible to add an end date...

COLLATE Errors

By saintor1

I have been using this for a long time.   It was done initially in...

blank page

By carjara

Hi guys! The topic "Connect to SQL Server with Python to Create Tables, Insert...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers

Question of the Day

The Temp Alias

See possible answers