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

T-SQL: RIGHT, LEFT, SUBSTRING and CHARINDEX Functions

This article explains the functionality and uses of the LEFT, RIGHT, SUBSTRING and CHARINDEX functions in SQL. This article will leave you with sound knowledge and understanding that you can take away...

View Article


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


Optimizing SQL Server CPU Performance

For more information on SQL traces, see msdn2.microsoft.com/ms191006.aspx. SELECT substring(text,qs.statement_start_offset/2 ,(CASE WHEN qs.statement_end_offset = -1 THEN len(convert(nvarchar(max),...

View Article

Understanding your SQL Server Fragmentation

So, now the time to see WHY SQL Server can’t shrink our file ... Object_Name(@i) + ']' , CONVERT(GEOMETRY,'POLYGON(' + SUBSTRING( ( SELECT ',(' + CONVERT(VARCHAR, (page_id % @d) * 10) + ' ' +...

View Article

Splitting CSV strings in SQL 2016

One using casts the string as XML and then parses the nodes to return a table and the other uses a very inefficient looping operation with charindex and substring. For performance reasons I’ve always...

View Article


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

DB2 #Memory Area In-Depth: The Package Cache

Borrowing this memory takes some time and resources and means applications will wait even longer on compiling SQL. You can look for package cache overflows in the db2 diagnostic log like this: SELECT...

View Article

SQL SERVER – Removing Leading Zeros From Column in Table

I have always received the question regarding how to reserve leading zeroes in SQL Server while displaying them on the ... data SELECT * FROM Table1 GO -- Remove leading zeros SELECT SUBSTRING(Col1,...

View Article


SQL - String Functions

SQL> UPDATE table_test -> SET blob_col=LOAD_FILE('/tmp/picture') -> WHERE id=1; ..... The first syntax returns the position of the first occurrence of substring substr in string str. The...

View Article


Oracle: Count on only one table within select

I have the following SQL and want to add to the query a count of records for each of the tables selected out of the user_tables, basically count(*). I've tried several things, but am getting only a...

View Article

Use PowerShell to Determine the number DML operations in SQL Server Scripts

We can use one of my favorite libraries to do this easily - .NET's very fast StreamReader, for reading a SQL file. Likewise, since PowerShell uses .NET, this library includes many useful built in...

View Article

T-SQL: RIGHT, LEFT, SUBSTRING and CHARINDEX Functions

This article explains the functionality and uses of the LEFT, RIGHT, SUBSTRING and CHARINDEX functions in SQL. This article will leave you with sound knowledge and understanding that you can take away...

View Article

Splitting CSV strings in SQL 2016

One using casts the string as XML and then parses the nodes to return a table and the other uses a very inefficient looping operation with charindex and substring. For performance reasons I’ve always...

View Article


TempDB database is Full

Extract statement from sql text ISNULL( NULLIF( SUBSTRING( EST.text, ERQ.statement_start_offset / 2, CASE WHEN ERQ.statement_end_offset < ERQ.statement_start_offset THEN 0 ELSE(...

View Article

Use PowerShell to Determine the number DML operations in SQL Server Scripts

We can use one of my favorite libraries to do this easily - .NET's very fast StreamReader, for reading a SQL file. Likewise, since PowerShell uses .NET, this library includes many useful built in...

View Article


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 Article

Stairway to U-SQL Level 10: Table-Valued Functions and UDTs - SQLServerCentral

Welcome to the next step in our U-SQL journey. This time around, we’re going to take a look at how Table-Valued Functions (TVFs) and User Defined Types (UDTs) are implemented in U-SQL. You’re probably...

View Article


T-SQL: RIGHT, LEFT, SUBSTRING and CHARINDEX Functions

This article explains the functionality and uses of the LEFT, RIGHT, SUBSTRING and CHARINDEX functions in SQL. This article will leave you with sound knowledge and understanding that you can take away...

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

Using Visual Basic for FTP Access on an AS/400

For those who don't know anything about stored procedures, I would suggest reading this article: Using SQL Stored Procedures with VB.NET. The physical stored procedure in the SQL database would look...

View Article
Browsing all 989 articles
Browse latest View live