Home
Search results “Oracle is not numeric sql”
Check if Value is Numeric by using ISNUMERIC & TRY_Convert Function in SQL Server - TSQL Tutorial
 
13:38
How to Determine if value is Numeric by using ISNumeric and Try_Convert Function in SQL Server - TSQL Tutorial ISNUMERIC( ) function is provided to us in SQL Server to check if the expression is valid numeric type or not. As per Microsoft it should work with Integers and Decimal data types and if data is valid integer or decimal, ISNumeric() should return us 1 else 0. But ISNUMERIC() does not work as expected with some of values specially when we have "-" or "d" in value and have two numbers after "d" such as 123d22, it still return us 1. Also if we have data in money format $XXXXX e.g $2000, It returns us 1. In SQL Server 2012. Microsoft introduced new function call Try_Convert( ). You can use try_convert function to convert to required data type and if it is not able to convert then it will return Null as output. As you will see below, I did some experiment and found out that Try_Convert will produce 0 for "-" when we try to convert to Int, That should not be happening as "-" is symbol not Integer. But when I try to convert "-" to decimal, Try_Convert produced Null output. Take a look in below results and keep in mind the outputs when you have to evaluate expression to Numeric or find out if expression is Numeric or Not. Blog post link for this video http://sqlage.blogspot.com/2015/03/how-to-determine-if-value-is-numeric-by.html
Views: 3716 TechBrothersIT
Oracle SQL Tutorial 33 - NUMBER Data Type
 
07:18
This video we are going to discuss the NUMBER data type. The Number data type is used to store integers, and real numbers. When you create a column as a NUMBER, you can store pretty huge or pretty small numbers in this column. Now there are two things you need to consider when working with numbers, and that is the precision as well as the how big the number is. For example, we can store the number 9.9. This has two significant digits. We could also store the number 9.9 X 10^4. In this situation, the number is much larger, but the number of significant digits is the same. 9.9 are the significant digits. When we expand this out we just have 99000, and the zeros are just used for size and are not considered "significant" in this situation. In fact, you get a max precision of 38, but a maximum value of 9.99 * 10^125. You can also use this data type to store very small numbers. Check the docs for the specifics on maximums and minimums. You can provide it with two pieces of information: Precision - The total number of digits. Scale - The number of digits to the right of the decimal. You do it in this format: NUMBER (precision, scale). The important thing to remember in this is that when you specify a precision, you will be limiting the max size of the numbers. The secret behind this data type is that it is actually stored in scientific notation. That is we store a number and then we can multiply it by 10 raised to some power. This allows us to store much larger numbers without taking up a ton of space. The oracle docs actually gives a formula that you can use to see how much storage is going to be required for a specific NUMBER data type. How much precision can be used? The acceptable range is 1-38. What about scale? The range is actually -84 to 127. I'll explain the scale in more detail in an upcoming video. That's because there is a lot of confusing things here…What does it mean for the scale to be negative? How can we have a scale that is bigger that the total number of digits available through the precision. That's a topic for another video. It's important to understand that when we increase our scale, we decrease the max size of the number. For example if we have a precision of 5 and a scale of 3, the highest number we can store is 99.999. This is in contrast to a precision of 5 and a scale of 2 which allows for up to 99.999. Either way you get 5 significant digits, but the numbers of digits to the left and right of the decimal change. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter 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 - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 9124 Caleb Curry
About that error: ORA-06502: numeric or value error
 
12:11
"ORA-06502: numeric or value error" is one of the most commonly occurring and irritating errors for PL/SQL developers. Value too big for its "container"? Trying to stuff a non-numeric string value into a number through implicit conversion? [naughty naughty] In this video, Steven takes a close look at ORA-06502, exploring the ways it can be raised and how best to deal with those scenarios. ============================ Practically Perfect PL/SQL with Steven Feuerstein Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. 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 or merchantability, fitness for a particular purpose, and non-infringement.
Oracle TO_NUMBER Function
 
02:42
https://www.databasestar.com/oracle-to_number/ The Oracle TO_NUMBER function is used to convert a text value into a number value. It’s similar to TO_CHAR and TO_DATE, but converts a value to a number. The number will also be rounded to a specified number of digits, and returned as a NUMBER value. The syntax is: TO_NUMBER( input_value, [format_mask], [nls_parameter] ) The input_value is the value to be converted to a number. Commonly this is provided as a string (e.g. CHAR or VARCAHR2) but can be several other data types as well. The format_mask is the format that the output value should be displayed as. It must be a valid number format. This is an optional value. The final parameter, nls_date_language, is used to work out how the output is displayed, such as how to display currency symbols. It’s also an optional value. For more information about the Oracle TO_NUMBER function, including all of the SQL shown in this video and the examples, read the related article here: https://www.databasestar.com/oracle-to_number/
Views: 2595 Database Star
PL-SQL tutorial 12 - SUM OF DIGITS
 
12:21
Hello friends in this video we learn how to differentiate number together and sum all the digits after that easily via PLSQL #SUMOFDIGITS #PL-SQLtutorial
Views: 1711 Oracle World
Oracle - PL/SQL - Loops
 
07:27
Oracle - PL/SQL - Loops https://www.tutorialspoint.com/videotutorials/index.htm Lecture By: Mr. Anadi Sharma, Tutorials Point India Private Limited.
Oracle SQL Tutorial 24 - Important Data Types
 
06:09
In the upcoming videos we are going to discuss data types in depth, but I don't want to drown you in all of the details. Because of that, I'm giving you this video which is going to introduce you to the most important data types. Then, in the upcoming videos, I'll describe them in more depth. One of the data types we've already discussed in this video is NUMBER. This data type is used to, obviously, store a number. It can be used to store integers (whole numbers), or numbers with decimals. There are two other numeric data types you should know of. BINARY_FLOAT and BINARY_DOUBLE are both numeric data types that are known as floating point numbers. A floating point number is often used for large numbers that have decimal places where it is acceptable to not be completely precise. What I mean by this is that these numbers can only store numbers correctly up to a certain decimal point. If you need perfect precision, you will want to use the NUMBER data type. Now storing numbers is good sometimes, but occasionally you will want to store string data. String data can be any sequence of characters, including numbers. By telling the database that a column is a string data type, the database knows how to treat that column. There are four important string data types that you need to know about. The first two are CHAR and NCHAR. These data types are used to store a fixed-length string. So for example, you can say you want to store 12 characters. This means that every value for this column will be exactly 12 characters. If you insert less than 12 characters, the data will be padded with spaces. This means you will want to use one of these data types when every value in the column is the same length. What is the difference between CHAR and NCHAR? CHAR uses what is known as ASCII while NCHAR uses Unicode. The difference is what characters are allowed and how much space each character takes. ASCII takes up less space but only supports English, numbers, and some symbols. UNICODE allows you to store characters from multiple languages but takes up more space. Those were both fixed-length string. What if you want to store data that changes in length? That is where VARCHAR2 and NVARCHAR2 come in. When it comes to storing dates, the data types that are most important are DATE and TIMESTAMP. Date can be used to store dates and time. Timestamp is a data type that can be used to store an exact moment in time. Lastly, there are interval types. These store a date range. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter 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 - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 7473 Caleb Curry
Oracle SQL Tutorial -  Handling Null values
 
