Get the list of stored procedures created and / or modified on a particular date?

You can try this query in any given SQL Server database: SELECT name, create_date, modify_date FROM sys.procedures WHERE create_date=”20120927″ which lists out the name, the creation and the last modification date – unfortunately, it doesn’t record who created and/or modified the stored procedure in question.

How to remove accents and all chars a..z in sql-server?

The best way to achieve this is very simple and efficient : SELECT ‘àéêöhello!’ Collate SQL_Latin1_General_CP1253_CI_AI which outputs ‘aeeohello!’ The string must not be unicode. If you have a nvarchar just cast it to varchar before using the collate. Here is a function that answers the OP needs : create function [dbo].[RemoveExtraChars] ( @p_OriginalString varchar(50) … Read more

Can a Check constraint relate to another table?

In response to your comment on GSerg’s answer, here’s an example check constraint using a function: alter table YourTable add constraint chk_CheckFunction check (dbo.CheckFunction() = 1) Where you can define the function like: create function dbo.CheckFunction() returns int as begin return (select 1) end The function is allowed to reference other tables.

SQL Script to alter ALL Foreign Keys to add ON DELETE CASCADE

Here’s a script I used for a similiar purpose. It does not support composite foreign keys (which use more than one field.) And it would probably need some tweaking before it will work for your situation. EDIT: In particular it does not handle multi-column foreign keys correctly. select DropStmt=”ALTER TABLE [” + ForeignKeys.ForeignTableSchema + ‘].[‘ … Read more