Home
Search results “Oracle return single row” for the 2014
Oracle Database11g tutorials 10 ||  SQL Single Row Function (SQL Functions )
 
01:29
Single row functions Tool used in this tutorial is command prompt. This tutorial series is part of SQL expert exam certification training. if you are preparing for SQL certification you can use my tutorials. This SQL Tutorial is a part of free training. Copy Cloud referral link || Use this link to join copy cloud and get 20GB of free storage https://copy.com?r=j7eYO7 Contacts Email [email protected] Twitter https://twitter.com/rebellionrider Instagram http://instagram.com/rebellionrider Facebook. https://www.facebook.com/imthebhardwaj Linkedin. http://in.linkedin.com/in/mannbhardwaj/ Thanks for linking, commenting, sharing and watching more of our videos This is Manish from The Code makers ============================================ in this oracle database tutorial we will see what are SQL FUNCTIONS. SQL functions are divided into two categories 1st is Single Row Functions And another one is Multiple row function which is also known as aggregate functions. But in today's SQL tutorial we will concentrate on Single Row Functions. Single-row functions operate on one row at a time and return one row of output for each input row. Single row functions are capable of manipulating data items and modifying the data types. Single row functions return one result per row and act on each row that is returned. Single row functions can accept one or more arguments and return one value. These arguments can be a column or an expression. With oracle we have 5 types of Single Row Functions 1. Character Functions 2. Number Functions 3. General Functions 4. Conversion Functions and 5. Date Functions. Character Functions are further divided into two categories. 1st is Case- manipulation functions and 2nd is Character Manipulation functions. We have 3 case manipulation functions Lower, upper and initcap and 7 character manipulation functions Sql functions concat, substr, length, instr, lpad, rpad, trim and replace. In our future video we will see what these functions are and what they do along with other SQL function. That's it for today's sql tutorial. Hope you enjoyed watching. Please don't forget to subscribe and like. Have a good day. This is Manish.
Views: 92087 Manish Sharma
Return sys_refcursor through function in PL/SQL
 
08:13
How to return a set of Table row data through function using sys_refcursor in PL/SQL A simple tutorial to demonstrate using ref cursor in pl sql function opening and return ref cursor.
Views: 2909 Subhroneel Ganguly
Part 6   Transform rows into columns in sql server
 
08:53
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2014/06/part-6-transform-rows-into-columns-in.html This is another common sql server interview question. We will be using Countries table in this example. SQL to create the table Create Table Countries ( Country nvarchar(50), City nvarchar(50) ) GO Insert into Countries values ('USA','New York') Insert into Countries values ('USA','Houston') Insert into Countries values ('USA','Dallas') Insert into Countries values ('India','Hyderabad') Insert into Countries values ('India','Bangalore') Insert into Countries values ('India','New Delhi') Insert into Countries values ('UK','London') Insert into Countries values ('UK','Birmingham') Insert into Countries values ('UK','Manchester') Here is the interview question. Write a sql query to transpose rows to columns. Using PIVOT operator we can very easily transform rows to columns. Select Country, City1, City2, City3 From ( Select Country, City, 'City'+ cast(row_number() over(partition by Country order by Country) as varchar(10)) ColumnSequence from Countries ) Temp pivot ( max(City) for ColumnSequence in (City1, City2, City3) ) Piv
Views: 183853 kudvenkat
Part 1   How to find nth highest salary in sql
 
11:45
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2014/05/part-1-how-to-find-nth-highest-salary_17.html This is a very common SQL Server Interview Question. There are several ways of finding the nth highest salary. By the end of this video, we will be able to answer all the following questions as well. How to find nth highest salary in SQL Server using a Sub-Query How to find nth highest salary in SQL Server using a CTE How to find the 2nd, 3rd or 15th highest salary Let's use the following Employees table for this demo Use the following script to create Employees table Create table Employees ( ID int primary key identity, FirstName nvarchar(50), LastName nvarchar(50), Gender nvarchar(50), Salary int ) GO Insert into Employees values ('Ben', 'Hoskins', 'Male', 70000) Insert into Employees values ('Mark', 'Hastings', 'Male', 60000) Insert into Employees values ('Steve', 'Pound', 'Male', 45000) Insert into Employees values ('Ben', 'Hoskins', 'Male', 70000) Insert into Employees values ('Philip', 'Hastings', 'Male', 45000) Insert into Employees values ('Mary', 'Lambeth', 'Female', 30000) Insert into Employees values ('Valarie', 'Vikings', 'Female', 35000) Insert into Employees values ('John', 'Stanmore', 'Male', 80000) GO To find the highest salary it is straight forward. We can simply use the Max() function as shown below. Select Max(Salary) from Employees To get the second highest salary use a sub query along with Max() function as shown below. Select Max(Salary) from Employees where Salary [ (Select Max(Salary) from Employees) To find nth highest salary using Sub-Query SELECT TOP 1 SALARY FROM ( SELECT DISTINCT TOP N SALARY FROM EMPLOYEES ORDER BY SALARY DESC ) RESULT ORDER BY SALARY To find nth highest salary using CTE WITH RESULT AS ( SELECT SALARY, DENSE_RANK() OVER (ORDER BY SALARY DESC) AS DENSERANK FROM EMPLOYEES ) SELECT TOP 1 SALARY FROM RESULT WHERE DENSERANK = N To find 2nd highest salary we can use any of the above queries. Simple replace N with 2. Similarly, to find 3rd highest salary, simple replace N with 3. Please Note: On many of the websites, you may have seen that, the following query can be used to get the nth highest salary. The below query will only work if there are no duplicates. WITH RESULT AS ( SELECT SALARY, ROW_NUMBER() OVER (ORDER BY SALARY DESC) AS ROWNUMBER FROM EMPLOYEES ) SELECT SALARY FROM RESULT WHERE ROWNUMBER = 3
Views: 858375 kudvenkat
SQL Tutorial - MultiRow Group Function Part-1st
 