13:01
In this video, we will see how to handle null values. Retrieving rows where specific column value IS NULL or NOT NULL. Also, we will see functions to handle NULL values. NVL ,NVL2 and NULL IF functions.
Views: 98 Ganesh Anbarasu
GROUPING ID function in SQL Server
 
12:38
grouping_id function in sql server 2008 grouping_id in sql server 2008 example sql server grouping level In this video we will discuss 1. GROUPING_ID function in SQL Server 2. Difference between GROUPING and GROUPING_ID functions 3. Use of GROUPING_ID function GROUPING_ID function computes the level of grouping. Difference between GROUPING and GROUPING_ID Syntax : GROUPING function is used on single column, where as the column list for GROUPING_ID function must match with GROUP BY column list. GROUPING(Col1) GROUPING_ID(Col1, Col2, Col3,...) GROUPING indicates whether the column in a GROUP BY list is aggregated or not. Grouping returns 1 for aggregated or 0 for not aggregated in the result set. GROUPING_ID() function concatenates all the GOUPING() functions, perform the binary to decimal conversion, and returns the equivalent integer. In short GROUPING_ID (A, B, C) = GROUPING(A) + GROUPING(B) + GROUPING(C) Let us understand this with an example. SELECT Continent, Country, City, SUM(SaleAmount) AS TotalSales, CAST(GROUPING(Continent) AS NVARCHAR(1)) + CAST(GROUPING(Country) AS NVARCHAR(1)) + CAST(GROUPING(City) AS NVARCHAR(1)) AS Groupings, GROUPING_ID(Continent, Country, City) AS GPID FROM Sales GROUP BY ROLLUP(Continent, Country, City) Row Number 1 : Since the data is not aggregated by any column GROUPING(Continent), GROUPING(Country) and GROUPING(City) return 0 and as result we get a binar string with all ZEROS (000). When this converted to decimal we get 0 which is displayed in GPID column. Row Number 7 : The data is aggregated for Country and City columns, so GROUPING(Country) and GROUPING(City) return 1 where as GROUPING(Continent) return 0. As result we get a binar string (011). When this converted to decimal we get 10 which is displayed in GPID column. Row Number 15 : This is the Grand total row. Notice in this row the data is aggregated by all the 3 columns. Hence all the 3 GROUPING functions return 1. So we get a binary string with all ONES (111). When this converted to decimal we get 7 which is displayed in GPID column. Use of GROUPING_ID function : GROUPING_ID function is very handy if you want to sort and filter by level of grouping. Sorting by level of grouping : SELECT Continent, Country, City, SUM(SaleAmount) AS TotalSales, GROUPING_ID(Continent, Country, City) AS GPID FROM Sales GROUP BY ROLLUP(Continent, Country, City) ORDER BY GPID Filter by level of grouping : The following query retrieves only continent level aggregated data SELECT Continent, Country, City, SUM(SaleAmount) AS TotalSales, GROUPING_ID(Continent, Country, City) AS GPID FROM Sales GROUP BY ROLLUP(Continent, Country, City) HAVING GROUPING_ID(Continent, Country, City) = 3 Text version of the video http://csharp-video-tutorials.blogspot.com/2015/09/groupingid-function-in-sql-server.html Slides http://csharp-video-tutorials.blogspot.com/2015/09/groupingid-function-in-sql-server_27.html All SQL Server Text Articles http://csharp-video-tutorials.blogspot.com/p/free-sql-server-video-tutorials-for.html All SQL Server Slides http://csharp-video-tutorials.blogspot.com/p/sql-server.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: 33419 kudvenkat
SQL Tutorial - 23: The LIKE Operator and Wildcard Characters
 
07:36
In this tutorial we'll check out a few examples of the LIKE Operator along with the wildcard characters (% and _).
Views: 67239 The Bad Tutorials
Tutorial#50 How to replace String/Column Value  using Replace Function in Oracle SQL Database
 
05:47
REPLACE function replaces a sequence of characters in a string with another set of characters or Numeric Functions - Ceil, Floor, Round, mod, replace, power or How to use REPLACE function in SQL or what are the numeric function oracle SQL database Assignment link will be available soon: SQL basics, create table oracle, SQL functions, SQL queries, SQL server, SQL developer installation, Oracle database installation, SQL Statement, OCA, Data Types, Types of data types, SQL Logical Operator, SQL Function,Join- Inner Join, Outer join, right outer join, left outer join, full outer join, self-join, cross join, View, SubQuery, Set Operator. follow me on: Facebook Page: https://www.facebook.com/LrnWthr-319371861902642/?ref=bookmarks Contacts Email: [email protected] Instagram: https://www.instagram.com/equalconnect/ Twitter: https://twitter.com/LrnWthR
Views: 103 EqualConnect Coach
MySQL 31 - DECIMAL Data Type
 
02:20
The DECIMAL data type is similar to the INT data type in that when you use the number for math, it maintains precision. The difference though is obvious in the name. The DECIMAL data type allows for numbers after a decimal point (and before the decimal point). The DECIMAL data type allows us to store what is known as a fixed-point number. A fixed point number is a number that has a specific number of digits available to store numbers in. That means we can't do things like use a DECIMAL data type to store as many digits of PI as possible, because we can't store unlimited digits. We are limited to a certain number. There are two keywords you need to understand when you are working with the DECIMAL data type, precision and scale. Precision is the number of digits and scale is the number of those digits that will come after the radix. You are going to want to provide these numbers when you declare a column of this data type. For example, DECIMAL(5, 2) has a precision of 5 digits and a scale of 2 digits. That means we can store a maximum of two digits after the decimal and four digits total. This gives us a possible range from -999.99 to 999.99 The highest number of digits is 65, and the highest number of digits after the decimal is 30. This data type is also known as DEC, NUMERIC, and FIXED. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter 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 - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 9128 Caleb Curry
Get Decimal/Float output from Integer Division in SQL Server - SQL Server Tutorial
 
02:47
In this video we will learn how to get decimal/float output from Integer division in SQL Server. I am creating this video to answer once of the question that I posted while back for TSQL Interview Question list "If I run Select 100/11 what output will I get?" When you divide Integer by an Integer in SQL Server, SQL Server returns Integer output. As we can see from our above example, SQL Server output is Integer for Integers division. If we want to get float or Decimal output, Either our denominator or Numerator should be float or decimal type. If we have both denominator or numerator as Integers, we can use convert or cast functions to convert one of them to float/decimal so we can get our results as float/decimal. There are multiple techniques you can use to convert/cast to integer to float/decimal, here are some examples SELECT CAST(100 AS FLOAT) /11 AS OutputResult SELECT 100/CAST(11 AS FLOAT) AS OutputResult SELECT 100/CAST(11 AS DECIMAL(12,0)) AS OutputResult SELECT CAST(100 AS DECIMAL(12,0))/11 AS OutputResult Blog post link with scripts used in the video http://sqlage.blogspot.com/2015/02/how-to-get-decimail-output-from.html
Views: 11851 TechBrothersIT
COALESCE IN ORACLE SQL
 
06:50
This video is the 4th video in the series of 'working with null', this video explains the working of the coalesce function in oracle sql. Also the video explains the use of coalesce function in oracle sql queries by perfect simple and easy to understand examples. COALESCE returns the first non-null expr in the expression list. You must specify at least two expressions. If all occurrences of expr evaluate to null, then the function returns null. Oracle Database uses short-circuit evaluation. The database evaluates each expr value and determines whether it is NULL, rather than evaluating all of the expr values before determining whether any of them is NULL. If all occurrences of expr are numeric datatype or any non numeric datatype that can be implicitly converted to a numeric datatype, then Oracle Database determines the argument with the highest numeric precedence, implicitly converts the remaining arguments to that datatype, and returns that datatype.
Views: 1121 Kishan Mashru
Learn Oracle | How to use the Character Functions, Date Functions in SQL
 
14:53
Pebbles present, Learn Oracle 10g with Step By Step Video Tutorials. Learn Oracle 10g Tutorial series contains the following videos : Learn Oracle - History of Oracle Learn Oracle - What is Oracle - Why do we need Oracle Learn Oracle - What is a Database Learn Oracle - What is Grid Computing Learn Oracle - What is Normalization Learn Oracle - What is ORDBMS Learn Oracle - What is RDBMS Learn Oracle - Alias Names, Concatenation, Distinct Keyword Learn Oracle - Controlling and Managing User Access (Data Control Language) Learn Oracle - Introduction to SQL Learn Oracle - Oracle 10g New Data Types Learn Oracle - How to Alter a Table using SQL Learn Oracle - How to Create a Package in PL SQL Learn Oracle - How to Create a Report in SQL Plus Learn Oracle - How to Create a Table using SQL - Not Null, Unique Key, Primary Key Learn Oracle - How to Create a Table using SQL Learn Oracle - How to Create a Trigger in PL SQL Learn Oracle - How to Delete Data from a Table using SQL Learn Oracle - How to Drop and Truncate a Table using SQL Learn Oracle - How to Insert Data in a Table using SQL Learn Oracle - How to open ISQL Plus for the first time Learn Oracle - How to Open SQL Plus for the First Time Learn Oracle - How to Update a Table using SQL Learn Oracle - How to use Aggregate Functions in SQL Learn Oracle - How to use Functions in PL SQL Learn Oracle - How to use Group By, Having Clause in SQL Learn Oracle - How to Use Joins, Cross Join, Cartesian Product in SQL Learn Oracle - How to use Outer Joins (Left, Right, Full) in SQL Learn Oracle - How to use the Character Functions, Date Functions in SQL Learn Oracle - How to use the Merge Statement in SQL Learn Oracle - How to use the ORDER BY Clause with the Select Statement Learn Oracle - How to use the SELECT Statement Learn Oracle - How to use the Transactional Control Statements in SQL Learn Oracle - How to use PL SQL Learn Oracle - Data Types in PL SQL Learn Oracle - Exception Handling in PL SQL Learn Oracle - PL SQL Conditional Logics Learn Oracle - PL SQL Cursor Types - Explicit Cursor, Implicit Cursor Learn Oracle - PL SQL Loops Learn Oracle - Procedure Creation in PL SQL Learn Oracle - Select Statement with WHERE Cause Learn Oracle - SQL Operators and their Precedence Learn Oracle - Using Case Function, Decode Function in SQL Learn Oracle - Using Logical Operators in the WHERE Clause of the Select Statement Learn Oracle - Using Rollup Function, Cube Function Learn Oracle - Using Set Operators in SQL Learn Oracle - What are the Different SQL Data Types Learn Oracle - What are the different types of Databases Visit Pebbles Official Website - http://www.pebbles.in Subscribe to our Channel – https://www.youtube.com/channel/UCNNjWVsQqaMYccY044vtHJw?sub_confirmation=1 Engage with us on Facebook at https://www.facebook.com/PebblesChennai Please Like, Share, Comment & Subscribe
Views: 2630 Pebbles Tutorials
PL/SQL tutorial 30: Cursor FOR Loop In Oracle Database By Manish Sharma
 
04:33
Learn How To Work with Database (Explicit or Implicit) Cursors using Cursor For Loop in Oracle Database With Example By Manish Sharma on RebellionRider.com ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog : http://bit.ly/cursor-for-loop-1 Previous Tutorial ► Numeric For Loop: https://youtu.be/DfAmnj2j7WI ►Install SQL Developer: https://youtu.be/zliF8kXVmeE ------------------------------------------------------------------------- ►►►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/ ___Facebook Official Page___ https://www.facebook.com/RebellionRider.official/ 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: 42878 Manish Sharma
SQL Aggregation queries using Group By, Sum, Count and Having
 
10:01
From SQL Queries Joes 2 Pros (Vol2) ch4.1. Learn up to write aggregated queries.
Views: 185925 Joes2Pros SQL Trainings
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: 207939 kudvenkat
SQL Tutorial - 34: ROUND() Function
 
06:51
In this tutorial we'll see how we can round off numbers conveniently in SQL using the ROUND() Function/
Views: 37813 The Bad Tutorials
PL/SQL tutorial 13: PL/SQL FOR Loop In Oracle Database by Manish Sharma RebellionRider.com
 
