Easily Import CSV Files with R in SQL Server 2016
exec" sql statement for the corresponding staging table declare curFile cursor for select ltrim(rtrim(fullname)) from @tmpFile open curFile; fetch next from curFile into @fullname; while @@FETCH_STATUS...
View ArticleAnalyze #Flight delay data by using Hive in HDInsight
Azure SQL Database. You use an Azure SQL database as a destination ... CREATE TABLE delays AS SELECT YEAR AS year, FL_DATE AS flight_date, substring(UNIQUE_CARRIER, 2, length(UNIQUE_CARRIER) -1) AS...
View ArticleTop 80 + SQL Query Interview Questions and Answers with Examples
Oracle Equivalent of SQL Server SUBSTRING is SUBSTR, Query : select substr(FIRST_NAME,0,3) from employee SQL Server Equivalent of Oracle SUBSTR is SUBSTRING, Query : select substring(FIRST_NAME,1,3)...
View ArticleEasily Import CSV Files with R in SQL Server 2016
exec" sql statement for the corresponding staging table declare curFile cursor for select ltrim(rtrim(fullname)) from @tmpFile open curFile; fetch next from curFile into @fullname; while @@FETCH_STATUS...
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 Articlesqludf_substr()--SQL LOB Substring Locator
The sqludf_substr() function returns a substring of the LOB data the locator represents. SQL7034 D LOB locators are not allowed with COMMIT(*NONE). SQL0901 D SQL system error. SQL0952 D Processing of...
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 Articleconvert CLOB data over 4K character to character
and we said... You can use dbms_lob.substr to extract the first 4,000 characters. This returns a varchar2. So you can do a distinct on this in SQL: create table t ( x clob ); declare tmp clob; begin...
View ArticleEasily Import CSV Files with R in SQL Server 2016
exec" sql statement for the corresponding staging table declare curFile cursor for select ltrim(rtrim(fullname)) from @tmpFile open curFile; fetch next from curFile into @fullname; while @@FETCH_STATUS...
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 ArticleConfiguring ASP.NET Core Applications in Azure #App Service
Firstly, add a service in the ConfigureServices() method in Startup.cs: If I run this code within a properly configured App Service (one with an associated SQL service attached ... scopedCases)) { var...
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 ArticleSearching substrings in MDX
Most of you would be familiar with substring searches in SQL. Today, we will see how to replicate the same scenario in MDX. 1) Suppose we have to find all the employee names having ‘David’ as a...
View Articlesqludf_substr()--SQL LOB Substring Locator
The sqludf_substr() function returns a substring of the LOB data the locator represents. SQL7034 D LOB locators are not allowed with COMMIT(*NONE). SQL0901 D SQL system error. SQL0952 D Processing of...
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 ArticleSQL Server SUBSTRING Function with Examples
In one of my previous articles, I have explained the functionalities of CHARINDEX function with examples. Along with it I also have briefly described the use of SQL Server SUBSTRING() function too. An...
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 ArticleTop 80 + SQL Query Interview Questions and Answers with Examples
Oracle Equivalent of SQL Server SUBSTRING is SUBSTR, Query : select substr(FIRST_NAME,0,3) from employee SQL Server Equivalent of Oracle SUBSTR is SUBSTRING, Query : select substring(FIRST_NAME,1,3)...
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 Article