14:02
Explained a multirow function -Oracle database Unbeatable,Unbreakable Platform.. #SQLTutorial #MultiRowGroupFunction
Views: 2328 Oracle World
BI Publisher Extensibility Training - More on Customizing RTF Report Layouts
 
08:10
his short tutorial details how to customize an RTF report layout. The tutorial will show you: * How to edit RTF layout template in Microsoft Word: * How to add columns to a table * How to delete rows from a table * How to sort data * How to change the logo * How to highlight rows in a report * How to preview report output in excel format Copyright © 2014 Oracle and/or its affiliates. Oracle® is a registered trademark of Oracle and/or its affiliates. All rights reserved. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the "Materials"). The Materials are provided "as is" without any warranty of any kind, either express or implied, including without limitation warranties of merchantability, fitness for a particular purpose, and non-infringement.
Part 2   SQL query to get organization hierarchy
 
10:14
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2014/05/part-2-sql-query-to-get-organization.html To get the best out of this video, the following concepts need to be understood first. These are already discussed in SQL Server Tutorial. 1. Self-Join - http://www.youtube.com/watch?v=qnYSN_7qwgg 2. CTE - http://www.youtube.com/watch?v=ZXB5b-7HJHk 3. Recursive CTE - http://www.youtube.com/watch?v=GGoV0wTMCg0 Here is the problem definition: 1. Employees table contains the following columns a) EmployeeId, b) EmployeeName c) ManagerId 2. If an EmployeeId is passed, the query should list down the entire organization hierarchy i.e who is the manager of the EmployeeId passed and who is managers manager and so on till full hierarchy is listed. For example, Scenario 1: If we pass David's EmployeeId to the query, then it should display the organization hierarchy starting from David. Scenario 2: If we pass Lara's EmployeeId to the query, then it should display the organization hierarchy starting from Lara. We will be Employees table for this demo. SQL to create and populate Employees table with test data Create table Employees ( EmployeeID int primary key identity, EmployeeName nvarchar(50), ManagerID int foreign key references Employees(EmployeeID) ) GO Insert into Employees values ('John', NULL) Insert into Employees values ('Mark', NULL) Insert into Employees values ('Steve', NULL) Insert into Employees values ('Tom', NULL) Insert into Employees values ('Lara', NULL) Insert into Employees values ('Simon', NULL) Insert into Employees values ('David', NULL) Insert into Employees values ('Ben', NULL) Insert into Employees values ('Stacy', NULL) Insert into Employees values ('Sam', NULL) GO Update Employees Set ManagerID = 8 Where EmployeeName IN ('Mark', 'Steve', 'Lara') Update Employees Set ManagerID = 2 Where EmployeeName IN ('Stacy', 'Simon') Update Employees Set ManagerID = 3 Where EmployeeName IN ('Tom') Update Employees Set ManagerID = 5 Where EmployeeName IN ('John', 'Sam') Update Employees Set ManagerID = 4 Where EmployeeName IN ('David') GO Here is the SQL that does the job Declare @ID int ; Set @ID = 7; WITH EmployeeCTE AS ( Select EmployeeId, EmployeeName, ManagerID From Employees Where EmployeeId = @ID UNION ALL Select Employees.EmployeeId , Employees.EmployeeName, Employees.ManagerID From Employees JOIN EmployeeCTE ON Employees.EmployeeId = EmployeeCTE.ManagerID ) Select E1.EmployeeName, ISNULL(E2.EmployeeName, 'No Boss') as ManagerName From EmployeeCTE E1 LEFT Join EmployeeCTE E2 ON E1.ManagerID = E2.EmployeeId
Views: 272535 kudvenkat
ADD_MONTHS Function in SQL Query with Example
 
02:32
ADD_MONTHS(): The Oracle/PLSQL ADD_MONTHS function returns a date plus n months. Syntax: ADD_MONTHS( date1, n ) Arguments: date1 is the starting date (before the n months have been added). n is the number of months to add to date1. Example: Let's look at some Oracle ADD_MONTHS function examples and explore how you would use the ADD_MONTHS function in Oracle/PLSQL. ADD_MONTHS('01-Aug-03', 3) would return '01-Nov-03' ADD_MONTHS('01-Aug-03', -3) would return '01-May-03' ADD_MONTHS('21-Aug-03', -3) would return '21-May-03' ADD_MONTHS('31-Jan-03', 1) would return '28-Feb-03' Thanks for watching..:)
Views: 1079 WingsOfTechnology
part 11 sql model clause return all rows
 
02:22
data warehousing, sql model, return all rows, oracle 10g,dimension by, measure
Oracle Database11g tutorials 12 || SQL Concat Function - SQL character manipulation function
 
04:47
Link for SQL concat function: http://www.rebellionrider.com/SQL-concat-function.htm SQL Concat function/SQL concat() function First function of SQL character manipulation function. Two have in depth knowledge of SQL concatenation operator Please watch my video on SQL concatenation Operator http://youtu.be/PYMeFe72Bas Tool used in this tutorial is command prompt. This tutorial series is part of SQL expert exam certification training. if you are preparing for SQL certification you can use my tutorials. This SQL Tutorial is a part of free training. Copy Cloud referral link || Use this link to join copy cloud and get 20GB of free storage https://copy.com?r=j7eYO7 Link for SQL function introduction Video 10 http://youtu.be/5rx8Q4x4-qI Link SQL concat Article http://www.rebellionrider.com/SQL-concat-function.htm Contacts E-Mail [email protected] Twitter https://twitter.com/rebellionrider Instagram http://instagram.com/rebellionrider Facebook. https://www.facebook.com/imthebhardwaj Linkedin. in.linkedin.com/in/mannbhardwaj/ Thanks for linking, commenting, sharing and watching more of our videos This is Manish from RebellionRider.com -------------------------------------------------------------------------------------------- SQL Concat () function is a Character manipulation function which is a category of SQL character function. We have already discussed the intro of SQL character function in Video 10. You can find link of this video in description below. Ok let's go ahead. SQL Concat () function concatenates two separate character string into one character string. Let's see the syntax Concat (string_1 , String_2) Note here that SQL Concat function takes only two arguments at a time. This SQL Concat function will return string_1 concatenated with string_2. This also means that it will return a single string which is a combined string of parameter String_1 and String_2. Both the parameters of SQL Concat function String_1 and string_2 can be of any data-type. You can even specify the columns of the table here. SQL Concat function is equivalent to the concatenation operator (||). SQL concatenation operator is represented by double solid vertical bars or we can say double pipe signs. Question: How to concatenate more than two strings as SQL Concat that can have only 2 parameters and what is the difference between SQL Concat Function and SQL concatenation operator? The one answer for the second Question What is the Difference between SQL Concat Function and SQL concatenation operator? Is While SQL Concat function takes only two parameters, The Concat operator can be repeated as often as is necessary. Meaning, by the help of SQL Concat operator you can combine as many strings as you want. And Concatenation operator is also not supported by several databases such as SQL server so this might cause problem. To answer the first question How to concatenate more than two strings as SQL Concat that can have only 2 parameters? We will have to jump over SQL developer. Let's see some examples. Say we want to retrieve the full name of an employee from Employees table. Let's try it using SQL Concat function. SELECT Concat (first_name, last_name) AS "Full Name" FROM employees; Here in this query we use two column names - first_name and last_name as arguments of our Concat function Execute. As you can see here, we get full name of our employee but there is no space in between first name and last name. We will see how to format this string using SQL Concat function in a few seconds But before that, let's see how to do the same task using SQL concatenation operator. SELECT first_name ||last_name AS "Full name" FROM employees; As you can see this query also produces the same result. Now we will see how to format full name of employees First we will do this using SQL concatenation Operator. SELECT first_name||' '||last_name AS "Full name" FROM employees; Now you can see we get space between first name and last name of the employee. Again, let's do it using SQL Concat function. Here we will see the nested function concept where we will be using nested Concat function to achieve this formatted string. SELECT Concat (Concat (first_name, ' '), last_name) FROM employees; Inner Concat function has two parameters. These are our first column name first_name and an empty string which will be a space between first name and second name. This Concat will now return a string which is the first name with space. This returning string will be the first input of our Outer Concat and column last_name will be the second input. All together this will give us the desired output. As you can see this method is complex than the first one where we use SQL concatenation operator.
Views: 76942 Manish Sharma
COALESCE Function in SQL ORACLE Query With Example
 
03:53
ORACLE/PLSQL: COALESCE FUNCTION The Oracle/PLSQL COALESCE function returns the first non-null expression in the list. If all expressions evaluate to null, then the COALESCE function will return null. The syntax for the Oracle/PLSQL COALESCE function is: coalesce( expr1, expr2, ... expr_n ) PARAMETERS: expr1 to expr_n are the expressions to test for non-null values. EXAMPLE: The COALESCE function can be used in Oracle/PLSQL. You could use the coalesce function in a SQL statement as follows: SELECT COALESCE( address1, address2, address3 ) result FROM suppliers; The above COALESCE function is equivalent to the following IF-THEN-ELSE statement: IF address1 is not null THEN result := address1; ELSIF address2 is not null THEN result := address2; ELSIF address3 is not null THEN result := address3; ELSE result := null; END IF; The COALESCE function will compare each value, one by one. Lets apply the same to emp table. We have some NULL values in comm and mgr columns. but not in any other columns. So lets take a example for this 2 columns. COALESCE(comm,mgr,sal) Here if comm is null, function returns mgr value. If mgr is null it returns sal value! Query used in video: SELECT ename,comm,mgr,sal,COALESCE(comm,mgr,sal) result FROM emp;
Views: 6255 WingsOfTechnology
DECODE Function ( IF..THEN..ELSE) in SQL ORACLE Query With Example
 
05:35
ORACLE/PLSQL: DECODE FUNCTION The Oracle/PLSQL DECODE function has the functionality of an IF-THEN-ELSE statement. The syntax for the Oracle/PLSQL DECODE function is: DECODE( expression , search , result [, search , result]... [, default] ) ARGUMENTS: expression is the value to compare. search is the value that is compared against expression. result is the value returned, if expression is equal to search. default is optional. If no matches are found, the DECODE function will return default. If default is omitted, then the DECODE function will return null (if no matches are found). Lets apply this function on emp table. Emp table has 3 dept numbers like 10,20 and 30. So if I want to display the different dept names based on ID, I have to use IF THEN ELSE condition. IF deptno=10 THEN "DEPT1" ELSE deptno=20 THEN "DEPT2" ELSE deptno=30 THEN "DEPT3" This entire IF block can be achived using single DECODE(). DECODE(deptno,10,'DEPT1',20,'DEPT2',30,'DEPT3') Query used in Video: select empno,ename,deptno,DECODE(deptno,10,'DEPT1',20,'DEPT2',30,'DEPT3') from emp;
Views: 5395 WingsOfTechnology
Oracle Database11g tutorials 13 || SQL substr function / SQL substring function
 