06:14
3rd and the last tutorial in Iterative/loop statement in Oracle PL/SQL series explaining concepts of FOR loop with examples by Manish Sharma RebellionRider.com ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog : http://bit.ly/numeric-for-loop-in-pl-sql Previous Tutorial ► While Loop https://youtu.be/IIlc4Sr7kFE ------------------------------------------------------------------------- ►►►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: 60514 Manish Sharma
ORACLE SQL INTERVIEW QUESTION : HOW TO SELECT ODD OR EVEN ROWS FROM A TABLE IN ORACLE
 
03:52
This video tutorial answers the frequently asked interview question, how to select only odd or even records in oracle sql, after watching this video you will understand more on the topic and will be able to answer this interview question with a lot of confidence.
Views: 4912 Kishan Mashru
Oracle SQL Data Conversion-Implicit Explicit
 
19:23
Oracle SQL Data Conversion Implicit Explicit Online console used -- https://livesql.oracle.com Implicit and Explicit data conversion to_char, to_number, to_date and cast functions Queries: /*IMPLICIT DATA CONVERSION EXAMPLES*/ SELECT salary + '10' FROM hr.employees; SELECT last_name FROM hr.employees WHERE employee_id = '200'; SELECT last_name FROM hr.employees WHERE employee_id = 200; SELECT last_name FROM hr.employees WHERE hire_date = '03-MAR-97'; Create table birth(name varchar2(15), dob date); Insert into birth values ('nids', '12/jan/58'); Insert into birth values ('panda', '14/feb/48'); Insert into birth values ('Spider', '14/feb/1958'); Insert into birth values ('agnes', '14/feb/2048'); Select * from birth; SELECT to_date('12-jan-58') - to_date('14-feb-48') from DUAL; '01/01/2058','MM/DD/RRRR' 01/01/2058 '01/01/2048','MM/DD/RRRR' 01/01/2048 '01/01/48','MM/DD/RRRR' 01/01/2048 '01/01/58','MM/DD/RRRR' 1/01/1958 '01/01/48','MM/DD/YYYY' 01/01/0048 '01/01/58','MM/DD/YYYY' 01/01/0058 '01/01/58','MM/DD/YY' 01/01/2058 '01/01/48','MM/DD/YY' 01/01/2048 SELECT * FROM NLS_SESSION_PARAMETERS WHERE PARAMETER = 'NLS_DATE_FORMAT'; Alter session set nls_date_format = 'DD-MM-RRRR'; Select * from birth; alter session set nls_date_format = 'DD-MON-YYYY'; Select * from birth; ALTER session set nls_date_format = 'DD-MON-YY'; SELECT to_date('12-jan-58') - to_date('14-feb-48') from DUAL; ALTER session set nls_date_format = 'DD-MON-RR'; /*EXPLICIT DATA CONVERSION EXAMPLES*/ /*TO_CHAR, TO_DATE, TO_NUMBER*/ SELECT first_name, TO_CHAR (hire_date, 'MON DD, YYYY') HIRE_DATE, TO_CHAR (salary, '$99999.99') Salary FROM hr.employees; SELECT TO_CHAR('01110') FROM DUAL; SELECT TO_CHAR('01110' + 1) FROM DUAL; SELECT TO_DATE('2012-06-05', 'YYYY-MM-DD') FROM dual; SELECT TO_DATE( '5 Jan 2017', 'DD MON YYYY' ) FROM dual; SELECT TO_NUMBER('1210.73', '9999.99') from DUAL; SELECT TO_NUMBER('$65.169', 'L99.999') FROM DUAL; SELECT TO_NUMBER('123,456,789', '999,999,999') FROM DUAL; /*This example takes a complicated string, determines that it is in certain format, and specifies the numeric characters to use*/ SELECT TO_NUMBER('$17 218,00', 'L999G999D00',' NLS_NUMERIC_CHARACTERS='', ''') FROM DUAL; /*CAST*/ SELECT CAST( '22-Aug-2003' AS varchar2(30) ) from dual; SELECT CAST('245.205' AS NUMBER(5,2)) FROM dual; /*      -- Result: 245.21 (note that the value is rounded, not truncated to 245.20) */ SELECT CAST(245.205 AS NUMBER(5,2)) FROM dual; SELECT CAST ('123456' AS NUMBER) + 5 FROM DUAL; SELECT CAST ('5.05.2017' AS DATE) +5 FROM DUAL; /*check the default date format. That's why it give error*/ SELECT CAST ('30-APRIL-2015' AS DATE) +5 FROM DUAL; SELECT CAST (SYSDATE AS TIMESTAMP) FROM DUAL; SELECT SYSDATE FROM DUAL;
Views: 184 Nids Dixit
ORACLE PL/SQL INTERVIEW : REVERSE NUMBER STRING PROGRAM
 
21:23
This video tutorial demonstrates on the oracle pl/sql interview question of reversing a number string without using the reverse function, the video explains a very simple and generic approach that can be used to solve this question.
Views: 3930 Kishan Mashru
How to Concatenate String Values with Integer values in SQL Server - TSQL Tutorial
 
10:23
How to Concatenate String and Integer Values in SQL Server ( + Sign vs CONCAT ) - TSQL Tutorial Working with Databases is fun. On daily basis we save data into tables in different columns and often we need to write queries which involve concatenation of multiple columns of different datatypes to produce our final output. In below example we have saved some data into #Customer Table which has Street Address column as string and zip as INT. we want to produce Full Address by concatenating these columns. To concatenate we can use + sign but this works only with String values. So if we have any Integer value/s we have to convert them to String first. We can use Cast or Convert function to convert Integer value to string. Also if there is any Null value among which values we are concatenating , our output will be Null by using + sign. To take care of that part we can use either ISNULL() or Coalesce Function to replace NULL with blank value in SQL Server. In SQL Server 2012 and Later versions, CONCAT function was introduced. You can concatenate multiple values by using this function. Fun part of this function is you don't have to worry about Null outcome as it will Ignore Null values and also you don't have to worry about converting INT into strings, It will take care of that automatically. So if you are using new versions such as 2012 or later, start taking advantage of this function. Blog post link for the video with script http://sqlage.blogspot.com/2015/03/how-to-concatenate-string-and-integer.html
Views: 16028 TechBrothersIT
Oracle SQL PLSQL 12C Tutorial 17 - Computation / Functions Part 1
 
