Ryan Randall

Aged 28, from London. Just left my first job after Uni after a 6 year stint, most recently managing the development team for a group of financial companies. Currently having a much needed rest teaching myself some new stuff before getting back into it.
  • Interests: Chess (around FIDE 2175), Poker, Football (soccer)

Technical Article

Copy Permissions for a database

Copies the permissions from an existing database user to a new database user.Usage:exec copy_permissions_for_database 'From_User', 'To_User'* From_User must exist in the database.* To_User must not exist in the database.* To_User must exist as a login on the server.I used http://www.sqlservercentral.com/columnists/awarren/sqlpermissionspublicrole_2.asp as a starting point.

5 (1)

2003-04-14

1,818 reads

Technical Article

Multiple Replace

Like the replace function, but can replace more than 1 value at a time.e.g. select dbo.multiple_replace('hello', 'e', '1', default) gives 'h1llo'.  Equivalent to: select replace('hello', 'e', '1')e.g. select dbo.multiple_replace('hello world', 'e;w;ld', '1;2;END', default) gives 'h1llo 2orEND'e.g. select dbo.multiple_replace('hello world', 'e$w$ld', '1$2$END', '$') gives 'h1llo 2orEND'

5 (1)

2002-05-09

419 reads

Technical Article

Table of Numbers

A user-defined function that returns a table of numbers between a and b (using the most efficient way I can think of).e.g.  select * from table_of_numbers(1, 4) gives a table with rows 1, 2, 3 and 4.

5 (1)

2002-05-09

131 reads

Blogs

Using SQL Alerts to Spot Suspicious Activity in SQL

By

SQL doesn’t really give us too many tools out of the box to allow...

How to Change the Browser Used by SSMS for AAD Auth

By

Did you know that you can change the browser used by SQL Server Management...

Typing with Your Tongue Part 2: Voice Access

By

A few months ago, I wrote a post on how I use voice technology...

Read the latest Blogs

Forums

DC migration SQL DB suggestion

By Raja mssql

Hi All, Our server team is planning to move  secondary data centre from one...

SSDT import into a table from .csv corruption

By atzvei

Hello everyone, I am importing from a csv file into a table. Everything works...

Login failures while connecting from Linux to SQL on windows

By ramana3327

Hi all, The app server is running on Linux. SQL server is running on...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers