Home
Search results “Oracle select sql if”
PL/SQL tutorial 9: IF THEN ELSE (IF-ELSE) Statement in PL/SQL
 
04:12
3rd tutorial in the series explaining IF-THEN-ELSE statement in Oracle PL/SQL with Example. Enjoy ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog : http://bit.ly/if-then-else Previous Tutorial ► IF THEN Statement https://youtu.be/IWvuFD6eD30 ------------------------------------------------------------------------- ►►►Let's Get Free Uber Cab◄◄◄ Use Referral Code UberRebellionRider and get $20 free for your first ride. ------------------------------------------------------------------------- ►►►Help Me In Getting A Job◄◄◄ ►Help Me In Getting A Good Job By Connecting With Me on My LinkedIn and Endorsing My Skills. All My Contact Info is Down Below. You Can Also Refer Me To Your Company Thanks ------------------------------------------------------------------------- ►Make sure you SUBSCRIBE and be the 1st one to see my videos! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ►►►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 for E-mail address please check About section 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: 52557 Manish Sharma
IF Statements in Oracle PL SQL with example
 
07:40
Complete Oracle PL/SQL Tutorial for Beginners Playlist here https://www.youtube.com/playlist?list=PLI5t0u6ye3FE_9SZcS0cQZDU2qn0uB1Oi ************************************************** This Video shows how to use IF THEN , ELSIF THEN and ELSE Statements in Oracle with examples for Beginners.
Views: 1085 yrrhelp
CASE STATEMENT(IF THEN ELSE) IN ORACLE SQL WITH EXAMPLE
 
06:28
The case statement gives the if-then-else kind of conditional ability to the otherwise static sql select statement, This video demonstrates how to write an case statement in oracle sql, and explains different aspects of the case statement. The video explains the execution flow of the case statement and advises on the best way to write one.
Views: 1188 Kishan Mashru
CASE Function( IF..THEN..ELSE) in SQL ORACLE Query With Example
 
04:03
ORACLE/PLSQL: CASE STATEMENT The Oracle/PLSQL CASE statement has the functionality of an IF-THEN-ELSE statement. Starting in Oracle 9i, you can use the CASE statement within a SQL statement. The syntax for the Oracle/PLSQL CASE statement is: CASE [ expression ] WHEN condition_1 THEN result_1 WHEN condition_2 THEN result_2 ... WHEN condition_n THEN result_n ELSE result END --------- ARGUMENTS: expression is optional. It is the value that you are comparing to the list of conditions. (ie: condition_1, condition_2, ... condition_n) condition_1 to condition_n must all be the same datatype. Conditions are evaluated in the order listed. Once a condition is found to be true, the CASE statement will return the result and not evaluate the conditions any further. result_1 to result_n must all be the same datatype. This is the value returned once a condition is found to be true. NOTE: If no condition is found to be true, then the CASE statement will return the value in the ELSE clause. If the ELSE clause is omitted and no condition is found to be true, then the CASE statement will return NULL. You can have up to 255 comparisons in a CASE statement. Each WHEN ... THEN clause is considered 2 comparisons. 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 CASE. CASE deptno WHEN 10 THEN 'DEPT1' WHEN 20 THEN 'DEPT2' WHEN 30 THEN 'DEPT3' ELSE 'NO DEPT' END; Query used in Video: select empno,ename,deptno,CASE deptno WHEN 10 THEN 'DEPT1' WHEN 20 THEN 'DEPT2' WHEN 30 THEN 'DEPT3' ELSE 'No Dept' END from emp;
Views: 15196 WingsOfTechnology
PL/SQL tutorial 8: Simple IF -THEN conditional Control Statement By Manish Sharma RebellionRider
 
04:43
Learn the concept of simple IF THEN conditional control statement in Oracle PL/SQL by Manish Sharma RebellionRider.com ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog : http://bit.ly/simple-if-then-in-oracle Previous Tutorial ► https://youtu.be/aDBHco_VgMo ------------------------------------------------------------------------- ►►►Let's Get Free Uber Cab◄◄◄ Use Referral Code UberRebellionRider and get $20 free for your first ride. ------------------------------------------------------------------------- ►Make sure you SUBSCRIBE and be the 1st one to see my videos! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ►►►Find me on Social Media◄◄◄ Follow What I am up to as it happens on Snapchat : RebellionRider 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 for E-mail address please check the "About" section 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: 53634 Manish Sharma
SQL Server Programming Part 5 - IF Statements
 
