Note: There is an updated version of this article, which applies to the next generation of TimeXtender.
Attached to this post you will find some SQL snippets for use in TimeXtender.
Please note that they are provided as-is and with no guarantee that they will receive updates or work in all future versions of the software.
SQL snippets are small pieces of SQL code that can be used throughout your project to speed up development. Below are some examples of what SQL snippets can be used for.
- Field level transformations
- Views
- Stored procedures
- User Defined functions
- Script actions
Please be aware that it is the content of the individual SQL snippet that determines its suitable usage.
In the attached XML file you will find the following snippets:
Data and Time:
- Current date - First date of future year
- Current date - First date of last year
- Current date - First date of month
- Current date - First date of previous year
- Current date - First date of year
- Current date - Last date of month
- DateDiff (variable end date)
- DateDiff (fixed end date)
- DateKey: Converts a datetime formatted field into an integer field for use as a better performing foreign key.
- First date of future year
- First date of last year
- First date of month
- First date of next year
- First date of previous year
- First date of year
- Last date of month
- Time Table: Script action that populates a custom time dimension with 15 minute increments
Concatenate:
- Concatenate 2 Fields: Concatenates two fields separated by a space.
- Concatenate 3 Fields: Concatenates three fields separated by a space.
Please use Snippet Pack v3.0 for TimeXtender version 6024.1 and later
5 Comments