Anonymous Test User


Technical Article

Retrieve column attributes

Given database, owner, table, and column names, this procedure returns one from among several column attributes such as type definition, defaults, and other types of constraints.  E.g., to retrieve the type definition of the 'pubs' database's 'author.address':DECLARE @attrib VARCHAR (500)      , @msg    VARCHAR (8000)EXEC p_get_column_attribute 'TYPEDEF'              […]

5 (1)

2002-07-24

117 reads

Technical Article

Slice out string from within specified delimiters

Scalar function 'f_delimited' slices out of a passed-in string, from a specified position inside the string, that segment of it which is delimited on one or both sides by a specified delimiter.Example:  Print out a segment of a 'syscomments.text' column for a stored procedure 'p_proc', representing a line of code (i.e., the segment of 'syscomments.text' […]

2002-07-22

96 reads

Technical Article

String-search on objects in a specified database

Procedure 'p_find_string' allows users to specify any database on a server in searching for a specified character string.  Supported for string-searching:  table columns, view columns, trigger, function, and procedure code.  Produces a report showing: object type, owner, object name, column id (for tables and views) or what line number (for triggers, functions, and procedures), and […]

2002-07-22

92 reads

Technical Article

Scalar Function to Determine Age at a Given Date

This function was written to supplant cumbersome age-at calculations.  To execute, simply set a local INT variable equal to the output of the function.  For example, the following, given my birthdate, computes my own age:    DECLARE @age_at INT    SET @age_at = dbo.f_age_at ('2/16/1954', GETDATE ())

2002-05-09

874 reads

Blogs

Power BI Meets Programmability – TOM, XMLA, and C#

By

For anyone who read the title of this and immediately thought, “Oh no, I...

Do Full Backups Break Log Shipping?

By

TLDR: Nope. Keep on doing your full backups. Make sure that any databases you...

Daily Coping 15 Oct 2021

By

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

Read the latest Blogs

Forums

SSRS Zero-Day patching?

By tacy.highland

Hello all, I've been tasked (rather randomly) with finding out if there is somewhere...

Informatica -SQL Error

By premkuttan

We get a sql connection from host informatica server and the query runs in...

Last Successful Completion Date for SQL Job

By AMCiti

I am trying to write a query to get a list of all SQL...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers