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 ArticleCalling 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 ArticleUsing 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 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 ArticleBASE64 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 ArticleComparing 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 ArticleWhat'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 ArticleSQL 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 ArticleSQL - 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 ArticleT-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 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 ArticleComparing 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 ArticleDb__ 3.81__sql server language data in table df database kernel
The data in sql server 2000 which has data in Arabic_CI_AS character ... Database replication But if I use the substr( , It will come up real data and took around 2 min to finish. Database record So...
View ArticleWhat'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 ArticleBASE64 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 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 ArticleSQL 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 ArticleHow to get filename from file path in MySQL?
However, you can get simply filename or image name from path using SUBSTRING_INDEX() of MySQL. You can extract filename from path using substring_index(), substring_index() take three argument, first...
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 ArticleLoading Data into Oracle BI Cloud Service using BI Publisher Reports and REST...
PL/SQL is the only procedural tool that runs on the BICS / Database ... This step uses the : * INSTR function to determine the beginning and end of the embedded XML * SUBSTR function to extract just...
View Article