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

Simple free drive #Space alert for SQL Server databases

Here is the T-SQL for the stored procedure ... AS driveLetter ,ltrim(rtrim(substring(data, 3, len(data) - 2 - charIndex(' ', REVERSE(data), 1)))) AS FreeSpaceGB ,right(data, charIndex(' ',...

View Article


Tracking #Job Performance in SQL Server

MERGE INTO dbo.dim_sql_agent_schedule AS SCHEDULE_TARGET USING ( SELECT sysschedules.schedule_id, sysschedules.name AS Schedule_Name, sysschedules.enabled AS Is_Enabled, 0 AS Is_Deleted,...

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

SQL Extract #Domain From Email

The SQL SUBSTRING Function allows you to extract and display the part of a string. In this example we will show you, How to Select string after the @ symbol in each record. In general, SQL SUBSTRING...

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


How to Migrate SQL Server Database Fast and Completely

xp_cmdshell @finalscript In case of any database crashes during such migrations, do not hesitate to use SQL recovery tools like DataNumen SQL Recovery.

View Article

What's New in SQL Server 2016 (Database Engine)

SQL Server 2016 is a 64-bit application ... Parameters passed into string functions, such as into LTrim or Substring, in a native proc. Inline (meaning single statement) table-valued functions (TVFs)...

View Article

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


Using substring and ltrim in Alteryx

I have the below sql code and want to convert this to alteryx formula and apply to dataset below. isnull(SUBSTRING(rtrim(ltrim(hhm.Surname)),2,1),'2 ')...

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

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

How to Find Queries Using an Index (and Queries Using Index Hints)

SQL Server stores query execution plans in cache ... Execution plan cache */ SELECT querystats.plan_handle, querystats.query_hash, SUBSTRING(sqltext.text, (querystats.statement_start_offset / 2) + 1,...

View Article

How to administer SQL Server Reporting Services (SSRS) subscriptions using...

they still support basic built-in functions that can be used across all versions of SQL Server i.e. SUBSTRING, REPLACE. Not surprisingly, there are PowerShell commands that can be executed against most...

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

rever#SEMap - Analyse SQL injection attempts in #Web server logs

SQL CHAR encoding SQL CAST encoding Case encoding of SQL keywords Substring(Experimental - Disabled by default as it will fail with nested queries) Pull requests, patches and feedback is welcome.

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

Simple free drive #Space alert for SQL Server databases

Here is the T-SQL for the stored procedure ... AS driveLetter ,ltrim(rtrim(substring(data, 3, len(data) - 2 - charIndex(' ', REVERSE(data), 1)))) AS FreeSpaceGB ,right(data, charIndex(' ',...

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

rever#SEMap - Analyse SQL injection attempts in #Web server logs

SQL CHAR encoding SQL CAST encoding Case encoding of SQL keywords Substring(Experimental - Disabled by default as it will fail with nested queries) Pull requests, patches and feedback is welcome.

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
Browsing all 989 articles
Browse latest View live