24:15
This video describes the various computation methods that can be done on table data and values. This includes arithmetic operators, renaming columns, logical operators, NOT operator, range searching, pattern matching, Oracle functions, string functions, numeric functions, a conversion function, date function. It includes the following functions that include, AVG, MIN, COUNT, BETWEEN, AND, OR, NOT, NOT IN, LIKE ETC. All the commands explained with syntax and example.
ORACLE PL/SQL INTERVIEW :PALINDROME NUMBER PROGRAM
 
11:45
This video tutorial demonstrates on the Oracle PL/SQL interview question of writing a program for finding whether a number or string is palindrome number or string or not, the video explains a very simple and generic approach that can be used to solve this question. You can get the code from our website http://oracleplsqlblog.com/FullBlog/FullBlog/16
Views: 2684 Kishan Mashru
CBSE class 11 SIMPLE QUERIES IN SQL NUMERIC STRING DATETIME FUNCTION AND IMPORTANT QUESTION
 
21:10
SQL Server has many built-in functions. This reference contains string, numeric, date, conversion, and some advanced functions in SQL Server. NUMERIC FUNCTION STRING FUNCTION, DATE TIME FUNCTION SQL (/ˌɛsˌkjuːˈɛl/ (About this soundlisten) S-Q-L,[4] /ˈsiːkwəl/ "sequel"; Structured Query Language)[5][6][7][8] is a domain-specific language used in programming and designed for managing data held in a relational database management system (RDBMS), or for stream processing in a relational data stream management system (RDSMS). It is particularly useful in handling structured data where there are relations between different entities/variables of the data. SQL offers two main advantages over older read/write APIs like ISAM or VSAM. First, it introduced the concept of accessing many records with one single command; and second, it eliminates the need to specify how to reach a record, e.g. with or without an index. Originally based upon relational algebra and tuple relational calculus, SQL consists of many types of statements,[9] which may be informally classed as sublanguages, commonly: a data query language (DQL),[a] a data definition language (DDL),[b] a data control language (DCL), and a data manipulation language (DML).[c][10] The scope of SQL includes data query, data manipulation (insert, update and delete), data definition (schema creation and modification), and data access control. Although SQL is often described as, and to a great extent is, a declarative language (4GL), it also includes procedural elements. SQL was one of the first commercial languages for Edgar F. Codd's relational model. The model was described in his influential 1970 paper, "A Relational Model of Data for Large Shared Data Banks".[11] Despite not entirely adhering to the relational model as described by Codd, it became the most widely used database language.[12][13] SQL became a standard of the American National Standards Institute (ANSI) in 1986, and of the International Organization for Standardization (ISO) in 1987.[14] Since then, the standard has been revised to include a larger set of features. Despite the existence of such standards, most SQL code is not completely portable among different database systems without adjustments.
Views: 125 Python Wallah
ORACLE  SQL Coding Lesson 3 in Jinghpaw Language - More Character and Numeric Functions
 
44:14
SQL Coding Lesson 3 in Jinghpaw Language - Lessons Continued. Please watch in HD mode for better video quality. --numeric functions SELECT ABS(12) FROM DUAL; SELECT ABS(-12.65) FROM DUAL; SELECT CEIL(48.99) FROM DUAL; SELECT CEIL(48.11) FROM DUAL; SELECT FLOOR(49.99) FROM DUAL; SELECT FLOOR(49.11) FROM DUAL; SELECT ROUND(49.11321,2) FROM DUAL; SELECT ROUND(49.11321,3) FROM DUAL; SELECT POWER(4,2) FROM DUAL; SELECT POWER(3,4) FROM DUAL; SELECT MOD(4,2) FROM DUAL; SELECT MOD(5051,100) FROM DUAL; select greatest(34,567,290,86) from dual; select least(34,567,290,86) from dual; select INSTR('Tech on the net', 'e') from dual; select INSTR('Tech on the net', 'e', 1, 1) from dual; select TRIM(' tech ') from dual; select TRIM(' ' FROM ' tech ') from dual; select TRIM(LEADING '0' FROM '000123') from dual; select TRIM(BOTH '1' FROM '123Tech111') from dual; select GREATEST(2, 5, 12, 3) from dual; select GREATEST('2', '5', '12', '3') from dual; select GREATEST('apples', 'oranges', 'bananas') from dual; select LEAST('2', '5', '12', '3') from dual; --null select (9000*null) from dual; select (null/9000) from dual; select (9000-null) from dual; select (9000+null) from dual; select distinct department_id from employees where commission_pct is not null; select last_name,job_id,coalesce(department_id,0) as dept,salary,commission_pct,coalesce(commission_pct,0) as comm_not_null, salary*commission_pct as multiplied_by_null, salary*coalesce(commission_pct,0) as commission_amt, salary+ (salary*coalesce(commission_pct,0)) as salary_plus_comm from employees where commission_pct is not null or department_id=20 order by dept; desc locations; select coalesce(postal_code,city,STATE_PROVINCE,COUNTRY_ID) as new_address,postal_code,city,STATE_PROVINCE,COUNTRY_ID from locations where COUNTRY_ID in ('JP','IT','UK'); --add more departments SELECT first_name ||'.'||last_name as "Employee Name",department_id, CASE when department_id in (10) THEN 'Accounting' WHEN department_id in (20) THEN 'Research' -- WHEN commission_pct is not null THEN 'Sales' WHEN department_id in (30) THEN 'Operations' ELSE 'Unknown' END department FROM employees ORDER BY first_name ||'.'||last_name ; SELECT last_name, department_id, DECODE( department_id ,10 ,'Accounting' ,20 ,'Research' ,30 ,'Sales' ,40 ,'Operations' ,'Unknown') department FROM employees ORDER BY last_name; select country_id,decode(country_id,'BR','Southern Hemisphere', 'AU','Southern Hemisphere', 'Northen Hemisphere') hemisphere from locations order by hemisphere; --set define on; select 'Coke & Popcorn' from dual; --upper,lower,coalesce and null select upper('sql') from dual; select lower('SQL') from dual; select initcap('sql') from dual; Select * from employees where email like '%SON'; Select * from employees where lower(email) like '%son'; Select * from employees where upper(last_name) like '%SON'; Select * from employees where lower(job_id) ='pu_clerk'; Select * from employees where initcap(email) ='Sbaida'; select * from employees where substr(phone_number,1,3) eq '515'; select * from employees where substr(phone_number,1,3) ne '515'; select * from employees where last_name gt 'King'; select * from employees where hire_date lt '01-JAN-1992'; --special character select * from jobs where job_id like 'SA\_%' escape '\'; select * from jobs where job_id like 'SA$_%' escape '$'; --translate, replace --( string1, string_to_replace, replacement_string ) select TRANSLATE('1tech23', '123', '456') from dual; select phone_number,translate(phone_number,'.','-') as modified_phnum from employees where rownum le 10; select job_id,translate(job_id,'_','&') as modified_phnum from employees where rownum le 10; select phone_number,translate(phone_number,'515','415') as modified_phnum from employees where rownum le 5; select phone_number,REPLACE(phone_number,'515','415') as modified_phnum from employees where rownum le 5; select REPLACE('123123tech', '123') from dual; select REPLACE('123tech123', '123') from dual; select REPLACE('222tech', '2', '3') from dual;
Views: 45 Hkau Doi
Oracle - User Input
 
