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

Detecting outliers and fraud with R and SQL Server on my bank account data –...

One of the samples Microsoft provided with release of new SQL Server 2016 was using simple logic of Benford ... get_first_num <- function(number){return(as.numeric(substr(number,1,1)))} pbenford...

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


T-SQL String Manipulation Tips and Techniques, Part 1

The task at hand involves counting the number of occurrences of a substring (@substr) within an input string ... of multiple contiguous spaces with one space. Peter Larsson, a SQL Server MVP, came up...

View Article

Using POSITION Functions

When you're experimenting with substring functions, check to see if your system allows an optional third argument. If no third argument is required, and you leave it out, the SQL engine displays all...

View Article

Visualization Dashboard with Couchbase Analytics

var qs = 'SELECT ' + ' parse_date(SUBSTR(e.date, 0, 10), "Y-M-D") AS grpdate ... res.send({ data: qres, narration: [ ['sql', qs] ] }); }); In addition to the RESTful service provided by the server-side...

View Article


Oracle Row Level Security: Part 2

SQL> col sql_text for a25 SQL> col predicate for a20 SQL> col policy for a15 SQL> col object_name for a15 SQL> select substr(sql_text,1,25) sql_text, 2 predicate, 3 policy, 4 object_name...

View Article

BASE64 Encode and Decode in T-SQL - optimized

ascii(substring(@map, @i + 1, 1)), 1, char(@i)) set @i = @i + 1 end set @mapr = stuff(@mapr, ascii('='), 1, CHAR(0)) select cast(@mapr as binary(122)) */ -- Original functions Created By Daniel Payne...

View Article

SQL Analysis from Locking Event Monitor Collecting History

I used this SQL to do that population, directly from the tables created ... as weighted_diff , decimal(((cost_before-cost_after)*frequency)/(cost_before*frequency),5,2) as diff_pct ,...

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


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

BASE64 Encode and Decode in T-SQL - optimized

ascii(substring(@map, @i + 1, 1)), 1, char(@i)) set @i = @i + 1 end set @mapr = stuff(@mapr, ascii('='), 1, CHAR(0)) select cast(@mapr as binary(122)) */ -- Original functions Created By Daniel Payne...

View Article

Calling SQL Functions From RPG, A Service Program

Subprocedures are not provided for SQL scalar functions that have a direct RPG equivalent (e.g. SUBSTR) or that only make sense when used with multiple rows (e.g. the XML functions). The library...

View Article

Using POSITION Functions

When you're experimenting with substring functions, check to see if your system allows an optional third argument. If no third argument is required, and you leave it out, the SQL engine displays all...

View Article


Calling SQL Functions From RPG, A Service Program

Subprocedures are not provided for SQL scalar functions that have a direct RPG equivalent (e.g. SUBSTR) or that only make sense when used with multiple rows (e.g. the XML functions). The library...

View Article

Regular Expression Support in Oracle (REGEXP_COUNT, REGEXP_INSTR,...

SELECT * FROM t1 WHERE TO_NUMBER(REGEXP_SUBSTR(data, '\d{4}')) >= 2014; DATA ----- FALL 2014 2014 CODE-B CODE-A 2014 CODE-D 3 rows selected. SQL> The first part ...

View Article


BASE64 Encode and Decode in T-SQL - optimized

ascii(substring(@map, @i + 1, 1)), 1, char(@i)) set @i = @i + 1 end set @mapr = stuff(@mapr, ascii('='), 1, CHAR(0)) select cast(@mapr as binary(122)) */ -- Original functions Created By Daniel Payne...

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


Using POSITION Functions

When you're experimenting with substring functions, check to see if your system allows an optional third argument. If no third argument is required, and you leave it out, the SQL engine displays all...

View Article

What's New in Database Engine

Transact-SQL Improvements for memory-optimized tables There are several ... Parameters passed into string functions, such as into LTrim or Substring, in a native proc. Inline (meaning single statement)...

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