Comparing SQL Server and MySQL Functions
You’ll be happy to know that the following functions are usable in both MySQL and SQL Server queries without any modifications: ASCII, LEFT, LOWER, LTRIM, REPLACE, REVERSE, RIGHT, RTRIM, SOUNDEX,...
View ArticleHow to substring and cast in select where statement on iSeries with RPG free
Hi. I'm relatively new to free form RPG and I rewrote a program to be RPG free and SQL. I'm having problems with my where clause. I'm trying to substring the second byte on a 2 digit packed field. I've...
View ArticleT-SQL 101: Built-In Functions
T-SQL has many built-in functions that come in four basic flavors ... Commonly used string-manipulation functions include LEFT, RIGHT, SUBSTRING, and REPLACE. LEFT and RIGHT. The LEFT and RIGHT...
View ArticleUse SQL To Change A Substring
Occasionally I need to change part of a string value in a database table. SQL has three mechanisms that let me accomplish such a thing. Do you know what those three mechanisms are and how to use them?...
View ArticleFormatting SQL Code – Part the Second
If you are writing T-SQL, you will use “CAST( AS )”, but will not use the ANSI/ISO standard “SUBSTRING ( FROM FOR )” and other options that do not match the old Sybase syntax.
View ArticleTSQL – Solve it YOUR Way – Finding the Longest Repeated Substring
As our task is to find out the longest repeating substring with NO overlaps, the number m should be only starting from n/2 + 1 (remember in T-SQL integer n divided by 2 will always return back...
View ArticleN1QL Join to array within a document
One other question for you: I've taken the paid-for CD210 SQL for Documents class ... Any ideas why this is so slow? SELECT SUBSTR(account.transDate,0,10) As transDate, AVG(Codes.weight) As...
View ArticleDifferent Methods to Sort SQL Server Result Sets
select SUBSTRING(M.SoldierName, len(M.SoldierName) - charindex(' ', REVERSE(M.SoldierName))+2, len(M.SoldierName)) as LastName, M.YearOfAction, M.MilRank from dbo.MedalOfHonor M order by LastName The...
View ArticleComparing SQL Server and MySQL Functions
You’ll be happy to know that the following functions are usable in both MySQL and SQL Server queries without any modifications: ASCII, LEFT, LOWER, LTRIM, REPLACE, REVERSE, RIGHT, RTRIM, SOUNDEX,...
View ArticleTop 5 T-SQL functions introduced in SQL Server 2016
Prior to the release of SQL Server 2016, many developers made used of user defined ... 1 INSERT INTO @output (splitdata) VALUES(SUBSTRING(@string, @start, @end - @start)) SET @start = @end + 1 SET @end...
View ArticleT-SQL 101: Built-In Functions
T-SQL has many built-in functions that come in four basic flavors ... Commonly used string-manipulation functions include LEFT, RIGHT, SUBSTRING, and REPLACE. LEFT and RIGHT. The LEFT and RIGHT...
View ArticleN1QL Join to array within a document
One other question for you: I've taken the paid-for CD210 SQL for Documents class ... Any ideas why this is so slow? SELECT SUBSTR(account.transDate,0,10) As transDate, AVG(Codes.weight) As...
View ArticleUse SQL To Change A Substring
Occasionally I need to change part of a string value in a database table. SQL has three mechanisms that let me accomplish such a thing. Do you know what those three mechanisms are and how to use them?...
View ArticleComparing SQL Server and MySQL Functions
You’ll be happy to know that the following functions are usable in both MySQL and SQL Server queries without any modifications: ASCII, LEFT, LOWER, LTRIM, REPLACE, REVERSE, RIGHT, RTRIM, SOUNDEX,...
View ArticleTSQL – Solve it YOUR Way – Finding the Longest Repeated Substring
As our task is to find out the longest repeating substring with NO overlaps, the number m should be only starting from n/2 + 1 (remember in T-SQL integer n divided by 2 will always return back...
View ArticleTop 5 T-SQL functions introduced in SQL Server 2016
Prior to the release of SQL Server 2016, many developers made used of user defined ... 1 INSERT INTO @output (splitdata) VALUES(SUBSTRING(@string, @start, @end - @start)) SET @start = @end + 1 SET @end...
View ArticleFormatting SQL Code – Part the Second
If you are writing T-SQL, you will use “CAST( AS )”, but will not use the ANSI/ISO standard “SUBSTRING ( FROM FOR )” and other options that do not match the old Sybase syntax.
View ArticleHow to substring and cast in select where statement on iSeries with RPG free
Hi. I'm relatively new to free form RPG and I rewrote a program to be RPG free and SQL. I'm having problems with my where clause. I'm trying to substring the second byte on a 2 digit packed field. I've...
View ArticleExploiting blind SQL injections in ‘UPDATE’ and ‘INSERT’ statements without...
The SQL injection attack was introduced around 1998 for the first ... he needs to chop the data by string functions such as ‘SUBSTRING()’. It is impossible to fetch a whole subquery result in one...
View ArticleHandling required and missing R packages in #Microsoft R Services
NVARCHAR(MAX)'),1,1,'') AS lib_stat FROM CTE_R AS c2 ) SELECT [email protected] = lib_stat FROM fin SET @cmdstatement = 'EXEC xp_cmdshell ''"C:\Program Files\Microsoft SQL Server\...
View Article