SQL 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 ArticleEyesOf#Network (EON) 5.1 - SQL Injection
Proof of Concept for the Unauthenticated SQL Injection in EyesOfNetwork 5.1 (DELETE statement ... range(10): execTime = getTime("/logout.php", "rioru' OR (SELECT CASE WHEN (SUBSTRING((SELECT session_id...
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 ArticleXQuery for the Non-Expert – Substring() Function
Within the value() and query() methods it is sometimes desirable to return a portion of a string. Similar to T-SQL, there is a substring function in XQuery that provides this functionality. In this...
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 ArticleIs there a SQL equivalent to Delphi's Pos() function?
You bet. It's called the SUBSTRING function. Like the Pos function, the SUBSTRING function in SQL will return a substring of a string based upon a range of characters you specify. It's a handy function...
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 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 ArticleAutomatically Generate Performance Counter Graphs with SQL Server 2016 and R
We will assume SQL Server R services (in-database ... The correct data fetch script is as follows: USE TestDB GO select [Time]=convert(datetime, substring(d.CounterDateTime,1,23)) ,...
View ArticleTip: Use SUBSTR to Remove the Last Character from any String in Oracle SQL
Let's say you have a set of string values (such as values in a column) and you want to remove the last character. But, the string values are all different lengths. How can you do that? Use a...
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 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 ArticleTip: Use SUBSTR to Remove the Last Character from any String in Oracle SQL
Let's say you have a set of string values (such as values in a column) and you want to remove the last character. But, the string values are all different lengths. How can you do that? Use a...
View ArticleChange a Substring with SQL
However, my SQL command gives me an invalid token error at the opening parenthesis of SUBSTR in the SET statement. Is there a rule that you can’t use SUBSTR in a SET statement? If so, do you have 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 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 ArticleAutomatically Generate Performance Counter Graphs with SQL Server 2016 and R
We will assume SQL Server R services (in-database ... The correct data fetch script is as follows: USE TestDB GO select [Time]=convert(datetime, substring(d.CounterDateTime,1,23)) ,...
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 ArticleTip: Use SUBSTR to Remove the Last Character from any String in Oracle SQL
Let's say you have a set of string values (such as values in a column) and you want to remove the last character. But, the string values are all different lengths. How can you do that? Use a...
View Article