Take a look at our November 2016 Newsletter.
Extracting All The Words From a String In A SQL Server Database Query
It is easy enough to extract the first word from a string in a database query, but what if you need to separate all words in a given string into a list of separate words?
This is a job for Common Table Expressions (CTEs) as they enable us to repeatedly read a single record while changing it each time.
Here is a SQL Server example which takes a string variable and spearates it into inidividual words. We use a combination of CHARINDEX, LEFT and RIGHT functions to achieve it.
Linux Systems offer an X Windows interface which can make changing system settings and configuration pretty straight forward, but what if you remotely log in via a Secure Shell (SSH) session using a tool such as putty?
Here is how to change the system date and time and the hostname from the command line.
Changing The Date & Time in Linux
The date command can be used by root to change the system date and time.
If you've heard of the cloud, and wondered what it could do for your business, you've probably encountered a dazzling lexicon of jargon about it - as well as some who claim it's the future of IT, and others who say it's complex and problematic. So what is cloud computing and what is the truth? As is so often the case, it comes down to using the technology effectively, not just using it because it's there...
What is cloud computing?
The dictionary definition of cloud:
If you work with SQL Server based applications then probably quite a few!
No matter what the application you are working with (CRM, Sales Order Processing, Financial Accounting, Contact Management, Booking System (to name but a few!)) there is a database behind it. Most common applications will store their data in either a Microsoft SQL Server Database or an Oracle Database (of course there are other relational database platforms out there).
Adding Buttons & Macros to an Access Form
Adding a Button to an Access Form using the Command Button Wizard
Adding an OpenQuery Macro to an Access Form
Working With Axes in MDX SELECT Statements
The SQL Server MDX SELECT statement supports the specification of up to 128 axes, but we generally only use two in our queries.
- The MDX query editor in Management Studio can only represent two axes, columns and rows.
- SSRS only supports two axes in MDX SELECT statements.
Specialist client tools might require data to be delivered via more than two axes, but in the main two axes is plenty for our requirements.
Plotting Charts With SQL Server R Service
Yesterday I posted a blog article about the R Service available in SQL Server 2016 and showed an example of using regular expressions with the stringr R library.
In this blog I am talking about how R can be implemented for chart plotting purposes in SQL Server.
One More Language to Learn!
So, we have had SQL, TSQL, MDX, DMX, DAX to keep us busy in the SQL Server world for years now so I guess it was about time another language came along to join them!
The SQL Server R Service
The R Service enables integration of R scripts into TSQl scripts.
Using CROSS APPLY In SQL SELECT Statements
In this article I take you through the following:
- CROSS APPLY
- OUTER APPLY
- CROSS APPLY with User Defined Table Valued Functions
When Should We Use The CROSS APPLY Statement
The CROSS APPLY statement behaves in a similar fashion to a correlated subquery, but allows us to use ORDER BY statements within the subquery. This is very useful where we wish to extract the top record from a sub query to use in an outer sub query.