Quantcast
Channel: Substring In Sql | Automatic Website Traffic RSS
Browsing all 989 articles
Browse latest View live

String 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 Article


SQL 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


SUBSTRING (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

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 Article

Hey, those variables don't grow on trees, y'know!

And it's almost exactly what fish described in the meeting: He uses a substring function to extract the date and time from the filename and store them into two variables, then concatenates the two...

View Article


Script to find out when SQL Server #Restore will finish

Did you know that SQL Server’s ERRORLOG actually calculates its own estimates ... sp_readerrorlog 0, 1, 'Recovery completed', @DBName SELECT TOP 1 @DBName AS [DBName] ,[LogDate] ,CASE WHEN...

View Article

Stairway to U-SQL Level 15: U-SQL Global Scalar Functions With C#

postcode : postcode.Substring(0, postcode.IndexOf ... Navigate to Data Lake Analytics -> U-SQL Databases -> UkPostcodes -> Assemblies. You should see the PostcodeLibrary assembly under...

View Article

Change 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 Article


SQL 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


Query plan returns NULL when using SQL Server DMV sys.dm_exec_query_plan

Below, I have an alternative script to get the cached plan. SELECT (SELECT TOP 1 SUBSTRING(sql_text.text,statement_start_offset / 2+1 , ((CASE WHEN statement_end_offset = -1 THEN...

View Article

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 Article

String 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 Article

Stairway to U-SQL Level 15: U-SQL Global Scalar Functions With C#

postcode : postcode.Substring(0, postcode.IndexOf ... Navigate to Data Lake Analytics -> U-SQL Databases -> UkPostcodes -> Assemblies. You should see the PostcodeLibrary assembly under...

View Article


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 Article

Optimizing 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 Article


SUBSTRING (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

Substring 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 Article


Stairway to U-SQL Level 15: U-SQL Global Scalar Functions With C#

postcode : postcode.Substring(0, postcode.IndexOf ... Navigate to Data Lake Analytics -> U-SQL Databases -> UkPostcodes -> Assemblies. You should see the PostcodeLibrary assembly under...

View Article

Query plan returns NULL when using SQL Server DMV sys.dm_exec_query_plan

Below, I have an alternative script to get the cached plan. SELECT (SELECT TOP 1 SUBSTRING(sql_text.text,statement_start_offset / 2+1 , ((CASE WHEN statement_end_offset = -1 THEN...

View Article

SQL Azure Reporting Automation

Unlike normal SQL Server where a batch script automation can be done using ... of the individual databases [double]$TotalSizeByte = [double]$TotalSizeByte + $db.Substring($db.LastIndexOf(",")+1)

View Article
Browsing all 989 articles
Browse latest View live