13:17
If you'd like to help fund Wise Owl's conversion of tea and biscuits into quality training videos you can click this link https://www.wiseowl.co.uk/donate?t=1 to make a donation. Thanks for watching! By Andrew Gould https://www.wiseowl.co.uk - IF statements in SQL allow you to check if a condition has been met and, if so, to perform a sequence of actions. This video teaches you everything from the basic syntax of IF statements, including how to use the ELSE clause and perform multiple actions using a BEGIN and END block. We'll also teach you how to nest your IF statements, including a few useful tips on how to make your nested IFs readable! You can see more examples of IF in written form here: https://www.wiseowl.co.uk/blog/s340/if-else.htm You can download the script to create the Movies database used in this video at the following link: https://www.wiseowl.co.uk/files/execise-question-files/qf-898.zip You can see the range of resources and courses we offer in SQL Server here: https://www.wiseowl.co.uk/sql/ Visit www.wiseowl.co.uk for more online training resources in Microsoft Excel, Microsoft Access, Microsoft PowerPoint, Microsoft Word, Microsoft Project, Microsoft Publisher, Microsoft Visio, SQL Server, Reporting Services, Analysis Services, Visual Studio, ASP.NET, VB.NET, C# and more!
Views: 69480 WiseOwlTutorials
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: 5092 WingsOfTechnology
SQL tutorial 49: CASE - Simple Case Expression in Oracle Database (1/2)
 
06:34
Case expression let you perform IF-THEN-ELSE in oracle database. There are two type of case in oracle simple case expression and searched case expression. This SQL Tutorial 49 is about Simple Case Expression. ● What Is Case Expression ● Syntax of Simple Case Expression ● Query 1. Column name of a table as Search expression in CASE ● Query 2. String as Search expression in CASE Celebrating 1000 subscribers. Thanks a lot guys for all your love and support. ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog: http://bit.ly/simple-case-expression ------------------------------------------------------------------------- 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: 32860 Manish Sharma
Oracle PL/SQL - IF THEN ELSE Statement
 
04:57
http://plsqlzerotopro.com This tutorial explains IF THEN ELSE Statement.
Views: 10740 HandsonERP
Oracle PL/SQL Tutorial -  If Statements
 
05:08
Want all of our free Oracle videos? Download our free iPad app at http://itunes.apple.com/us/app/video-training-courses-from/id418130423?mt=8 http://www.infiniteskills.com/training/learning-oracle-pl-sql-programming.html This PLSQL tutorial explains If-statements and their central role in development. YouTube: https://www.youtube.com/user/OreillyMedia Facebook: https://www.facebook.com/OReilly/?fref=ts Twitter: https://twitter.com/OReillyMedia Website: http://www.oreilly.com/
PL/SQL tutorial 10: PL/SQL IF THEN ELSIF Statement in Oracle Database by Manish Sharma
 
04:55
Watch and learn IF THEN ELSIF (ELSIF ladder)statement in PL/SQL by Manish Sharma RebellionRider.com ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog : http://bit.ly/if-then-elsif Previous Tutorial ► IF-ELSE https://youtu.be/IWsY_HzufKw ►Simple Case: https://youtu.be/DMlDwOmqAzo ►Searched Case: https://youtu.be/jk7k4TDs3F0 ►DECODE: https://youtu.be/lKXqXINCNLo ------------------------------------------------------------------------- ►►►Let's Get Free Uber Cab◄◄◄ Use Referral Code UberRebellionRider and get $20 free for your first ride. ------------------------------------------------------------------------- ►Make sure you SUBSCRIBE and be the 1st one to see my videos! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ►►►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 for E-mail address please check About section 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: 43099 Manish Sharma
CASE AND DECODE  | ORACLE/SQL
 
35:22
Decode Function and Case Statement both works as a if then else statement...
Views: 2454 Adam Tech
Oracle Database11g tutorials 5:  how to retrieve Data Using SQL SELECT statement || SQL tutorials
 
05:13
This SQL tutorial and Oracle database 11g tutorial for beginners will show how to retrieve data using SQL SELECT statement. 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 You can download the Script which is used in this SQL tutorial from this link https://copy.com/yDQ46Tb64efm 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: 182962 Manish Sharma
Oracle PL/SQL - IF THEN ELSIF Statement
 
09:07
http://plsqlzerotopro.com This tutorial explains IF THEN ELSE IF statement.
Views: 6309 HandsonERP
Oracle PL/SQL - IF THEN Statement
 
06:00
http://plsqlzerotopro.com This tutorial explains conditional processing using IF-THEN statement.
Views: 7105 HandsonERP
4  merge statement
 
18:16
Video from our Oracle SQL course. Check out the full course at.. http://learn.hackpress.co/courses/oracle-sql-learning-by-example
Views: 11687 etldeveloper
PL-SQL Condition Statement - IF Then, If Then else, CASE Statement
 
08:25
PL-SQL Condition Statement - IF Then, If Then else, CASE Statement PL-SQL tutorial for Beginners in Hindi and English
Four Steps to Oracle SQL Tuning  - A Methodolgy
 
02:43
Learn a predictable and repeatable methodology for tuning Oracle SQL statements. Just four steps that you should always follow when tuning an SQL statement. (Note this video does not contain examples of how to apply the four steps, just what the steps are.) Oracle Certified Master John Watson presents. John concludes with a brief overview of how SkillBuilders SQL tuning course provides the information you need to apply the four steps. Learn more about SkillBuilders SQL Tuning course http://skillbuilders.com/oracle-sql-tuning-training 1. What is Oracle doing? (explain plan, trace) 2. Why is Oracle doing it that way? (analyze the execution plan) 3. Is there a better way? Test! 4. If there's a better way, push the CBO towards the better way.
Views: 9571 SkillBuilders
PL/SQL tutorial IF THEN ELSE (IF-ELSE) Statement in PL/SQL
 
04:07
This video is about pl sql basics,pl sql basic programs,basic pl sql programs,oracle pl sql basics,pl sql basics with examples,basic pl sql,basic pl sql queries,basics of pl sql,pl sql basics tutorial,pl sql basic concepts,basic pl
Views: 128 Nayabsoft
SQL: WITH Clause
 
06:11
In this tutorial, you'll learn will learn how to use with clause PL/SQL (Procedural Language/Structured Query Language) is Oracle Corporation's procedural extension for SQL and the Oracle relational database. PL/SQL is available in Oracle Database (since version 7), TimesTen in-memory database (since version 11.2.1), and IBM DB2 (since version 9.7).[1] Oracle Corporation usually extends PL/SQL functionality with each successive release of the Oracle Database. PL/SQL includes procedural language elements such as conditions and loops. It allows declaration of constants and variables, procedures and functions, types and variables of those types, and triggers. It can handle exceptions (runtime errors). Arrays are supported involving the use of PL/SQL collections. Implementations from version 8 of Oracle Database onwards have included features associated with object-orientation. One can create PL/SQL units such as procedures, functions, packages, types, and triggers, which are stored in the database for reuse by applications that use any of the Oracle Database programmatic interfaces. PL/SQL works analogously to the embedded procedural languages associated with other relational databases. For example, Sybase ASE and Microsoft SQL Server have Transact-SQL, PostgreSQL has PL/pgSQL (which emulates PL/SQL to an extent), and IBM DB2 includes SQL Procedural Language,[2] which conforms to the ISO SQL’s SQL/PSM standard. The designers of PL/SQL modeled its syntax on that of Ada. Both Ada and PL/SQL have Pascal as a common ancestor, and so PL/SQL also resembles Pascal in several aspects. However, the structure of a PL/SQL package does not resemble the basic Object Pascal program structure as implemented by a Borland Delphi or Free Pascal unit. Programmers can define public and private global data-types, constants and static variables in a PL/SQL package.[3] PL/SQL also allows for the definition of classes and instantiating these as objects in PL/SQL code. This resembles usage in object-oriented programming languages like Object Pascal, C++ and Java. PL/SQL refers to a class as an "Abstract Data Type" (ADT) or "User Defined Type" (UDT), and defines it as an Oracle SQL data-type as opposed to a PL/SQL user-defined type, allowing its use in both the Oracle SQL Engine and the Oracle PL/SQL engine. The constructor and methods of an Abstract Data Type are written in PL/SQL. The resulting Abstract Data Type can operate as an object class in PL/SQL. Such objects can also persist as column values in Oracle database tables. PL/SQL is fundamentally distinct from Transact-SQL, despite superficial similarities. Porting code from one to the other usually involves non-trivial work, not only due to the differences in the feature sets of the two languages,[4] but also due to the very significant differences in the way Oracle and SQL Server deal with concurrency and locking. There are software tools available that claim to facilitate porting including Oracle Translation Scratch Editor,[5] CEITON MSSQL/Oracle Compiler [6] and SwisSQL.[7] The StepSqlite product is a PL/SQL compiler for the popular small database SQLite. PL/SQL Program Unit A PL/SQL program unit is one of the following: PL/SQL anonymous block, procedure, function, package specification, package body, trigger, type specification, type body, library. Program units are the PL/SQL source code that is compiled, developed and ultimately executed on the database. The basic unit of a PL/SQL source program is the block, which groups together related declarations and statements. A PL/SQL block is defined by the keywords DECLARE, BEGIN, EXCEPTION, and END. These keywords divide the block into a declarative part, an executable part, and an exception-handling part. The declaration section is optional and may be used to define and initialize constants and variables. If a variable is not initialized then it defaults to NULL value. The optional exception-handling part is used to handle run time errors. Only the executable part is required. A block can have a label. Package Packages are groups of conceptually linked functions, procedures, variables, PL/SQL table and record TYPE statements, constants, cursors etc. The use of packages promotes re-use of code. Packages are composed of the package specification and an optional package body. The specification is the interface to the application; it declares the types, variables, constants, exceptions, cursors, and subprograms available. The body fully defines cursors and subprograms, and so implements the specification. Two advantages of packages are: Modular approach, encapsulation/hiding of business logic, security, performance improvement, re-usability. They support object-oriented programming features like function overloading and encapsulation. Using package variables one can declare session level (scoped) variables, since variables declared in the package specification have a session scope.
Views: 9624 radhikaravikumar
PL/SQL tutorial 11: PL/SQL Simple Loop in Oracle Database by Manish Sharma RebellionRider.com
 
04:21
First tutorial in Iterative statement series explaining concepts of Simple Loop in PL/SQL With a quick brief intro of Loops in Oracle PL/SQL ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog : http://bit.ly/simple-loop Previous Tutorial ► IF-THEN : https://youtu.be/IWvuFD6eD30 ► Simple CASE Statement https://youtu.be/DMlDwOmqAzo ► Searched CASE Statement https://youtu.be/jk7k4TDs3F0 ► DECODE Statement https://youtu.be/lKXqXINCNLo ------------------------------------------------------------------------- ►►►Let's Get Free Uber Cab◄◄◄ Use Referral Code UberRebellionRider and get $20 free for your first ride. ------------------------------------------------------------------------- ►Make sure you SUBSCRIBE and be the 1st one to see my videos! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ►►►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 for E-mail address please check About section 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: 55250 Manish Sharma
PL/SQL tutorial 3: SELECT INTO statement in PL/SQL by Manish Sharma RebellionRider
 
05:22
How to initialize the variable by fetching values from the table of the database or by using SELECT INTO statement in PL/SQL by Manish Sharma RebellionRider ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog : http://bit.ly/select-into-statement-pl-sql Previous Tutorial ► Variables: https://youtu.be/2MNmodawvnE ------------------------------------------------------------------------- ►►►Let's Get Free Uber Cab◄◄◄ Use Referral Code UberRebellionRider and get $20 free for your first ride. -------------------------------------------------------------------------- ►Make sure you SUBSCRIBE and be the 1st one to see my videos! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ►►►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 for E-mail address please check About section 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: 102537 Manish Sharma
Introduction to Oracle: PL-SQL - IF ... ELSIF ... ELSE Statement
 
04:28
Introduction to Oracle: PL-SQL - IF ... ELSIF ... ELSE Statement
Views: 333 David Hays
PL/SQL tutorial | Cursor in Oracle Database 11g Complete guide
 
13:50
Learn in depth about cursor in oracle database 11g, and why to use cursor.Writing Implicit cursor and explicit cursor following using 'for loop' inside cursor to fetch multiple records from oracle database. Cursor in Oracle Cursor in PL/SQL Oracle Cursor PL/SQL Cursor What is cursor in PL/SQL How to use cursor in PL/SQL Implicit cursor in PL/SQL Explicit cursor in PL/SQL A cursor is a pointer to this context area. PL/SQL controls the context area through a cursor. A cursor holds the rows (one or more) returned by a SQL statement. The set of rows the cursor holds is referred to as the active set. Implicit Cursors Implicit cursors are automatically created by Oracle whenever an SQL statement is executed, when there is no explicit cursor for the statement. Programmers cannot control the implicit cursors and the information in it. %FOUND Returns TRUE if an INSERT, UPDATE, or DELETE statement affected one or more rows or a SELECT INTO statement returned one or more rows. Otherwise, it returns FALSE. %NOTFOUND The logical opposite of %FOUND. It returns TRUE if an INSERT, UPDATE, or DELETE statement affected no rows, or a SELECT INTO statement returned no rows. Otherwise, it returns FALSE. %ISOPEN Always returns FALSE for implicit cursors, because Oracle closes the SQL cursor automatically after executing its associated SQL statement. %ROWCOUNT Returns the number of rows affected by an INSERT, UPDATE, or DELETE statement, or returned by a SELECT INTO statement. Explicit Cursors Explicit cursors are programmer-defined cursors for gaining more control over the context area. An explicit cursor should be defined in the declaration section of the PL/SQL Block. It is created on a SELECT Statement which returns more than one row Linkedin: https://www.linkedin.com/in/aditya-kumar-roy-b3673368/ Facebook: https://www.facebook.com/SpecializeAutomation/
Views: 1720 Specialize Automation
SQL Case When Queries SQL Server / Oracle / Sybase
 
05:44
SQL Server Management Studio - Case when statements, great for altering cells from a data warehouse when you do not have the actual ability to physically update the cells. Get SQL Server 2008R2 Express with All Reporting and BI Tools Free from Microsoft - The only thing different in Express is a 4Gig Ram limit on processing and no Database Engine Tuning Advisor! http://www.microsoft.com/download/en/details.aspx?id=25174
PL/SQL tutorial 7: Introduction to PL/SQL Conditional Statements in Oracle Database
 
01:25
1st PL/SQL tutorial in Conditional Control Statements In Oracle PL/SQL. In this tutorial you will learn what are control statements and their types such as IF statements and Case Statements in PL/SQL also their differents forms such as IF THEN, IF THEN ELSE and IF THEN ELSEIF ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog : http://bit.ly/control-statements-intro-pl-sql Previous Tutorial ► Simple CASE https://youtu.be/DMlDwOmqAzo ► Searched CASE https://youtu.be/jk7k4TDs3F0 ------------------------------------------------------------------------- ►►►Let's Get Free Uber Cab◄◄◄ Use Referral Code UberRebellionRider and get $20 free for your first ride. ------------------------------------------------------------------------- ►►►Help Me In Getting A Job◄◄◄ ►Help Me In Getting A Good Job By Connecting With Me on My LinkedIn and Endorsing My Skills. All My Contact Info is Down Below. You Can Also Refer Me To Your Company Thanks ------------------------------------------------------------------------- ►Make sure you SUBSCRIBE and be the 1st one to see my videos! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ►►►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 for E-mail address please check About section 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: 53192 Manish Sharma
EXIST Function in SQL
 
08:04
Join Discussion: http://www.techtud.com/video-lecture/exist-function-sql IMPORTANT LINKS: 1) Official Website: http://www.techtud.com/ 2) Virtual GATE: http://virtualgate.in/login/index.php Both of the above mentioned platforms are COMPLETELY FREE, so feel free to Explore, Learn, Practice & Share! Our Social Media Links: Facebook Page: https://www.facebook.com/techtuduniversity Facebook Group: https://www.facebook.com/groups/virtualgate Google+ Page: https://plus.google.com/+techtud/posts Last but not the least, SUBSCRIBE our YouTube channel to stay updated about the regularly uploaded new videos.
Views: 29658 Techtud
SQL tutorial 50: CASE - Searched Case Expression In Oracle (2/2)
 
05:52
Case expression let you perform IF-THEN-ELSE in oracle database. There are two type of case in oracle simple case expression and searched case expression. This SQL Tutorial 49 is about Simple Case Expression. ●Intro Of searched Case expression ● Syntax of SearchedCase Expression ● Query 1. Searched Case expression With logical operator using 2 columns ● Query 2. Searched Case Expression with Comparison operators and BETWEEN and IN operators. 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: 24187 Manish Sharma
Oracle SQL Tutorial 10 - Whitespace, Case Sensitivity, and Comments
 
07:48
SELECT "Hello World" FROM DUAL The first thing you should know about writing queries is that this SQL is not whitespace sensitive. That means we can space this out however we wish. The only requirement is that you do not separate keywords out with spaces. They must be as one entity. Another gotcha is that when you are inside of quotes, whitespace becomes very important. That means if inside of a string you put a character and then 10 spaces, every single one of those spaces is going to part of that string: SELECT "Hello World" FROM DUAL The next thing you should notice is the capitalization. When we type SQL, by convention we capitalize all keywords. I personally really like this because you can easily see the difference between keywords and words that we created or use. But obviously we could capitalize the letters in the quotes. Keep in mind that this is a convention, meaning you do not have to follow this. Oracle is also case insensitive in that SELECT and select both do the same thing. Strings, once again, care about casing. Take this, for example: SELECT 'true' FROM DUALWHERE 'Hello' = 'Hello' And compare the results to this: SELECT 'true' FROM DUALWHERE 'Hello' = 'hello' Only the first one outputs the value true. Once we get into creating database objects such as tables with columns, those are not case sensitive either. That means instead of selecting from DUAL, you can select from DuAl Finally, I shall introduce you to comments. Comments allow you to tell the database engine that you want it to ignore a certain part of your code and not execute it. This is helpful if you want to document your code. It is also useful if you want to have multiple SQL statements open in one tab, but don't want to hover over the one you want to execute. You can comment out the ones you are not using and uncomment them when you are done. Using – will comment out the rest of the line, Using /* */ will comment everything between. This can even be used over multiple lines. But now, let's move onto the important stuff… CREATING TABLES!!!!! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HELP ME! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://eepurl.com/-8qtH Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - https://www.dreamhost.com/r.cgi?1487063 (The best web hosting for a cheap price!)
Views: 11995 Caleb Curry
Best Way to Write Basic SQL Queries
 
13:33
SQL Server Query writing strategies is something I have yet to find in any book. When enthusiastic SQL students do this, they experience a revelation. The number of errors drops significantly and the speed at writing complex queries increases immediately. Knowing how to narrow down what we are looking for amongst a vast list of choices helps immensely. Grabbing the right tables first and then the fields second is akin to grabbing the right menu before ordering an item from it. In fact, one student named Tim took this back to his team of SQL developers and they immediately implemented this process. We are all used to following steps. Most of the time, actions are sequential from top to bottom or left to right. Other times we complete things in phases. The two phases we are going to use in this exercise apply to joining tables. This is easy to implement as we only need remember to organize first and clean up second. When visiting a new restaurant, we will ask to see the menu, because we want to see all they have to offer. The odds are that we might be interested in half of the items, but only need a few dishes for our group at the table. Looking at the menu is like starting a query with a ‘SELECT *’ statement. Once we have looked at all the fields, we narrow our choice(s) to only the items we want at the time. Sometimes restaurants have multiple menus. My favorite restaurant has a kids’ menu, an adult menu, a gluten-free menu and a drink menu. These menus were each gathered at our table. Ultimately, in my head, a selection was narrowed to what was needed. Phase I: Organize. When building a new query from many tables, we often find ourselves wondering, “Where do I start?” First, lay the steps out by identifying which tables contain the essential data. Second, get all the table joins working with a basic ‘SELECT *’ statement. Third, add any basic filtering criteria. Phase II: Itemize. Once all joins and criteria, such as SELECT, FROM and WHERE are working, we are ready for Phase II. This entails going back and changing our ‘SELECT *’ to an itemized SELECT field list as the final step. Let’s explore how this two-phase process of Organize and then Itemize can be a big time-saver. We are going to use one of the challenges from the last lab. In Lab 3.2 (Outer Joins), Skill Check 2, we needed to get four fields from two different tables. If we were to list all four desired fields and test one table at time, we will get an error as seen on the right side of the figure below. In the figure below we write a SELECT statement and part of the FROM clause. When completed, the FROM clause will have two tables, but for now we just want to get the Location table working. By using the ‘SELECT *’ strategy, we remove any possible errors from line 1. From there, we can focus on the more complicated logic used for joining tables together. We can add tables one at a time until everything is working. This is the Organize phase. NOTE: SELECT * never results in an Error message stating “invalid column name”, however; a SELECT list with itemized field(s) can have this error. After our query is organized and working, we can go back and itemize the SELECT field list to display only the fields that are necessary. This is done during Phase II (Itemize). The steps for this system are broken down as follows: Since SELECT is always the first statement in a query, it’s natural to want to write the field names before writing the FROM clause. However; we can save time and trouble by using the ‘*’ until the entire query is working properly. When this is complete, it is very easy to itemize the field list, with the confidence of knowing it will not cause any problems. Exercise: Simple membership for a club: Table1 (id_Member,name_Member, email_member, title, age, company) Table2 (id_Club,club_name, club_Location, address) Table3 (id_club, id_member,membership_date) Q1: Show all member names, email, age, and company from Table1 Q2: Show all club name, location, and address data Q3: Show member name, club name, club location (hint: Use joins and all 3 tables) You can find all other classes related to this video here: http://www.joes2pros.com/joes2pros/Course/Introduction_To_Microsoft_SQL_Server Enroll Today & Get the First Month for only $1! Use code: YOUTUBE1
Views: 156899 Joes2Pros SQL Trainings
Lesson 9 - Query Filtering & Operator Precedence (Oracle SQL Certification)
 
19:55
Take the Complete Course at: www.jobreadyprogrammer.com Achieve the Master Programmer Certification! In this lesson we cover query filtering conditions & operator precedence
Views: 1904 Imtiaz Ahmad
Finding Database Columns By Name in Oracle SQL Developer
 
05:11
How to find all columns in your Oracle Database by searching on the name.
Views: 4497 Jeff Smith
Oracle SQL Video Tutorial 26 - CASE Statements
 
05:59
Oracle SQL Video Tutorials 26 - CASE Statements explained.In This Oracle SQL Tutorial for Beginners, I have explained basics of SQL.These examples work on Oracle 10g and Oracle 11g database. These helps youto understand Oracle Joins and helps beginners. Iam going to add more tutorials on Oracle DBA, Oracle RAC and Oracle PL/SQL.All Oracle sql tutorial with examples are executed on Oracle 11g using Oracle SQL Developer.
Views: 5021 Just Channel
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: 73087 Manish Sharma
Oracle  || Case statement in PL/SQL by Siva
 
07:22
DURGASOFT is INDIA's No.1 Software Training Center offers online training on various technologies like JAVA, .NET , ANDROID,HADOOP,TESTING TOOLS , ADF, INFORMATICA,TABLEAU,IPHONE,OBIEE,ANJULAR JS, SAP... courses from Hyderabad & Bangalore -India with Real Time Experts. Mail us your requirements to [email protected] so that our Supporting Team will arrange Demo Sessions. Ph:Call +91-8885252627,+91-7207212428,+91-7207212427,+91-8096969696. http://durgasoft.com http://durgasoftonlinetraining.com https://www.facebook.com/durgasoftware http://durgajobs.com https://www.facebook.com/durgajobsinfo............
Oracle tutorial : User Defined Exception in Oracle PL SQL
 
