In terms of functionality, this is very similar to CHARINDEX in that it simply looks for a pattern within a string.
However, where it differs is that PATINDEX requires you to use wildcard characters as part of your search, something that CHARINDEX will not, but it is less powerful in some ways in that it does not allow you to specify a starting point and therefore will only ever find the first occurrence of a pattern in a string.
Read more This is generic guide as, to be honest, setting up all replication is pretty much the same. There are a couple of extra screens for Merge replication and I’ll highlight those where necessary. Otherwise it’s all the same.
Read more There are numerous times you might want your dates returned in a different format and SQL Server will cater for this.
Running the following script will show the different date and time formats you have available…
Read more This is a very common function when performing string manipulation… you simply pass in a character or string that you wish SQL to look for, the text in which to look, and what you want the character or string replacing with.
Read more When Subscribing to a Publication you will need to decide whether you want to use a Push or a Pull subscription. The difference may not sound much on paper, but there are some key points that really need to be noted before you make your choice.
What is the Difference between Push and Pull Subscriptions?
Read more There are 4 main system databases and 1 additional database. These are:
Read more I’ve always found that no matter what I end up coding, I always have to manipulate a date or two. Whether it’s finding last week’s date, extracting the minute from a datetime, or calculating how long someone has taken between orders, it always comes down to manipulating dates.
Read more A datatype is exactly how it sounds... it defines the type of data. We use these all the time in our normal lives but may not even realise it.
14, for example, is a number. We know that "bored" is a word made up of 5 characters. Those are effectively datatypes in action, just that we call them slightly different names in SQL Server.
Read more I will presume that you know the most common numerical datatypes (if not, please refer to the list
here).
This article will simply cover a basic manipulation of some numerical datatypes to highlight some key uses and pitfalls.
Read more