T-SQL Substring: Splicing a String from Another String
Transact-SQL or T-SQL is a way to run SQL statements on your database tables. SQL Server offers several string functions, which you should know to properly manipulate and work with your data. The...
View ArticleSQL SUBSTRING Function
The SQL SUBSTRING function is one of the SQL String Function, which is used to return specified number of characters from the given expression. The SUBSTRING function uses its third argument to decide,...
View ArticleQueries to inventory your SQL Server Agent #Jobs
SQL Server Agent can only provide an answer to this question ... for display SELECT schedule_id ,job_id ,LEFT(CAST(next_run_date AS VARCHAR),4)+ '-' +SUBSTRING(CAST(next_run_date AS VARCHAR),5,2)+'-'...
View ArticleSUBSTRING (Transact-SQL)
Returns part of a character, binary, text, or image expression in SQL Server. The following example shows how to return only a part of a character string. From the sys.databases table, this query...
View ArticleOptimizing Substring Search Performance in SQL Server
The requirement of searching data by part of the value is very common in business applications. All of us are familiar with it – users want to be able to search by entering just a few letters from the...
View ArticleT-SQL Substring: Splicing a String from Another String
Transact-SQL or T-SQL is a way to run SQL statements on your database tables. SQL Server offers several string functions, which you should know to properly manipulate and work with your data. The...
View ArticleSUBSTRING (Transact-SQL)
Returns part of a character, binary, text, or image expression in SQL Server. The following example shows how to return only a part of a character string. From the sys.databases table, this query...
View ArticleT-SQL UDF Quickly Determines How Often a Substring Appears
Microsoft SQL Server 2005 or Microsoft SQL Server 2000 database administrators sometimes come across the problem of hitting the 900-bytes limit for unique constraints. To work around the 900-byte...
View ArticleRegEx in SQL Server for searching texts
T-SQL offers some mechanisms for tackling with those problems. Examples are the in-built functions: LIKE, PATINDEX, CHARINDEX, SUBSTRING or REPLACE, which you can combine with others and obtain quite...
View ArticlePerformance Tuning in SQL Server: Top 5 Ways to Find Slow Queries
SQL performance tuning is a never ending battle ... worker time (CPU), etc. SELECT TOP 10 SUBSTRING(qt.TEXT, (qs.statement_start_offset/2)+1, ((CASE qs.statement_end_offset WHEN -1 THEN...
View ArticleSQL Server Substring with CharIndex
In this article we are going to explore the T-SQL function CharIndex and also how to use it with another T-SQL function Substring(). CharIndex: This function returns the location of a substring in a...
View ArticleOptimizing Substring Search Performance in SQL Server
The requirement of searching data by part of the value is very common in business applications. All of us are familiar with it – users want to be able to search by entering just a few letters from the...
View ArticleString Comparisons in SQL: The Longest Common Substring.
I’ve always wanted a SQL function that tells me the longest substring shared between two strings. As a present to myself, I’ve written one. I hope someone else finds it useful. There are several...
View ArticleQueries to inventory your SQL Server Agent #Jobs
SQL Server Agent can only provide an answer to this question ... for display SELECT schedule_id ,job_id ,LEFT(CAST(next_run_date AS VARCHAR),4)+ '-' +SUBSTRING(CAST(next_run_date AS VARCHAR),5,2)+'-'...
View ArticleT-SQL UDF Quickly Determines How Often a Substring Appears
Microsoft SQL Server 2005 or Microsoft SQL Server 2000 database administrators sometimes come across the problem of hitting the 900-bytes limit for unique constraints. To work around the 900-byte...
View ArticleSubstring for data in dataset and sql table
With the guides and helps from fellow members here, i now can have data from dictionary in dataset by using this code: data want; set sashelp.vcolumn (where=(libname="CDSSTG")); run; However, i want to...
View ArticleRegEx in SQL Server for searching texts
T-SQL offers some mechanisms for tackling with those problems. Examples are the in-built functions: LIKE, PATINDEX, CHARINDEX, SUBSTRING or REPLACE, which you can combine with others and obtain quite...
View ArticleString Comparisons in SQL: The Longest Common Substring.
I’ve always wanted a SQL function that tells me the longest substring shared between two strings. As a present to myself, I’ve written one. I hope someone else finds it useful. There are several...
View ArticleSQL Server Substring with CharIndex
In this article we are going to explore the T-SQL function CharIndex and also how to use it with another T-SQL function Substring(). CharIndex: This function returns the location of a substring in a...
View ArticleSUBSTRING (Transact-SQL)
Returns part of a character, binary, text, or image expression in SQL Server. The following example shows how to return only a part of a character string. From the sys.databases table, this query...
View Article