03:04
From LYW4.life This video explains how you get get user input in Oracle directly without having to program a front-end.
Views: 96 Andy Wicks
SQL Numeric Functions
 
02:07
SQL few Numeric Functions
Views: 46 VBA Misztu
Oracle SQL Character Conversion Functions
 
04:12
Character conversion functions in Oracle SQL 11g
Views: 225 Prasad Hommaradi
Oracle SQL Tutorials ll Querying a table   Part 10c Single Row Numeric Functions
 
15:24
CREATE TABLE command in sql/oracle,INSERT command in sql/oracle UPDATE,ALTER PASSWORD command in sql, GRANT command, REVOKE command i, CREATE SYNONYM command in sql/oracle, DELETE command in sql/oracle, ALTER TABLE command in sql/oracle, DROP TABLE command in sql/oracle, CREATE INDEX command in sql/oracle, ALTER INDEX command in sql/oracle, DROP INDEX command in sql/oracle, CREATE VIEW command in sql/oracle, DROP VIEW command in sql/oracle, USING SQL COMMAND Types of SQL Commands The following sections discuss the basic categories of commands used in SQL to perform various functions. These functions include building database objects, manipulating objects, populating database tables with data, updating existing data in tables, deleting data, performing database queries, controlling database access, and overall database administration. The main categories are DDL (Data Definition Language) DML (Data Manipulation Language) DQL (Data Query Language) DCL (Data Control Language) Data administration commands Transactional control commands Defining Database Structures Data Definition Language, DDL, is the part of SQL that allows a database user to create and restructure database objects, such as the creation or the deletion of a table. Some of the most fundamental DDL commands discussed during following hours include the following: CREATE TABLE ALTER TABLE DROP TABLE CREATE INDEX ALTER INDEX DROP INDEX CREATE VIEW DROP VIEW Manipulating Data Data Manipulation Language, DML, is the part of SQL used to manipulate data within objects of a relational database. There are three basic DML commands: INSERT UPDATE DELETE Selecting Data Though comprised of only one command, Data Query Language (DQL) is the most concentrated focus of SQL for modern relational database users. The base command is as follows: SELECT This command, accompanied by many options and clauses, is used to compose queries against a relational database. Queries, from simple to complex, from vague to specific, can be easily created. The SELECT command is discussed in exhilarating detail during Hours 7 through 16. A query is an inquiry to the database for information. A query is usually issued to the database through an application interface or via a command line prompt. Data Control Language Data control commands in SQL allow you to control access to data within the database. These DCL commands are normally used to create objects related to user access and also control the distribution of privileges among users. Some data control commands are as follows: ALTER PASSWORD GRANT REVOKE CREATE SYNONYM You will find that these commands are often grouped with other commands and may appear in a number of different lessons throughout this book. Data Administration Commands Data administration commands allow the user to perform audits and perform analyses on operations within the database. They can also be used to help analyze system performance. Two general data administration commands are as follows: START AUDIT STOP AUDIT Do not get data administration confused with database administration. Database administration is the overall administration of a database, which envelops the use of all levels of commands. Database administration is much more specific to each SQL implementation than are those core commands of the SQL language. Transactional Control Commands In addition to the previously introduced categories of commands, there are commands that allow the user to manage database transactions. COMMIT Saves database transactions ROLLBACK Undoes database transactions SAVEPOINT Creates points within groups of transactions in which to ROLLBACK SET TRANSACTION Places a name on a transaction Transactional commands are discussed extensively during Hour 6, "Managing Database Transactions."
SQL Tutorials 1 - Types of SQL Commands: DDL , DML
 
