Anonymous Test User


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

115 reads

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

93 reads

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

90 reads

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

684 reads

Blogs

Goal Progress–November 2020

By

This is my report, which continues on from the Oct report. It’s getting near...

Azure Synapse Analytics is GA!

By

(Note: I will give a demo on Azure Synapse Analytics this Saturday Dec 5th...

5 Things You Should Know About Azure SQL

By

Azure SQL offers up a world of benefits that can be captured by consumers...

Read the latest Blogs

Forums

Database, RAM and processor Information

By sizal0234

Hi, I need to find the size of all db's and server's processor and...

reference for writing stored procedures (especially spatial) in DB2

By pietlinden

I can write stored procedures in SQL Server ... is there a guide somewhere...

A Technology Collapse

By Steve Jones - SSC Editor

Comments posted to this topic are about the item A Technology Collapse

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers