Determine the end of month using CL
Line 6: I substring the month number from the current date using the ... 01 PGM 02 DCLF FILE(QTEMP/WORKFILE) 03 DLTF FILE(QTEMP/WORKFILE) 04 MONMSG MSGID(CPF0000) 05 RUNSQL SQL('CREATE TABLE...
View ArticleR – Change columns names in a #Spatial dataframe
This makes it challenging/impossible to import the OpenRoads dataset into a SQL database (e.g. GRASS), without changing ... library(rgdal) f = list.files("~/Downloads/OS/data", pattern="shp") f =...
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 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 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 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 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 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 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 ArticleR – Change columns names in a #Spatial dataframe
This makes it challenging/impossible to import the OpenRoads dataset into a SQL database (e.g. GRASS), without changing ... library(rgdal) f = list.files("~/Downloads/OS/data", pattern="shp") f =...
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 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 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 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 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 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 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 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 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 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 Article