02:06
sql ddl sql ddl commands sql ddl dml sql ddl statements sql ddl vs dml sql ddladmin sql ddl example sql ddl trigger sql ddl create table sql ddl script sql ddl file sql ddl dml dcl sql ddl and dml sql ddl admin sql ddl and dml commands with examples sql ddl and dml w3schools sql ddl and dml statements sql ddl access sql ddl and dml queries pdf sql ddl and dml commands syntax sql ddl add column sql ddl and dcl sql and ddl sql and ddl commands what is a sql ddl script sql ddl boolean sql ddl befehle sql basics ddl dml sql basics ddl sql server ddl backup sql difference between ddl and dml sql server backup ddl only sql server bcp ddl basic sql ddl commands sql server difference between ddl and dml sql ddl changes sql ddl commands syntax sql ddl code sql ddl commands pdf sql ddl constraints sql ddl check sql ddl create view sql ddl commands tutorial sql ddl date sql ddl dml dcl tcl commands with examples sql ddl default value sql ddl definition sql ddl data types sql ddl dml dql sql ddl dml dql dcl sql ddl dml and dcl commands t sql ddl t sql ddl vs dml t-sql ddl trigger t-sql ddl statements t-sql ddl commands t-sql ddl transaction t sql ddl dml t-sql ddl primary key t sql ddl add column t-sql ddl in stored procedure sql ddl exercises sql ddl events ddl enable.sql sql ddl editor ddl sql execution error sql export ddl ddl sql execution error moodle sql extract ddl sql explain ddl dml e ddl sql comandos dml e ddl sql sql ddl foreign key example sql ddl format sql ddl foreign key sql ddl functions sql ddl formatter sql ddl file example sql ddl float ddl sql full form select ddl from oracle sql ddl generator sql ddl grant sql get ddl sql get ddl table sql developer ddl generation sql server ddl generator java sql ddl generator sql developer ddl grants select get ddl sql developer generate ddl for schema sql server ddl history hive sql ddl sql server ddl change history h2 sql ddl ddl sql view sap hana ms sql cdc.ddl_history sql ddl index sql ddl interview questions sql ddl insert sql ddl in transaction sql ddl in dbms sql is ddl or dml sql in ddl sql injection ddl sql server ddl in transaction pl sql ddl in procedure jquery ddl selected sql ddl parser java sql ddl to json java sql ddl java sql ddl statement java sql ddl 実行 sql ddl keywords sql ddl komutları kill bill ddl.sql sql ddl primary key sql ddl composite primary key sql server foreign key ddl sql ddl create table foreign key sql ddl language sql ddl log sql ddl list sql last ddl time sql language ddl dml dcl sql language ddl dml select ddl_lock_timeout sql server ddl log mysql ddl log sql ddl_database_level_events pl sql ddl pl sql ddl dml pl sql ddl commands pl/sql ddl trigger oracle pl/sql ddl execute immediate oracle pl sql ddl statements oracle 11g pl/sql ddl oracle pl sql ddl triggers ddl commands in pl sql block pl sql developer generate ddl sql ddl mysql sql dml ddl sql ddl means sql ddl modify sql ddl many to many teradata sql ddl manual ddl sql server management studio sql server mirroring ddl mysql ddl ms sql ddl commands mysql ddl and dml mysql ddl syntax ddl commands in mysql mysql table ddl ddl mysql workbench sql ddl not null sql ddl number sql ddl numeric sql ddl nedir sql ddl naredbe sql server ddl not null sql-ddl-sync npm extract ddl sql navigator sql ddl statement is not allowed sql server ddl trigger not firing sql ddl operation sql ddl oracle sql ddl online sql ddl on delete cascade select ddl or dml select ddl oracle jquery ddl selected option select ddl of table sql truncate ddl or dml sql server ddl operations types of sql ddl dml dcl elements of sql ddl dml example of sql ddl o que é ddl sql sql ddl permissions sql ddl ppt sql ddl pdf sql ddl parser sql ddl purge sql ddl practice ddl for sql profile sql server ddl permissions pl sql export ddl pl sql last_ddl_time pl/sql generate ddl pl sql developer ddl sql ddl query sql ddl queries examples sql ddl quiz sql ddl questions sql queries ddl commands sql server ddl query what is ddl dml and dql in sql select query ddl select query ddl or dml sql ddl rollback sql ddl rename column sql ddl rights sql ddl reference sql ddl relationship sql ddl rename sql replication ddl sql replication ddl changes role ddl.sql sql server ddl rollback sql ddl statements w3schools sql ddl syntax sql ddl statements examples sql ddl script example sql ddl stands for sql ddl standard sql ddl statements tutorial sql ddl sample sql ddl statements example sql ddl transaction sql ddl tutorial sql ddl trigger example sql ddl table sql ddl tutorial pdf sql ddl truncate sql ddl types sql ddl trigger events t-sql ddladmin sql ddl unique sql ddl update sql ddl update script sql ddl utasítások sql ddl to uml sql developer user ddl sql commands under ddl sql statement using ddl sql developer extract user ddl sql developer create user ddl sql ddl view sql ddl varchar select ddl value jquery select ddl value in c# oracle sql ddl vs dml sql server ddl view ddl vs sql v generate schema ddl.sql
Views: 2323 T3SO Tutorials
PL/SQL: Fibonacci series
 
06:51
In this tutorial, you'll learn how to write Fibonacci series code in plsql 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: 4704 radhikaravikumar
How NOT to Handle Exceptions - Part 1
 
06:43
In which Steven Feuerstein takes a look at several ways you should never handle an exception in your PL/SQL block. To summarize: 1. Don't swallow up or hide errors. 2. Don't simply display error information on the screen through a call to DBMS_OUTPUT.PUT_LINE. 3. Don't handle and re-raise without adding value (logging or doing *something*). Related blog post: http://stevenfeuersteinonplsql.blogspot.com/2017/02/now-not-to-handle-exceptions.html Related LiveSQL script: https://livesql.oracle.com/apex/livesql/file/content_EHHFC36YW2834RB7Z9OE846C6.html ======================================== Practically Perfect PL/SQL with Steven Feuerstein Copyright © 2016 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. 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 or merchantability, fitness for a particular purpose, and non-infringement.
SQL with Oracle 10g XE - Using the COUNT and SUM Functions
 
04:09
In this video I use the COUNT and SUM functions available to the SQL language. I used the COUNT function to add up the number of records in my query. This function works well with all data types and will just count the number or records that result from the conditions of your query. The SUM function will add up the numeric values and produce a total amount of a column. When using a function be sure to use parenthesis around the column you are performing the function on. This video is part of a series of videos with the purpose of learning the SQL language. For more information visit Lecture Snippets at http://lecturesnippets.com.
Views: 8104 Lecture Snippets
ORACLE PL/SQL INTERVIEW QUESTION : FACTORIAL PROGRAM
 
08:23
How to write a program for find a factorial of a given number in Oracle PL/SQL? This video tutorial answers this interview question with a simple and easy to understand example. You can get the code from our website http://oracleplsqlblog.com/FullBlog/FullBlog/15
Views: 1800 Kishan Mashru
Cara INSERT, UPDATE dan DELETE Data di ORACLE SQL DEVELOPER PART 3
 
06:51
Cara INSERT Data di ORACLE SQL DEVELOPER Cara UPDATE Data di ORACLE SQL DEVELOPER Cara DELETE Data di ORACLE SQL DEVELOPER --------------------------------------------------------------------------------------------------------------------------------------- CREATE TABLE MAHASISWA ( NIM NUMBER(3) NOT NULL, NAMA VARCHAR(25) NOT NULL, CONSTRAINT MAHASISWA_PK PRIMARY KEY(NIM) ENABLE ); --------------------------------------------------------------------------------------------------------------------------------------- INSERT INTO MAHASISWA (NIM,NAMA) VALUES (111,'BELAJAR'); --------------------------------------------------------------------------------------------------------------------------------------- SELECT * FROM MAHASISWA; --------------------------------------------------------------------------------------------------------------------------------------- UPDATE MAHASISWA SET NAMA='DWIKI' WHERE NIM=111; --------------------------------------------------------------------------------------------------------------------------------------- UPDATE MAHASISWA SET NIM=123 WHERE NAMA='DWIKI'; --------------------------------------------------------------------------------------------------------------------------------------- DELETE FROM MAHASISWA WHERE NIM=123; ---------------------------------------------------------------------------------------------------------------------------------------
Views: 90 Dwiki Olajuwon
PL/SQL: Factorial
 
08:14
In this tutorial, you'll learn how to write factorial program in plsql 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: 5530 radhikaravikumar
LNNVL FUNCTION IN ORACLE SQL
 
