Oracle creates a memory area, known as context area, for processing an SQL statement, which contains all information needed for processing the statement, for example, number of rows processed, etc. 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. There are two types of cursors:
• Implicit Cursors
• Explicit Cursors
What is PL/SQL?
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).
PL/SQL (Procedural Language extensions to SQL) is designed specifically for the seamless processing of SQL commands. PL/SQL stored and compiled in the database, runs within the Oracle executable and inherits the robustness, security, and portability of the Oracle Database.
Features of PL/SQL
Syntax of PL/SQL
Using comments
Variable Declaration
Printing messages
Sample Program
What is PL/SQL?
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).
PL/SQL (Procedural Language extensions to SQL) is designed specifically for the seamless processing of SQL commands. PL/SQL stored and compiled in the database, runs within the Oracle executable and inherits the robustness, security, and portability of the Oracle Database.
Features of PL/SQL
Syntax of PL/SQL
Using comments
Variable Declaration
Printing messages
Sample Program
Creating ESS Jobs for Oracle Fusion BIP ReportsGurpreet singh
Topics:
1. Introduction to ESS Jobs
2. Creating ESS Jobs for Fusion BIP Reports
3. Running the ESS Job
In Oracle Fusion Cloud, an Enterprise Scheduler Service (ESS) job is a scheduled process that automates the execution of various business processes and tasks. ESS jobs enable users to manage, schedule, and monitor the execution of these processes without manual intervention, ensuring that tasks are performed consistently and on time.
Types of ESS Jobs: Predefined & Custom ESS Jobs
This will show all the steps to create Data Model and ESS Job for the BIP Report in Oracle Fusion Cloud
It covers:
Why Messaging System? – Problems without Messaging system
What is a Messaging System?
Types of Messaging Systems
Examples of Messaging Systems
Understanding Flex Fields with Accounting Flexfields(Chart of Accounts) in O...Gurpreet singh
A flexfield is a flexible data field that your organization can customize to your business needs without programming.
A flexfield is a field which is made up of subfields or segments.
A flexfield appears on your form as a popup window that contains a prompt for each segment. Each segment has a name and a set of valid values.
Also covers how to create custom Key Flexfield
***First Half***
Introduction to Oracle Fusion Middleware and Oracle ADF
Getting started with JDeveloper
Building a Business Model with ADF Business Components
Querying and persisting data
Exposing Data
Declaratively Customizing Data Services
Programmatically Customizing Data Services
Validating User Inputs
***Second Half***
Understanding UI Technology
Binding UI Components to Data
Planning the User Interface
Passing values between UI Elements
Responding to Application Events
Implementing Transactional Capabilities
When Web-based business applications communicate with each other, producer applications ENQUEUE messages and consumer applications DEQUEUE messages. Advanced Queuing provides database-integrated message queuing functionality. Advanced Queuing leverages the functions of the Oracle database so that messages can be stored persistently, propagated between queues on different machines and databases, and transmitted using Oracle Net Services, HTTP(S), and SMTP.
An SQL JOIN clause combines columns from one or more tables in a relational database. It creates a set that can be saved as a table or used as it is. A JOIN is a means for combining columns from one (self-table) or more tables by using values common to each.
Constraints are the rules enforced on the data columns of a table. These are used to limit the type of data that can go into a table. This ensures the accuracy and reliability of the data in the database.
Constraints can be divided into following two types:
Column level constraints : limits only column data
Table level constraints : limits whole table data
Aggregate Functions
Generic programming is a style of computer programming in which algorithms are written in terms of types to-be-specified-later that are then instantiated when needed for specific types provided as parameters.
Generics are a facility of generic programming that were added to the Java programming language in 2004 within version J2SE 5.0. They were designed to extend Java's type system to allow “a type or method to operate on objects of various types while providing compile-time type safety”
The Java collections framework supports generics to specify the type of objects stored in a collection instance.
In computer science, a stream is a sequence of data elements made available over time. A stream can be thought of as items on a conveyor belt being processed one at a time rather than in large batches.
Streams are processed differently from batch data :
*Normal functions cannot operate on streams as a whole, as they have potentially unlimited data, and formally
*Streams are codata (potentially unlimited), not data (which is finite).
Creating ESS Jobs for Oracle Fusion BIP ReportsGurpreet singh
Topics:
1. Introduction to ESS Jobs
2. Creating ESS Jobs for Fusion BIP Reports
3. Running the ESS Job
In Oracle Fusion Cloud, an Enterprise Scheduler Service (ESS) job is a scheduled process that automates the execution of various business processes and tasks. ESS jobs enable users to manage, schedule, and monitor the execution of these processes without manual intervention, ensuring that tasks are performed consistently and on time.
Types of ESS Jobs: Predefined & Custom ESS Jobs
This will show all the steps to create Data Model and ESS Job for the BIP Report in Oracle Fusion Cloud
It covers:
Why Messaging System? – Problems without Messaging system
What is a Messaging System?
Types of Messaging Systems
Examples of Messaging Systems
Understanding Flex Fields with Accounting Flexfields(Chart of Accounts) in O...Gurpreet singh
A flexfield is a flexible data field that your organization can customize to your business needs without programming.
A flexfield is a field which is made up of subfields or segments.
A flexfield appears on your form as a popup window that contains a prompt for each segment. Each segment has a name and a set of valid values.
Also covers how to create custom Key Flexfield
***First Half***
Introduction to Oracle Fusion Middleware and Oracle ADF
Getting started with JDeveloper
Building a Business Model with ADF Business Components
Querying and persisting data
Exposing Data
Declaratively Customizing Data Services
Programmatically Customizing Data Services
Validating User Inputs
***Second Half***
Understanding UI Technology
Binding UI Components to Data
Planning the User Interface
Passing values between UI Elements
Responding to Application Events
Implementing Transactional Capabilities
When Web-based business applications communicate with each other, producer applications ENQUEUE messages and consumer applications DEQUEUE messages. Advanced Queuing provides database-integrated message queuing functionality. Advanced Queuing leverages the functions of the Oracle database so that messages can be stored persistently, propagated between queues on different machines and databases, and transmitted using Oracle Net Services, HTTP(S), and SMTP.
An SQL JOIN clause combines columns from one or more tables in a relational database. It creates a set that can be saved as a table or used as it is. A JOIN is a means for combining columns from one (self-table) or more tables by using values common to each.
Constraints are the rules enforced on the data columns of a table. These are used to limit the type of data that can go into a table. This ensures the accuracy and reliability of the data in the database.
Constraints can be divided into following two types:
Column level constraints : limits only column data
Table level constraints : limits whole table data
Aggregate Functions
Generic programming is a style of computer programming in which algorithms are written in terms of types to-be-specified-later that are then instantiated when needed for specific types provided as parameters.
Generics are a facility of generic programming that were added to the Java programming language in 2004 within version J2SE 5.0. They were designed to extend Java's type system to allow “a type or method to operate on objects of various types while providing compile-time type safety”
The Java collections framework supports generics to specify the type of objects stored in a collection instance.
In computer science, a stream is a sequence of data elements made available over time. A stream can be thought of as items on a conveyor belt being processed one at a time rather than in large batches.
Streams are processed differently from batch data :
*Normal functions cannot operate on streams as a whole, as they have potentially unlimited data, and formally
*Streams are codata (potentially unlimited), not data (which is finite).
This contains:
*Getting started with New Dynamic Web Project
*Starting the tomcat server
*Running your project
*Changing the context root
*Changing welcome pages of your website
A business group is the highest level of organization and the largest grouping of employees across which you may report. A Business Group holds a complete, self-contained set of information on work structures, remuneration policies and employees. Each Business Group can have just one particular set of segments defined for its Job, Position, Grade, Employee Group and Cost Allocation key flex fields.
A business group is a basically Human Resources organization to which you assign employees. You assign each operating unit to a business group in the financial options setup. You can assign the same business group to different operating units including to operating units in different financial sets of books. You can setup a separate business group for each operating unit if you want to segregate and maintain each group of employees separately. Oracle provides one setup business group you can use.
Locations are shared across Business Groups in HRMS and with two other Oracle applications: Inventory and Purchasing. HRMS does not use some of the fields in the Location window. These fields are disabled for HRMS users. For example, the Legal Address check box is read-only and supports future functionality in Oracle Financials.
By default, the “Approvals Management Administrator” and “Approvals Management Business Analyst” responsibilities do not have any functions associated with them, because their access is restricted by Role Based Access Control (RBAC).
So we need to assign role AME_BUS_ANALYST to user
An operator is a symbol that tells the compiler to perform specific mathematical or logical manipulation. PL/SQL language is rich in built-in operators
A data flow diagram (DFD) is a graphical representation of the "flow" of data through an information system, modeling its process aspects.
Why DFD technique is so Popular?
Symbols used in DFD
Constructing DFD Models
Data Dictionary
Developing the DFD model of System
Level O DFD or Context Diagram
Level 1 DFD
Strengths of DFD Model
Weaknesses of DFD Model
Generating a custom Ruby SDK for your web service or Rails API using Smithyg2nightmarescribd
Have you ever wanted a Ruby client API to communicate with your web service? Smithy is a protocol-agnostic language for defining services and SDKs. Smithy Ruby is an implementation of Smithy that generates a Ruby SDK using a Smithy model. In this talk, we will explore Smithy and Smithy Ruby to learn how to generate custom feature-rich SDKs that can communicate with any web service, such as a Rails JSON API.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
1. P L / S Q L T u t o r i a l - B y E r G u r p r e e t S i n g h
Visit: http://gsbprogramming.blogspot.in
2. P L / S Q L T u t o r i a l - B y E r G u r p r e e t S i n g h
Visit: http://gsbprogramming.blogspot.in
Assigning SQL Query Results to PL/SQL Variables
You cannot write SQL select statements directly in your PL/SQL block. For example:
BEGIN
SELECT emp_name, emp_salary FROM employee WHERE emp_id=10;
END;
When you run this code this will throw an error.
So to get the result of SQL select statements you have to use INTO clause.
Note: INTO clause is applicable only for single row SELECT statements
So to get assign SQL query results to PL/SQL variables we can use like:
DECLARE
vName varchar2(50);
vSalary number;
BEGIN
SELECT emp_name, emp_salary INTO vName,vSalary
FROM employee WHERE emp_id=10;
dbms_output.put_line(‘Name: ‘||vName||’ and Salary: ‘||vSalary);
END;
This will assign the name of employee to variable vName and salary of employee to variable vSalary
whose employee id is 10. The output will be:
Name: Gurpreet Singh and Salary: 100000
3. P L / S Q L T u t o r i a l - B y E r G u r p r e e t S i n g h
Visit: http://gsbprogramming.blogspot.in
Now this INTO clause is applicable only for single rows, So if you need to access the multiple rows then?
Then you can use the CURSORS
CURSORS
Oracle creates a memory area, known as context area, for processing an SQL statement, which contains
all information needed for processing the statement, for example, number of rows processed, etc. 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. There are two types of cursors:
Implicit Cursors
Explicit Cursors
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.
When you write DML statements (INSERT, UPDATE, DELETE) then implicit cursor gets associated with it.
For example, when we write an INSERT statement then cursor holds the data to be inserted and when we
write DELETE or UPDATE statement then cursor holds the data that will be affected by those statements.
There are various attributes of implicit cursors:
Attribute Description
SQL%FOUND It tells whether any row has been affected with the statement. If one or
more is affected then it returns TRUE otherwise FALSE. For example, for an
update statement, if any row has been affected then it will return TRUE.
SQL%NOTFOUND It is opposite of SQL%FOUND. It returns TRUE if no row has been affected
SQL%ROWCOUNT It tells how many rows have been affected
For example:
4. P L / S Q L T u t o r i a l - B y E r G u r p r e e t S i n g h
Visit: http://gsbprogramming.blogspot.in
BEGIN
UPDATE employee SET emp_salary=1000 WHERE dept_id=20;
IF SQL%FOUND THEN
dbms_output.put_line(‘Salary of ‘||SQL%ROWCOUNT||’ employees is updated’);
ELSE
dbms_output.put_line(‘Salary not updated of any employee’);
END IF;
END;
Output:
Salary of 4 employees is updated
Explicit Cursors
Explicit cursors are defined by programmer. Explicit cursors are used for those select statements which
return more than one rows.
Working with Explicit Cursors:
Declare the cursor for initializing in the memory
Opening the cursor for allocating memory
Fetching the cursor for retrieving the data
Closing the cursor to release the allocated memory
For example:
DECLARE OPEN FETCH CLOSE
5. P L / S Q L T u t o r i a l - B y E r G u r p r e e t S i n g h
Visit: http://gsbprogramming.blogspot.in
DECALRE
CURSOR c1 IS
SELECT emp_id, emp_name FROM employee WHERE dept_id=10;
vId number;
vName varchar2(50);
BEGIN
OPEN c1;
LOOP
FETCH c1 INTO vId, vName;
EXIT WHEN c1%NOTFOUND;
dbms_output.put_line(‘ID: ‘||vId||’ Name: ‘||vName);
END LOOP;
CLOSE c1;
END;
It will display the ID and Name of those employees whose dept_id is 10
We can skip the OPEN, FETCH and CLOSE by using the for loop
DECALRE
CURSOR c1 IS
SELECT emp_id, emp_name FROM employee WHERE dept_id=10;
BEGIN
OPEN c1;
FOR c11 IN c1 LOOP
dbms_output.put_line(‘ID: ‘||c11.emp_id||’ Name: ‘||c11.emp_name);
END LOOP;
END;
6. P L / S Q L T u t o r i a l - B y E r G u r p r e e t S i n g h
Visit: http://gsbprogramming.blogspot.in
When we use for loop we can access the columns using the loop variable like we have used:
c11.emp_id and c11.emp_name
PASSING VALUES TO CURSORS
We can also pass the values to cursors. For example: in above example we can pass the dept_id rather
than just hard coding it to dept _id=10
DECALRE
CURSOR c1( id number) IS
SELECT emp_id, emp_name FROM employee WHERE dept_id=10;
BEGIN
OPEN c1;
FOR c11 IN c1(10) LOOP --Passing dept_id=10
dbms_output.put_line(‘ID: ‘||c11.emp_id||’ Name: ‘||c11.emp_name);
END LOOP;
END;
DECALRE
CURSOR c1( id number) IS
SELECT emp_id, emp_name FROM employee WHERE dept_id=10;
BEGIN
OPEN c1;
FOR c11 IN c1(20) LOOP --Passing dept_id=20
dbms_output.put_line(‘ID: ‘||c11.emp_id||’ Name: ‘||c11.emp_name);
END LOOP;
END;
7. P L / S Q L T u t o r i a l - B y E r G u r p r e e t S i n g h
Visit: http://gsbprogramming.blogspot.in
Similarly, we can pass other values.
Program to print the sum of salaries of the employees whose salary is greater than 1000
DECALRE
CURSOR c1 IS
SELECT emp_salary FROM employee ORDER BY salary DESC;
vSum number :=0;
BEGIN
OPEN c1;
FOR c11 IN c1 LOOP
IF c11.salary<=1000 THEN
EXIT;
vSum:= vSum+c11.emp_salary;
END LOOP;
dbms_output.put_line(‘Total Sum: ‘||vSum);
END;