|
|
-
|
|
Let Us Learn Oracle - Part 1 of N [ String Concatenation in Oracle ]
Source table: tblPlayers
In Oracle concatenation can be done in the following ways
Option 1: Using Concatenation Operator ( || )
SQL> Select PlayerFirstName || ' ' || PlayerLastName FullName From tblPlayers;
FULLN......
|
|
-
|
|
Let Us Learn Oracle - Part 19 of N [ Joins in Oracle ]
Source table: tblEmployee
Joins in Oracle are similar to Sql Server with some more thing in place. We will look into those shortly
Cross Join / Cartesian Join
Natural Join
Equi Join/ Inner Join
Using clause
Left Outer Join
Right Out......
|
|
-
|
|
It is often a requirement to split a set of contiguous string into individual characters/letters. The below code will help us to do so
Declare @str Varchar(50) = 'abcde'
Select
Data = Substring(@str,Number,1)
From master.dbo.spt_values
where Number Between 1 And Len(@str)
An......
|
|
-
|
|
Let Us Learn Oracle - Part 21 of N [ RowNum in Oracle ]
Source table: tblEmployee
It is a pseudo column that generates sequences in the result set starting from 1 and is evaluated BEFORE the execution of ORDER BY clause and AFTER records are selected.
SQL> Select RowNum,EmpId,EmpName,Salary,D......
|
|
-
|
|
The tables that will participate in the demonstration
tblPlayers
tblStudents
tblDept
tblEmployee
Script for tblPlayers
CREATE TABLE tblPlayers
(
PlayerID INT NOT NULL,
PlayerFirstName VARCHAR(10),
PlayerLastName VARCHAR(10),
BelongsTo VARCHAR(10),
DOB varchar(20),
Fee......
|
|
-
|
|
{
DataRow row = dt.NewRow();
......
|
|
-
|
|
Oracle VARRAY Collection Type
We can make composite datatypes in oracle that will hold multiple values of the same type. These composite types are known as collections.There are basically 3 types of collections in oracle
VArray
Nested Table
Associative Arrays
This article will focus on V......
|
|
-
|
|
With Cte1 As
(
Select * From tblPlayers
)
Select *
From Cte1
Order By PlayerID;
PLAYERID PLAYERFIRS PLAYERLAST BELONGSTO DOB FEEPERMATCH
---------- ---------- ---------- ---------- --------- -----------
1 A Raman India 2......
|
|
-
|
|
WITH ModCte as
(
SELECT
RowsValues
,Col
,DECODE(MOD(RowsValues,Col),0,0,1) AS ModVal
FROM
(
SELECT RowsValues,Col
FROM tblCols
CROSS JOIN tblRows
)
)
SELECT RowsValues,
CASE WHEN [1]= 0 THEN 'X' ELSE '' END [1]
,CASE WH......
|
|
-
|
|
Let Us Learn Oracle - Part 20 of N [ WM_Concat Function in Oracle ]
Source table: tblDept/tblEmployee
Purpose:This function is use for string aggregation.It puts a comma between each value it concatenates. But the problem with this function is that it does not order the elements in the concatenat......
|
|