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)

Creating a Script from a Stored Procedure

Ryan demonstrates how he arrived at a solution that allows you to create scripts from a stored procedure using SQL-DMO. If you get interested in DMO, we've got quite a bit of additional content here on the site to help you get going! Ryan is a new author here on the site, please take a minute to read his article, add a comment, maybe just say hello.

5 (1)

2003-05-02

16,819 reads

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,704 reads

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

373 reads

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

Data Modeling at your fingertips

By

(2021-July-30) A picture is worth a thousand words, the same way a visual database schema...

How to put a SQL Server Database into Recovery Pending

By

You might be asking why on earth would you want to get a database...

Daily Coping 30 Jul 2021

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Read the latest Blogs

Forums

Migrate SQL Sever 2012 Database To Server 2014 and Subsequent Versions

By VSCurtis

Hi Guys, I have an SQL Server 2012 Express database that I would like...

Deploying SQL Server Automatically

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Deploying SQL Server Automatically

Setting data compression on a database or even server level possible?

By DiStas

I well realize data compression is a subject to a few variables, such as...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers