T-SQL

Technical Article

SP to find text in code objects in all user db's.

  • Script

This script creates a stored procedure which helps to find text in all of your code objects in all your databases. It searches the code of SP's, UDF's, views, triggers, and it searches in all databases.Output is a result set with DbName, ObjectName and ObjectType.Advantages are- works reliable also with source codes longer than 4000 […]

You rated this post out of 5. Change rating

2004-03-31

272 reads

Technical Article

Search For SPs which contain a specific String.

  • Script

This Stored Procedure is for Searching all the user defined Stored Procedures in a database for the existence of a specified string . This is especially useful when you have changed some Column name and want to Find the Column Name in all the Stored Procedures where it is used, so it will return you […]

You rated this post out of 5. Change rating

2004-03-26

822 reads

Technical Article

Function To Retrieve Last Index

  • Script

This Function Enables the user to retrieve the Last Index of the character/string in a predetermined string.Eg If you want search for the Last Occurance of 'SQL' in 'SQL SERVER2000 USES ANSI SQL' thenSELECT dbo.LastIndexOf('SQL SERVER2000 USES ANSI SQL','SQL')will return 26.Tested Only in SQL SERVER2000

5 (3)

You rated this post out of 5. Change rating

2004-03-25

2,772 reads

Technical Article

Funcs for Date Formatting (Like Oracle TO_CHAR)

  • Script

Function RJZeroN is used for formatting integer numbers as right-justified strings with leading zeroes according to a specified size (max 20 characters which will hold the largest BIGINT value).  A NULL value is returned if the formatting cannot be done according to the values specified.Example: Format a 3-digit number as a 7-character numberstring with leading […]

You rated this post out of 5. Change rating

2004-03-24

943 reads

Technical Article

An old and new way to query Hierarchical data

  • Script

This script uses an old mathematical way of doing hierarchical queries. The most common way of showing hierarchical data in SQL Server is by creating a stored procedure that calls itself. This is not a recent problem, in fact this programming technique has been around since the first programming languages. By using stacks, you can […]

1 (1)

You rated this post out of 5. Change rating

2007-05-02 (first published: )

576 reads

Blogs

My 2024 in Data: Music

By

This is my last week of the year working (I guess I come back...

A New Word: Suente

By

suente– n. the state of being so familiar with someone that you can be...

Side Projects

By

Anyone (everyone?) who has ever tried to learn a programming language knows that to...

Read the latest Blogs

Forums

Timeout Error while executing a TSQL statement in Sql server Express Edition

By IT researcher

I am getting the below error when I execute a SQL command in SQL...

Timeout Error while executing a TSQL statement in Sql server Express Edition

By IT researcher

I am getting the below error when I execute a SQL command in SQL...

Sql script replace and rearrange numbers

By diegodeveloper

Hi everyone. I have this table and this information. (left side of the image)...

Visit the forum

Question of the Day

DCL

We have DDL, DML, and DCL. What is DCL used for?

See possible answers