05:59
Oracle tutorial: User Defined Exception in Oracle PL SQL pl sql exception handling pl sql exception handling examples This video will show you how to raise user defined exceptions in oracle. Example: BEGIN IF condition THEN RAISE exception_name; END IF; EXCEPTION WHEN exception_name THEN statement; END; 1)We can defined exception to make your own exception. 2)This exception must be declare yourself and RAISE statement to raise explicitly. Declare exception : user_define_exception_name EXCEPTION; RAISE exception : RAISE user_define_exception_name; How to use : WHEN user_define_exception_name THEN //User Action lets see an example DECLARE exception1 EXCEPTION; g NUMBER; BEGIN FOR g IN (SELECT * FROM EMPLOYEE) LOOP IF g.ID = 7 THEN RAISE exception1; END IF; END LOOP; EXCEPTION WHEN exception1 THEN dbms_output.put_line(‘WE HAVE FOUND EMPLOYEE NUMBER 7’); END; / Subscribe on youtube: https://www.youtube.com/channel/UCpiyAesWNYOXSz5GPq8lbkA For more tutorial please visit #techquerypond https://techquerypond.com https://techquerypond.wordpress.com https://twitter.com/techquerypond
Views: 163 Tech Query Pond
SQL for Beginners. Learn basics  of SQL in 1 Hour
 
57:13
SQL is a special-purpose programming language designed for managing data in a relational database, and is used by a huge number of apps and organizations. Buy SQL Books from Amazon at http://amzn.to/2tQcrXf Watch this Video to learn basics of SQL. This Video covers below topics about SQL. 0:01 What is SQL? 2:07 Creating a Table and Inserting Data 5:52 Querying The Table 8:03 Aggregating Data 11:24 Queries with AND OR 15:59 Querying IN subqueries 21:22 Restricting Grouped Results with HAVING 25:52 Calculating results with CASE 31:51 JOINing tables 37:15 Joining related tables with left outer joins 41:21 Changing Rows with UPDATE and DELETE 45:54 ALTERing tables after creation 49:51 Joining tables to themselves with self joins 53:50 Combining multiple joins By watching this Video we can learn how to use #SQL to store, query, and manipulate data. And, you can watch the original interactive talk-through on Khan Academy, where you can pause and edit the code and see the code in better resolution at https://www.khanacademy.org/computing/computer-programming/sql or learn SQL from http://www.w3schools.com/sql/sql_intro.asp I created this video with the YouTube Video Editor (http://www.youtube.com/editor) with creative commons permission videos provided by Khan Academy Computer Science Basic SQL Questions and Answers http://learnwebdevelopment.info/2017/11/basic-sql-questions-and-answers/ ****************************************************************** Amazon: https://www.amazon.com/shop/rajamanickamantonimuthu Twitter: https://twitter.com/rajamanickam_a LinkedIn: https://www.linkedin.com/in/qualitypoint/ ******************************************************************
Views: 1660523 Rajamanickam Antonimuthu
Oracle PL/SQL - Multiple ELSIF Clauses
 
06:57
http://plsqlzerotopro.com This tutorial explains multiple ELSIF clauses in an IF statement.
Views: 5338 HandsonERP
Oracle Database11g tutorials 11: SQL case manipulation function in Oracle Database
 
04:38
Part 2 SQL functions- character function -case manipulation functions Previous Video Link :: http://youtu.be/5rx8Q4x4-qI 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 discuss in last video we have 3 case manipulation functions. In case you miss the SQL functions intro video you can find the link in the description below. First let's see what these functions are. Upper (): This function takes a parameter converts it into uppercase and returns the new string. Initcap (): this function also takes parameter and converts the initial letter of or parameter into uppercase and returns the new string. Lower (): This function takes a parameter converts it into lowercase and returns the new string. Ok let's do some practical For this practical we will be using 2 tables First is dual table Which is a dummy table provided by oracle? And I have created another table again by the name of example. This will be our second table. Let's start with SQL function upper ( ); SELECT upper('hello world') FROM dual; As you can see I have used "hello world" completely in lowercase as parameter to SQL upper function. Execute it. Here, our result has given us a completely new hello world string which is in uppercase. Similarly you can also use SQL upper function to perform other DML Let's try This time we will work on our second table EXAMPLE; insert into example values (upper('manish')); first parentheses for values and second for SQL function upper. Let's check the result. As you can see here inserted value is in upper case. Lets compare it with simple insert query Insert into example values ('manish'); Execute it, i think now it's clear that when we perform simple insert DML the inserted value will be the same you provide. Similarly let's try SQL function initcap(); SELECT initcap('hello world') FROM dual; As you see here in result the initial letters of string hello world are in uppercase. Let's do the insert query insert into example values (initcap('hello world')); initial letters of string also are in uppercase. Let's try SQL function lower(); This time we have to write our hello world in all caps. SELECT lower('HELLO WORLD') FROM dual; Execute String totally in lower case. Similarly you can user SQL function lower in other DML like insert and all.
Views: 80490 Manish Sharma
Using Oracle to read data from SQL Server
 
10:47
Hi everyone, Andy from Easysoft Limited here, what I want to show you today is how to get data from SQL Server into Oracle. Now for this we will be accessing SQL Server 2014 from Oracle 12 and getting data across. This could be quite easily be any SQL Server version from 2008 and any Oracle version from 11.2, the configuration and process is the same. We can obviously get access to data on SQL Server prior to 2008 and Oracle prior to version 11.2 but it will need a different configuration to what I am going to show you today The plan is also to add more data to the SQL Server table and show this new data back in Oracle. To start off you'll need access to ensure that you have access to your SQL Server and Oracle databases. You'll also need the Easysoft SQL Server ODBC Driver available from www.easysoft.com; just download it, install it and request the free 14 day trial licence. Before we start we need to make some changes to the standard Easysoft config files. cat /etc/odbc.ini Here I have changed Mars Connection to Yes. It must be set to "Yes" if you are connecting to SQL Server 2005 or newer. Easysoft supports all SQL data types from the version of SQL Server from version 7. Oracle supports data types that are common to most ODBC Drivers, but not some of the SQL Server ones. If you intend to access VARCHAR(MAX) for example, then there are some additional settings that need to be set up. Now as I would like to show you VARCHAR(MAX) data moving from SQL Server to Oracle, I have made the relevant change. As you can see, VarMaxAsLong says "Yes" We now need to create a link from Oracles Database Gateway (DG4ODBC) to the ODBC datasource that we already have, this is done in an init(sid) oracle file; let's have a look at our file. cat $ORACLE_HOME/hs/admin/initsqlsrv.ora Please note that HS_NLS_NCHAR must be set to UCS2 Oracle assume that most database vendors use UTF-8 for wide characters, however Easysoft, like almost all ODBC Driver vendors (including Oracles own ODBC Driver) uses UCS2 for wide characters. So that's the link between DG4ODBC and the datasource setup correctly. Next we need to set up the Listener entry The Oracle Listener waits for incoming requests from the Oracle database. For the Oracle Listener to listen for requests, information about DG4ODBC must be added to the Oracle Listener configuration file, listener.ora cat $ORACLE_HOME/network/admin/listener.ora The PROGRAM=dg4odbc tells the Listener that we are wanting to use the Oracle database gateway to communicate with ODBC. The ENVS=LD_LIBRARY_PATH tells Oracle what library to load Now that's all set up and OK we need to tell Oracle which server to attach the listener entry to. This is done in tnsnames.ora, and he is the file that we ensured was set up earlier. cat $ORACLE_HOME/network/admin/tnsnames.ora The Oracle Listener now needs to be restarted. lsnrctl stop lsnrctl start OK, that's now started the Listener up again. So we have ensured that all the configuration files are set up correctly. The Listener and tnsnames.ora both set up OK. The final step is to create a link from the Oracle database to the "tnsnames.ora" entry. CREATE PUBLIC DATABASE LINK ODBC CONNECT TO "test" IDENTIFIED BY "test" USING 'sqlsrv_ptr'; Right, that's all done. Let's access the data in SQL Server now. select * from [email protected]; Where 'demo' is the name of the SQL Server table and 'odbc' is the public database link name. OK, there we have the data. So to recap, I'm in Oracle and we have managed to read the data from SQL Server. Let's just add an additional row in that SQL Server table and retrieve the new data in Oracle. quit; /usr/local/easysoft/unixODBC/bin/isql.sh -v sqlsrv insert into demo values (2,'Easysoft') select * from demo select * from [email protected]; And there is the new data. Easysoft Limited can help you with your data access ... for our full range of ODBC and JDBC Drivers, Bridges and Gateways visit easysoft.com Be sure to let us know if you have any comments or questions. Until next time, thanks again and we'll see you again soon.
Views: 14675 Easysoft Limited
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: 247838 kudvenkat
SQL tutorial 60: SQL View in Oracle Database By Manish Sharma RebellionRider
 
07:30
SQL View in Oracle Database. In this tutorial you will learn how to create a vie as well as how to replace a view along with the examples of all the DML e.g. DESCRIBE, SELECT, UPDATE, INSERT and Delete on view by Manish Sharma RebellionRider ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog : http://bit.ly/sql-view-in-oracle-database Previous Tutorial ► Tut 5: SELECT statement http://youtu.be/f_mVBVgnqmM ------------------------------------------------------------------------- ►►►Help Me In Getting A Job◄◄◄ ►Help Me In Getting A Good Job By Connecting With Me on My LinkedIn and Endorsing My Skills. All My Contact Info is Down Below. You Can Also Refer Me To Your Company Thanks ------------------------------------------------------------------------- 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 1st 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: 37356 Manish Sharma
PL-SQL tutorial 25 - How to use Multiple IF-ELSIF-ELSE
 
05:46
Hi guys today i am going to explain about Selection Control Structure IF-ELSIF-ELSE in PL/SQL how to write a code in condition. Oracle database Unbeatable,Unbreakable Platform..
Views: 239 Oracle World
Introduction to Oracle: PL-SQL - Assigning a Value to a Variable with a Query
 
04:38
Introduction to Oracle: PL-SQL - Assigning a Value to a Variable with a Query
Views: 543 David Hays
PL/SQL Construct IF/ELSE
 
07:16
This is my Oracle PL/SQL Construct program tutorial where i am using in one of query IF then ELSE statements
Views: 28 Muhammad ismail