06:34
link of SQL substr blog : http://www.rebellionrider.com/SQL-substr-function.htm SQL substr function SQL Substr function will return a sub string of a specified length from the source string beginning at a given position. Tool used in this tutorial is command prompt. This tutorial series is part of SQL expert exam certification training. if you are preparing for SQL certification you can use my tutorials. This SQL Tutorial is a part of free training. Copy Cloud referral link || Use this link to join copy cloud and get 20GB of free storage https://copy.com?r=j7eYO7 Contacts E-Mail [email protected] Twitter https://twitter.com/rebellionrider Instagram http://instagram.com/rebellionrider Facebook. https://www.facebook.com/imthebhardwaj Linkedin. http://in.linkedin.com/in/mannbhardwaj/ Thanks for linking, commenting, sharing and watching more of our videos This is Manish from RebellionRider.com ---------------------------------------------------------------------------- As the name suggests SQL Substr function will return substring from a given source string. Let's see the Syntax Substr (source_string, start_pos, Substr_length) As we can see SQL substr function takes 3 parameters. First one is Source string from which you want to extract the segment. Second parameter is Starting position for sub string from the Source string. And the third parameter is Substr_length which is the length for the substring. First two parameters are mandatory to specify while third one is optional. So we can say. SQL Substr function will return a sub string of a specified length from the source string beginning at a given position. First parameter source string can be of any data type CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB whereas both start_pos, Substr_length parameters must be number data type. The returning result of SQL Substr function is of same data type of source string. Let's see an example of SQL Substr function. SELECT substr('www.RebellionRider.com',5,14) FROM dual; Here in this query url of my website www.RebellionRider.com is our source string with the total length of 22 characters, Now, I want to extract the name of my website that is, RebellionRider. So if you count the total length of the name of the website, it is 14. That's why I have specified 14 as my third parameter of SQL Substr function which is substr_length. Also the name of the website RebellionRider is starting from 5th position therefore I have specified 5 at second parameter of SQL substr function which is strt_pos or starting position. Execute it. Here is our result RebellionRider When starting position is larger than the length of source string. In this case SQL Substr function will return NULL as a result. Let's do an example. SELECT substr('www.RebellionRider.com',23,14) FROM dual; As you can see here I have specified 23 at starting position and the total length of our source string is 22 characters Let's execute And the result is Null. Second scenario When the Substr_length is greater than source string In this case the segment return is the substring from starting position to the end of the string. For example SELECT substr('www.RebellionRider.com',5,23) FROM dual; Our starting position is at 5 means at the first R of RebellionRider and length of substring is set to 23 which is greater than the length of source string that is 22. Execute. As you can see we get a substring from first R of RebellionRider till the end of the source String. Third scenario When you supply numeric or arithmetic expression or a DATE instead of character as Source string to SQL Substr function In this scenario If you have supplied a numeric string instead of character as source string, the oracle engine casts them as a character when they occur as parameter to SQL Substr function. And if you have supplied Arithmetic expression or a DATE then The Oracle engine first solves or evaluates the Arithmetic expression or the DATE Then casts them as a character. Means if you have arithmetic expression in your source string then oracle will first solve it and then change or say cast the value of its result into character. Let's see some example. SELECT substr(50000-7,2,4) FROM dual; Oracle first evaluates the arithmetic expression that is 50000-7 equals to 49993. And then oracle engine casts this result 49993 into a character string. Means 49993 will be a 5 characters string. Starting position of substring is 2, that means from the first 9 of 49993 We specified the length of substring is 4 so we must get 9993 as our result. Let's check execute
Views: 78758 Manish Sharma
ASCII Function in SQL Query with Example
 
01:33
ASCII(): ASCII function returns the NUMBER code that represents the specified character. Sytax: ASCII( single_character ) PARAMETERS: single_character is the specified character to retrieve the NUMBER code for. If more than one character is entered, the ASCII function will return the value for the first character and ignore all of the characters after the first. Let's look at some Oracle ASCII function examples and explore how you would use the ASCII function in Oracle/PLSQL. For example: ASCII('C') would return 67 ASCII('T') would return 84 ASCII('T2') would also return 84 Thanks for watching...:)
Views: 1206 WingsOfTechnology
SQL Server - UPDATE RECORDS IN TABLE VIA STORED PROCEDURE
 
04:15
https://www.udemy.com/sql-server-fast-track-intro-to-queries/learn/v4/overview How to update table records via Stored Procedure in SQL Server. This is a very quick and concise tutorial with code that is easy to duplicate.
Views: 11029 Dave Merton
Oracle Database11g tutorials 8 || SQL DISTINCT with multiple columns |SQL Distinct with Two columns
 
04:33
This SQL tutorial and Oracle database 11g tutorial for beginners will show how to use SQL DISTINCT keyword with SQL Select clause. This Video is in the continuation of previous video on SQL distinct with one column. In this video we will see How to use SQL distinct with multiple columns and SQL distinct with two columns Tool used in this tutorial is SQL developer. This tutorial series is part of SQL expert exam certification training. If you are preparing for SQL certification you can use my tutorials. This SQL Tutorial is a part of free training. Copy Cloud referral link || Use this link to join copy cloud and get 20GB of free storage https://copy.com?r=j7eYO7 Contacts Email [email protected] Twitter https://twitter.com/rebellionrider Instagram http://instagram.com/rebellionrider Facebook. https://www.facebook.com/imthebhardwaj Linkedin. in.linkedin.com/in/mannbhardwaj/ Thanks for linking, commenting, sharing and watching more of our videos This is Manish From The Code makers
Views: 97533 Manish Sharma
Part 5   SQL query to find employees hired in last n months
 
04:53
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2014/05/part-5-sql-query-to-find-employees.html This question is asked is many sql server interviews. If you have used DATEDIFF() sql server function then you already know the answer. -- Replace N with number of months Select * FROM Employees Where DATEDIFF(MONTH, HireDate, GETDATE()) Between 1 and N
Views: 165406 kudvenkat
SQL tutorial 51: DECODE function in Oracle Database By Manish Sharma (RebellionRider)
 
05:04
SQL Tutorial 51 Decode function in Oracle Database. ● What Is DECODE() ● DECODE ( ) vs CASE ● Syntax of DECODE() ● Query 1. String Matching using DECODE() ● Query 2. DECODE() comparing values form the COLUMN of the table Celebrating 1000 subscribers. Thanks a lot guys for all your love and support. ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog: ------------------------------------------------------------------------- Copy Cloud referral link || Use this link to join copy cloud and get 20GB of free storage https://copy.com?r=kb4rc1 -------------------------------------------------------------------------- ►Make sure you SUBSCRIBE and be the first one to see my videos! -------------------------------------------------------------------------- Amazon Wishlist: http://bit.ly/wishlist-amazon ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ►►►Find me on Social Media◄◄◄ Follow What I am up to as it happens on https://twitter.com/rebellionrider https://www.facebook.com/imthebhardwaj http://instagram.com/rebellionrider https://plus.google.com/+Rebellionrider http://in.linkedin.com/in/mannbhardwaj/ http://rebellionrider.tumblr.com/ http://www.pinterest.com/rebellionrider/ You can also Email me at [email protected] Please please LIKE and SHARE my videos it makes me happy. Thanks for liking, commenting, sharing and watching more of our videos This is Manish from RebellionRider.com ♥ I LOVE ALL MY VIEWERS AND SUBSCRIBERS
Views: 33194 Manish Sharma
LOWER and UPPER Function in SQL
 
01:59
UPPER(): UPPER returns char, with all letters uppercase. char can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The return value is the same datatype as char. The database sets the case of the characters based on the binary mapping defined for the underlying character set. LOWER(): LOWER returns char, with all letters lowercase. char can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The return value is the same datatype as char. The database sets the case of the characters based on the binary mapping defined for the underlying character set. Thanks for watching...:)
Views: 1195 WingsOfTechnology
ROW_NUMBER analytical function in PLSQL to find top nth record.
 
13:27
How to use row_number analytical function in PL/SQL to find top nth record. row_number analytic function helps you to find ranking related query. In this example I have used a salary table and rank is been made on gross_pay of employees.
Views: 1007 Subhroneel Ganguly
SQL Tutorial - MultiRow Group Function Part-2nd
 
14:03
Explained a Multirow function -Oracle database Unbeatable,Unbreakable Platform.. #SQLTutorial #MultiRowGroupFunction
Views: 1005 Oracle World
Chpater3 Single Row Functions Part4
 
39:53
How to use single row functions in SQL
Views: 631 TEK CLASSES
SQL Complete Tutorial - ADD or SUBSTRACT or MULTIPLY between two columns - Chapter 6
 
03:47
In this video, I have explained how to add_subtract_multiply the two columns from the particular table. Comment - Follow - Like : https://www.facebook.com/TechyVickyBlog https://www.twitter.com/techyvicky https://www.pinterest.com/techyvicky/techy-vicky-blog https://plus.google.com/109896475845510580320/
Views: 31637 Vicky's Blog
Multiple Column Add Up SQL
 
00:50
You can send a query to a sql database to automatically have it add up a column of numbers and then return you the result. Here is how.
Views: 181 GuidesTutorials
Basic aggregate functions in Oracle plsql.
 
19:22
Understanding basic aggregate functions in pl sql. A simple pl sql tutorial which demonstrate how to use basic aggregate functions like sum, avg, count, max and min.
Views: 346 Subhroneel Ganguly
CHR Function in SQL Query with Example
 
01:36
CHR(): The Oracle/PLSQL CHR function is the opposite of the ascii function. It returns the character based on the NUMBER code. Syntax: CHR( number_code ) Here number_code is the NUMBER code used to retrieve the character. Example: Let's look at some Oracle CHR function examples and explore how you would use the CHR function in Oracle/PLSQL. CHR(116) would return 't' CHR(84) would return 'T' Thanks for watching...:)
Views: 869 WingsOfTechnology
SQL Server - INSERT RECORDS INTO TABLE VIA STORED PROCEDURE AND DEFAULT VALUES
 
06:43
https://www.udemy.com/sql-server-fast-track-intro-to-queries/learn/v4/overview How to use a stored procedure to insert records to a database table. This tutorial also goes over how to set up the stored procedure with parameters that have default values and then the different methods of calling or executing the stored procedure.
Views: 35897 Dave Merton
Excel Magic Trick 1158: Get Millions of Rows of Data into PivotTable without PowerPivot, Excel 2013
 
04:25
Download File: http://people.highline.edu/mgirvin/excelisfun.htm See how to Get Millions of Rows of Data into Excel 2013 for a PivotTable without PowerPivot: 1. (00:10 minute mark) Problem Setup for Excel 2013 when you don’t need Group by Date 2. (01:06 minute mark) Data Ribbon, Get External Data, then in Import Data dialog box: select “Only Create Connection” and check “Add this data to the Data Model” 3. (01:59 minute mark) Create PivotTable and in the Create PivotTable dialog box select “Use an external data source” and then in the Tables tab select “Tables in Workbook Data Model”. 4. (02:43 minute mark) No GROUPING BY DATE with data Model 5. (02:52 minute mark) PivotTable with Slicers Get Big Data Into Excel (Data Model). Millions of Rows into Data Model For PivotTable.
Views: 23459 ExcelIsFun
Part 8   SQL Query to find department with highest number of employees
 
04:03
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2014/06/part-8-sql-query-to-find-department.html Scenario asked in the SQL Server Interview Based on the above two tables write a SQL Query to get the name of the Department that has got the maximum number of Employees. To answer this question it will be helpful if you the knowledge of JOINS & GROUP BY in SQL Server. We discusses these in Parts 11 & 12 of SQL Server Tutorial video series. SQL query that retrieves the department name with maximum number of employees SELECT TOP 1 DepartmentName FROM Employees JOIN Departments ON Employees.DepartmentID = Departments.DepartmentID GROUP BY DepartmentName ORDER BY COUNT(*) DESC Scenario asked in the SQL Server Interview Based on the above two tables write a SQL Query to get the name of the Department that has got the maximum number of Employees. To answer this question it will be helpful if you the knowledge of JOINS & GROUP BY in SQL Server. We discusses these in Parts 11 & 12 of SQL Server Tutorial video series. SQL query that retrieves the department name with maximum number of employees SELECT TOP 1 DepartmentName FROM Employees JOIN Departments ON Employees.DepartmentID = Departments.DepartmentID GROUP BY DepartmentName ORDER BY COUNT(*) DESC
Views: 115007 kudvenkat
Part 6   Stored procedures with output parameters in LINQ to SQL
 
07:13
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2014/09/part-6-stored-procedures-with-output.html In this video, we will discuss how to call stored procedures with output parameters using LINQ to SQL. This is continuation to Part 5. Please watch Part 5 before proceeding. Step 1 : Create the stored procedure Create procedure GetEmployeesByDepartment @DepartmentId int, @DepartmentName nvarchar(50) out as Begin Select @DepartmentName = Name from Departments where ID = @DepartmentId Select * from Employees where DepartmentId = @DepartmentId End Use the following SQL to test the stored procedure Declare @DeptName nvarchar(50) Execute GetEmployeesByDepartment 1, @DeptName out Select @DeptName Step 2 : In Visual Studio, click on the "View" menu and select "Server Explorer". Right click on "Data Connection" and select "Refresh". Expand "Stored Procedures" folder. Here you should find "GetEmployeesByDepartment" stored procedure. Step 3 : Drag "GetEmployeesByDepartment" stored procedure from the Server Explorer window and drop it on the LINQ to SQL class designer. This will automatically create a method with the same name as the stored procedure. Step 4 : Drag and drop a button and a label control on the webform. For the button, change the following properties ID = lblDept Text="" For the button, change the following properties Text = Get Employees By Department ID = btnGetEmployeesByDepartment Double click the button control to generate the click event handler method. Step 5 : Finally in the code-behind file, call GetEmployeesByDepartment() method using the DataContext class instance. protected void btnGetEmployeesByDepartment_Click(object sender, EventArgs e) { using (SampleDataContext dbContext = new SampleDataContext()) { string deptName = string.Empty; GridView1.DataSource = dbContext.GetEmployeesByDepartment(1, ref deptName); GridView1.DataBind(); lblDept.Text = "Department = " + deptName; } }
Views: 26893 kudvenkat
Single Stored Procedure For Insert Update
 
36:42
This video is used for insert and update using single Stored Procedure.
Views: 39630 chandansinh darbar
Conceptual Introduction to Pipelining
 
07:20
A brief introduction to the concept of pipelining, using the laundry analogy, and then analyzing it to understand what pipelining does and does not achieve.
Views: 41545 CompArchIllinois
Part 19   Copying data from one table to another table using SqlBulkCopy
 
09:35
In this video we will discuss copying data from one table to another table. The source and destination tables may be in the same database or in different databases and these database can be on the same sql server or in different servers. In Part 18 we discussed, loading xml data into sql server table using sqlbulkcopy. We will be continuing with the example we worked with in Part 18. Step 1 : Create a new database. Name it SourceDB. Execute the following sql script to create Departments and Employees tables, and to populate with data. Create table Departments ( ID int primary key identity, Name nvarchar(50), Location nvarchar(50) ) GO Create table Employees ( ID int primary key identity, Name nvarchar(50), Gender nvarchar(50), DepartmentId int foreign key references Departments(Id) ) GO Insert into Departments values ('IT', 'New York') Insert into Departments values ('HR', 'London') Insert into Departments values ('Payroll', 'Muumbai') GO Insert into Employees values ('Mark', 'Male', 1) Insert into Employees values ('John', 'Male', 1) Insert into Employees values ('Mary', 'Female', 2) Insert into Employees values ('Steve', 'Male', 2) Insert into Employees values ('Ben', 'Male', 3) GO Step 2 : Create another new database. Name it DestinationDB. Execute the sql script to just create Departments and Employees tables. Here we have just the structre of the tables and no data. We will be moving data from SourceDB tables to DestinationDB tables. Step 3 : Include the following 2 connection strings for the Source and Destination databases in the web.config file of the Demo project we created in Part 18. [connectionStrings] [add name="SourceCS" connectionString="server=.;database=SourceDB;Integrated Security=True" providerName="System.Data.SqlClient" /] [add name="DestinationCS" connectionString="server=.;database=DestinationDB;Integrated Security=True" providerName="System.Data.SqlClient" /] [/connectionStrings] Step 4 : Copy and paste the following code in the button click event handler method in the code-behind file string sourceCS = ConfigurationManager.ConnectionStrings["SourceCS"].ConnectionString; string destinationCS = ConfigurationManager.ConnectionStrings["DestinationCS"].ConnectionString; using (SqlConnection sourceCon = new SqlConnection(sourceCS)) { SqlCommand cmd = new SqlCommand("Select * from Departments", sourceCon); sourceCon.Open(); using (SqlDataReader rdr = cmd.ExecuteReader()) { using (SqlConnection destinationCon = new SqlConnection(destinationCS)) { using (SqlBulkCopy bc = new SqlBulkCopy(destinationCon)) { bc.DestinationTableName = "Departments"; destinationCon.Open(); bc.WriteToServer(rdr); } } } cmd = new SqlCommand("Select * from Employees", sourceCon); using (SqlDataReader rdr = cmd.ExecuteReader()) { using (SqlConnection destinationCon = new SqlConnection(destinationCS)) { using (SqlBulkCopy bc = new SqlBulkCopy(destinationCon)) { bc.DestinationTableName = "Employees"; destinationCon.Open(); bc.WriteToServer(rdr); } } } } Note: Please make sure to include the following using declarations using System; using System.Configuration; using System.Data; using System.Data.SqlClient; As the column names in the source and destination tables are the same column mappings are not required. Text version of the video http://csharp-video-tutorials.blogspot.com/2014/09/part-19-copying-data-from-one-table-to.html Slides http://csharp-video-tutorials.blogspot.com/2014/09/part-19-copying-data-from-one-table-to_24.html All ADO .NET Text Articles http://csharp-video-tutorials.blogspot.com/p/free-adonet-video-tutorial.html All ADO .NET Slides http://csharp-video-tutorials.blogspot.com/p/adonet-slides.html All Dot Net and SQL Server Tutorials in English https://www.youtube.com/user/kudvenkat/playlists?view=1&sort=dd All Dot Net and SQL Server Tutorials in Arabic https://www.youtube.com/c/KudvenkatArabic/playlists
Views: 54832 kudvenkat
Part 12   Can we join two tables without primary foreign key relation
 
10:38
Link for all dot net and sql server video tutorial playlists http://www.youtube.com/user/kudvenkat/playlists Link for slides, code samples and text version of the video http://csharp-video-tutorials.blogspot.com/2014/09/part-12-can-we-join-two-tables-without.html Can we join two tables without primary foreign key relation Yes, we can join two tables without primary foreign key relation as long as the column values involved in the join can be converted to one type. ID column in Departments table is not the primary Key and DepartmentId column in Employees table is not the foreign key. But we can still join these tables using ID column from Departments table and DepartmentId column from Employees table, as both the columns involved in the join have same data type i.e int. Select Employees.Name as EmployeeName, Departments.Name as DepartmentName from Employees join Departments on Departments.ID = Employees.DepartmentId The obious next question is, if primary foreign key relation is not mandatory for 2 tables to be joined then what is the use of these keys? Primary key enforces uniqueness of values over one or more columns. Since ID is not a primary key in Departments table, 2 or more departments may end up having same ID value, which makes it impossible to distinguish between them based on the ID column value. Foreign key enforces referential integrity. Without foreign key constraint on DepartmentId column in Employees table, it is possible to insert a row into Employees table with a value for DepartmentId column that does not exist in Departments table. The following insert statement, successfully inserts a new Employee into Employees table whose DepartmentId is 100. But we don't have a department with ID = 100 in Departments table. This means this employee row is an orphan row, and the referential integrity is lost as result Insert into Employees values (8, 'Mary', 'Female', 80000, 100) If we have had a foreign key constraint on DepartmentId column in Employees table, the following insert statement would have failed with the following error. Msg 547, Level 16, State 0, Line 1 The INSERT statement conflicted with the FOREIGN KEY constraint. The conflict occurred in database "Sample", table "dbo.Departments", column 'ID'.
Views: 111311 kudvenkat
Java Eclipse GUI Tutorial 9 # Populate JTable data from database in java Eclipse and Sqlite
 
17:30
Donate to ProgrammingKnowledge -- (https://www.paypal.com/de/cgi-bin/webscr?cmd=_flow&SESSION=AW9N5aRI7sCqjlIusdmku9rz2uvuULZ6K580uDxTK7ElJs2LHDiLq-TQv0a&dispatch=5885d80a13c0db1f8e263663d3faee8def8934b92a630e40b7fef61ab7e9fe63) You have to download the rs2xml.jar file in order to populate the Jtable. I am providing you the link to download rs2xml.jar file below http://sourceforge.net/projects/finalangelsanddemons/ Jave Eclipse and Sqlite (mysql) populate or use jtable java netbeans and mysql populate jtable java - How to fill data in a JTable with database How to retrieve data from a jTable in Java Jtable Database Populate data from database into JTable in Netbeans populate JTable from database java - What is the best way to populate a JTable using MYSQL How To Fill Jtable Using Sql Select Statement? java - how to display all the data from the database to jtable? NetBeans Forums - jtable and report from mysql database How to set data from database to jtable? JTable how to fill with data How to Make a JTable in NetBeans how to fill data in jtable from database on button click in java Retrieving data in a JTable How to get data in MySQL table into Java JTable? How can I make a JTable cell do different things on single-click Values to be displayed in JTextfield when Clicked on JTable Cells. Click on JTable Model Updates JTextfield how can i get value from JTable and set it to textfield. Show data from JTable in Jtextfield Sharing document between JTable Cells and JTextFields get jtextfield from jtable iit Learn java netbeans java tutorial netbeans
Views: 181107 ProgrammingKnowledge
Java JDBC Tutorial - Part 3: Updating Data in a MySQL Database
 
03:11
NEED TO LEARN JAVA - 5 FREE JAVA VIDEO COURSES - CLICK HERE - https://goo.gl/7i95F8 --- View more videos on my "Java JDBC Tutorial" Playlist: http://goo.gl/crT4nS Closed-Captioning and English subtitles available. --- In this tutorial, you will learn how to update data in a MySQL database using Java JDBC. Download Source Code: http://www.luv2code.com/?p=746 Please subscribe to my channel. http://goo.gl/EV6Kwv ---- Follow luv2code: Website: http://www.luv2code.com YouTube: http://goo.gl/EV6Kwv Twitter: http://goo.gl/ALMzLG Facebook: http://goo.gl/8pDRdA --- Join my mailing list: Get advance notice on new tutorials. Emails about 1 per week. - http://www.luv2code.com/joinlist --- Questions or problems? Post them in the comments section below. --- Want to suggest a video? Leave a comment below. I'm always looking for new video ideas. Let me know what video you'd like for me to create. --- Video Transcript Time - 00:00 Hello. In this video, you will learn how to use Java JDBC to update data in a database. In regards to prep work, you must have a database installed. This demo will use MYSQL. You also need to have the database driver configured. Again, we'll use MYSQL. If you need help on how to do this, please look at my other video, Connecting To MYSQL Databases with Java. Time - 00:30 In this example, we will use the Employees table. This table has columns for employee ID, last name, first name and email address. Let's switch over to the MYSQL tool, so we can take a look at some of the data. Time - 00:50 Here's our sample table that we have with sample data already in place. What I'd like for you to do is make note of David Brown's email address. He is currently listed as [email protected] We're going to change this email address to make use of luv2code.com. Time - 01:13 His new email address is [email protected] The following sql can perform this update. We will use this sql update statement in a Java application. Time - 01:26 This slide outlines our Java development process. First, we will get a connection to the database. Then we will create a statement. Finally, we will execute the sql update statement. Let's move onto our development environment and get started. Time - 01:46 We're going to start with a simple Java program. The program is going to start out with the url, the connection to the database, the user ID and password. Time - 01:56 The first thing that we'll do is we will get a connection to the database. Then we will create a statement. Then we'll actually execute the sql query. This is the same query that we had from the previous slide. Time - 02:12 Then we'll actually do an execute update. This will actually send the query to the database and perform the update. Finally, just to give us some debugging information, we'll have a print-line statement to say update complete. Time - 02:27 Let's go ahead and run this application. Run as Java application. It says update complete. Great. Let's go to our SQL tool to verify the results. Time - 02:42 In the SQL tool, I just simply do a refresh and note the new email address for David Brown. It's now [email protected] That works out, and we're actually successful with updating data using Java JDBC. Time - 03:00 This wraps up the presentation. If you'd like to download the source code, please visit the website luv2code.com.
Views: 102705 luv2code
SQL Server - Query Table Record Data via TSQL - SELECT FROM
 
03:30
How to select records from SQL Server table. This select records tutorial covers the basics of select * versus selecting specific fields from a table.
Views: 135 Dave Merton
Objects and Member Functions
 
09:00
Discussing the concept of objects and member functions in c++
MSSQL - SSIS Understanding Input and Output Parameters OLEDB vs ADO
 
07:15
Microsoft SQL Server 2012 Visual Studio Business Intelligence Data Tools http://www.microsoft.com/en-us/download/details.aspx?id=36843 Github https://github.com/CodeCowboyOrg/SSISConcepts
Views: 4855 CodeCowboyOrg
MySQL VB.NET Tutorial 9 : How to Link Combobox with Database values
 
09:17
VB.Net: Filling a ComboBox with data stored in database how to bind combobox to textbox in VB.NET ComboBox and TextBox‎ VB.NET How to show combo box selected value in a text box‎ VB.NET selecting an item in combobox and display corresponding Populate combobox from database VB.NET How to get data in combobox from database? Populating a Combobox from a Dictionary beginner How to fill different ComboBoxes in a DataGridView VB.NET code add database column to datagridview combobox VB.NET Populate combobox from database beginner How to get data in combobox from database? Populating a Combobox from a Dictionary Visual Basic How to fill different ComboBoxes in a DataGridView code add database column to datagridview combobox Enter values into combobox from database‎ Visual Basic Enter values into combobox from database‎ VB.NET Retrive Data From Database Put Into A Combobox Visual Basic Saving New Selection From Combobox To SQL Database Set Datagridview Combobox Cell Value Database Connections And Combo Boxes
Views: 120434 ProgrammingKnowledge
SQL Server - Query Table Record Data via TSQL - MAX() and MIN() functions
 
01:45
How to use the MIN() and MAX() aggregate functions in TSQL. This tutorial covers both of these aggregate functions in a single query. It also covers how to name returned fields when using aggregate functions on field values.
Views: 235 Dave Merton
SQL Server - Query Table Record Data via TSQL - SELECT A + B  (concatenation example)
 
02:59
How to concatenate fields in a query. This tutorial covers not only how to concatenate two fields but also how to use the CAST() function to convert a numeric field into a text field.
Views: 539 Dave Merton
Initializer & Finalizer in taskflow --Oracle ADF
 
04:56
This video explain how to use initializer and finalizer in task flow in oracle adf
Views: 995 vinay kumar
How to insert multi tables in Oracle using Irwsoft Data Framework.
 
16:33
This video will show you how to insert multi values into multi tables on Oracle. Using Irwsoft Data Framework makes your job easier to do.

Qualify definition essay on friendship
Trifles stereotypes essay question
College admission essay about yourself
Lesson plan rationale essay
Five disciplines in change leadership framework essay