09:11
This video is the 5th video in the series of 'working with null', this video explains the working of the lnnvl function in oracle sql with simple and easy to understand example. LNNVL provides a concise way to evaluate a condition when one or both operands of the condition may be null. The function can be used only in the WHERE clause of a query. It takes as an argument a condition and returns TRUE if the condition is FALSE or UNKNOWN and FALSE if the condition is TRUE. LNNVL can be used anywhere a scalar expression can appear, even in contexts where the IS [NOT] NULL, AND, or OR conditions are not valid but would otherwise be required to account for potential nulls. Oracle Database sometimes uses the LNNVL function internally in this way to rewrite NOT IN conditions as NOT EXISTS conditions. In such cases, output from EXPLAIN PLAN shows this operation in the plan table output. The condition can evaluate any scalar values but cannot be a compound condition containing AND, OR, or BETWEEN.
Views: 680 Kishan Mashru
Oracle SQL Tutorial 31 - NCHAR Part 2
 
03:12
This video is going to be part 2 of NCHAR. That's because I have a bit more things to say about it before we move on to other data types. The first thing I wanted to mention is that if you declare an NCHAR(50), it is going to always be 50 characters. You do not need to use the CHAR or BYTE keyword in parenthesis to specify which you would like. We've said that NCHAR uses Unicode, but as we've learned in the last video, there are many character sets that use Unicode. Which character set is NCHAR going to use? That decision is based off of what your database's national character set is. So for every database you can declare a database character set and you can declare a national character set. The national character set is what is used for this data type. There are two options for the national character set, AL16UTF16, and UTF8. The default is AL16UTF16, which uses the utf-16 encoding. The Oracle docs has a lot of pros and cons for each one, but in general the defaults are default for a reason, so AL16UTF16 usually works fine. Now, a few videos ago I made a comment about the CHAR and NCHAR data types and how they might not be recommended. Why so? The reason is that CHAR is secretly just a VARCHAR2 that is padded to take up a full length. It does not save space nor improve performance in the database, so the chances are you are never going to want to use it. That being said, everything you've learned has not been a waste because a lot can be applied to the VARCHAR2 and NVARCHAR2 data types. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter 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 - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 4144 Caleb Curry
PL-SQL tutorial 15 - FIBONACCI SERIES
 
08:05
Hi guys today we learn how to print number in fibonacci series(0,1,1,2,3,5,8,13,21,34 etc ) #FIBONACCISERIES in PLSQL language Oracle database Unbeatable,Unbreakable Platform..
Views: 2506 Oracle World
Data Types in SQL Server
 
18:40
Data Types in SQL Server CORRECTION: for storing DECIMAL you need to just count the numbers in precision and scale, like to store 100.55 you have to define like DECIMAL(5,2) Check my blog for more details and SQL Queries: https://sqlwithmanoj.com/2015/09/20/sql-basics-data-types-in-sql-server-video/ For more updates like my page in FB: https://www.facebook.com/sqlwithmanoj
Views: 32634 SQL with Manoj
Oracle - PL/SQL - Getting Started
 
10:05
Oracle - PL/SQL - Getting Started https://www.tutorialspoint.com/videotutorials/index.htm Lecture By: Mr. Anadi Sharma, Tutorials Point India Private Limited.
PL-SQL tutorial 16 - How to calculate sum of sal column
 
07:09
Hello friends today i'm going to explain to you how to calculate total sum of sal column using deptno Oracle database Unbeatable,Unbreakable Platform..
Views: 2083 Oracle World
Round Function in Sql | Round Function in Oracle | ROUND() Function | Oracle Tutorial
 
03:27
Round Function in Sql | Round Function in Oracle | ROUND() Function | Oracle Tutorial ---------------------------------------------------------------------------------------------------- oracle, sql tutorial, single row function, single row functions, sql, date function, oracle single row functions, oracle sql, database, sql server, single row function oracle, sql single row function, single row functions sql, oracle database 11g tutorial, sql tutorials, oracle database tutorials, oracle database 10g tutorila, oracle tutorila, number function, oracle database, relational database, free tutorial, computer tutorial, learn oracle, free training, online training sql,single row functions in oracle,single row functions in sql,single row functions in oracle sql,single row functions sql tutorial for beginners, oracle tutorial, advanced sql tutorials, round function in sql, round() function in sql, round and truncate function in mysql, round and truncate function in sql, round and truncate function in oracle, round and truncate in oracle, round and truncate in mysql, round and truncate in sql, oracle sql 12c tutorial for beginners, oracle sql tutorial, sql 12c tutorial for beginners, sql 12c tutorial, sql tutorial, sql, round, sql functions, sql single row functions, oracle 12c,oracle 12c download,oracle database 12c,oracle client 12c,oracle 12c new features,uninstall oracle 12c,oracle xe 12c,oracle 12c documentation,oracle 12c installation, sql like multiple values,Sqlplus & Sql Developer,Insert Data in Sqlplus & Sql Developer Mood in Oracle,Commit Data in Oracle,Sqlplus & Sql Developer,Insert Data in Sqlplus,Insert Data in Sql Developer, Remove Multiple Tables,Delete Table,Drop Table in Oracle,Multiple Drop Table,Drop Table,insert, create, tutorial,sql, sql tutorials, oracle dba tutorials, sql developer, sql tutorials for beginners, sql expert, sql expert tutorials, database, oracle, table, online training,insert into oracle,oracle insert into multiple rows,create table oracle,oracle 12c alter table add identity column,oracle create table default value sysdate,collections in oracle pl sql with examples,Oracle 12c, database, oracle database (software), sql, sql developer, sql tutorials, how to create database using dbca, how to create database in oracle,oracle cloud, database 12c, dba genesis,database services, database, create, 11g, dba, db, beginner, Please Subscribe My Channel
8. Use LOG ERRORS to suppress SQL errors at the row level.
 
06:23
The impact of a non-query DML statement is usually "all or nothing". If my update statement identifies 100 rows to change, then either all 100 rows are changed or none are. And none might be the outcome if, say, an error occurs on just one of the rows (value too large to fit in column, NULL value for non-NULL column, etc.). But if you have a situation in which you would really like to "preserve" as many of those row-level changes as possible, you can add the LOG ERRORS clause to your DML statement. Then, if any row changes raise an error, that information is written to your error log table, and processing continues. IMPORTANT: if you use LOG ERRORS, you must must must check that error log table immediately after the DML statement completes. You should also enhance the default error log table. Related blog post: http://stevenfeuersteinonplsql.blogspot.com/2016/03/nine-good-to-knows-about-plsql-error.html ======================================== Practically Perfect PL/SQL with Steven Feuerstein Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. 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 or merchantability, fitness for a particular purpose, and non-infringement.