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

116 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

94 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

91 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

797 reads

Blogs

Data Saturday #8–Southwest US

By

I am very excited to announce that I will be speaking for Data Saturday...

Data Weekender v3.1

By

I am super excited about this new version of Data Weekender, coming up on...

Thanks Kathi and Mala

By

I have to thank Kathi and Mala for putting on the WIT Mental Health...

Read the latest Blogs

Forums

Checking Up on Vendors

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Checking Up on Vendors, which...

Upgrade 2014 Web Edition to Standard

By @SQLNumpty

Hello. I'm working with a client who currently has a SQL 2014 Web Instance...

Package failing but the table is already there and the system says its missing!!

By hurricaneDBA

Dear Everyone Im using SSIS 2019 and VS 2019 The data scientist gave me...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers