Computer Science & Engineering 2111 CSE 2111 Lecture NZ Function 1CSE 2111 NZ Function.

Slides:



Advertisements
Similar presentations
The Sales/Collection Business Process Accounts Receivable Query Join & Null to Zero (NZ) considerations 1.
Advertisements

Chapter 4 Joining Multiple Tables
CPSC 203 Introduction to Computers Lab 23 By Jie Gao.
Computer Science & Engineering 2111 CONDITIONAL STATISTICAL FUNCTIONS 1 CSE 2111 Lecture Conditional Statistical Functions.
Computer Science & Engineering 2111 IF and Boolean Functions 1 CSE 2111 Lecture-IF and Boolean Functions.
General Computer Science for Engineers CISC 106 Lecture 20 Dr. John Cavazos Computer and Information Sciences 04/08/2009.
Some relationship types Using the Builder2 schema.
Using Relational Databases and SQL Steven Emory Department of Computer Science California State University, Los Angeles Lecture 5: Subqueries and Set Operations.
Computer Science & Engineering 2111 Vlookup and Hlookup Functions Syntax 1CSE 2111 Lecture Vlookup and Hlookup.
Inner join, self join and Outer join Sen Zhang. Joining data together is one of the most significant strengths of a relational database. A join is a query.
Chapter 11.1 and 11.2 Data Manipulation: Relational Algebra and SQL Brian Cobarrubia Introduction to Database Management Systems October 4, 2007.
Computer Science & Engineering 2111 CSE 2111 Lecture Querying a Database 1CSE 2111 Lecture- Querying a Database.
Computer Science & Engineering 2111 Introduction to Database Management Systems Relationships and Database Creation 1 CSE 2111 Introduction to Database.
Computer Science & Engineering 2111 CSE 2111 Lecture Basic Criteria in Queries 1CSE 2111 Lecture-Basic Criteria in Queries.
Resources – MS Access Free Online Training Resources  Using an Access database to store and information (2 min)
Chapter 06: Lecture Notes (CSIT 104) 1 Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 1 Copyright © 2008 Prentice-Hall. All rights reserved.
CS&E 1111 AcQueries Querying in Access Sorting data Aggregating Data Performing Calculations Objectives: Learn how to use the Access Query Design Tool.
Ashwani Roy Understanding Graphical Execution Plans Level 200.
Lecture 2 of Advanced Databases Advanced SQL Instructor: Mr.Ahmed Al Astal.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts - 5 th Edition, Oct 5, 2006 Outer Join n An extension of the join operation that avoids loss.
M Taimoor Khan Course Objectives 1) Basic Concepts 2) Tools 3) Database architecture and design 4) Flow of data (DFDs)
Query Processing. Steps in Query Processing Validate and translate the query –Good syntax. –All referenced relations exist. –Translate the SQL to relational.
Computer Science & Engineering 2111 Lecture 11 Querying a Database 1.
Using Special Operators (LIKE and IN)
NULLs & Outer Joins Objectives of the Lecture : To consider the use of NULLs in SQL. To consider Outer Join Operations, and their implementation in SQL.
Texas State Technical College DISCOVER! Inner Joins Let’s get together… yeah yeah yeah!
JOINING TABLES Using multiple tables [in a report] complicates the reporting environment….. Linking tables (often also known as joining tables) consists.
Joins We will look at joins again this time we will closer examine each join type in detail. We will look at the following join types. a)inner join b)Right.
Computer Science & Engineering 2111 Querying a Database 1CSE 2111 Lecture- Querying a Database.
Computer Science & Engineering 2111 CSE 2111 Lecture Multiple and Compound Criteria in Queries 1 CSE 2111 Lecture-Multiple and Compound Criteria in Queries.
IB Computer Science – Logic
Lecture 8 – SQL Joins – assemble new views from existing tables INNER JOIN’s The Cartesian Product Theta Joins and Equi-joins Self Joins Natural Join.
Computer Science & Engineering 2111 Outer Joins 1CSE 2111 Lecture- Inner Vs. Outer Jioins.
NULL VALUES CHAPTER 5 (6/E) CHAPTER 8 (5/E) 1. LECTURE OUTLINE  Dealing with null values Three-valued logic Effects in WHERE clauses IS NULL Effects.
SQL Select Statement IST359.
CS&E 1111 Exreference Microsoft Excel Reference Functions Objectives: l Understanding and using Reference Functions l The computer’s algorithm l Syntax.
Computer Science & Engineering 2111 Lecture 13 Outer Joins 1.
SqlExam1Review.ppt EXAM - 1. SQL stands for -- Structured Query Language Putting a manual database on a computer ensures? Data is more current Data is.
Functional Programming IN NON-FUNCTIONAL LANGUAGES.
In this session, you will learn to: Query data by using joins Query data by using subqueries Objectives.
Review Types of Relationship – there are in general three different types of relationships - One to One – where each record in one table can have not more.
Query Optimization Cases. D. ChristozovINF 280 DB Systems Query Optimization: Cases 2 Executable Block 1 Algorithm using Indices (if available) Temporary.
Computer Science & Engineering 2111 Sorting in Queries 1CSE 2111 Lecture-Advanced Queries.
Computer Science & Engineering 2111 Database Objects 1 CSE 2111 Introduction to Database Management Systems.
Slide 1 of 32ASH-Training Querying and Managing Data Using SQL Server 2014 By: Segla In this session, you will learn to: Query data by using joins Query.
 MySQL  DDL ◦ Create ◦ Alter  DML ◦ Insert ◦ Select ◦ Update ◦ Delete  DDL(again) ◦ Drop ◦ Truncate.
Computer Science & Engineering 2111 Inner Joins and Advanced Queries 1CSE 2111 Lecture-Advanced Queries.
® Microsoft Access 2010 Tutorial 9 Using Action Queries and Advanced Table Relationships.
Select Complex Queries Database Management Fundamentals LESSON 3.1b.
IFS180 Intro. to Data Management Chapter 10 - Unions.
Basic Criteria in Queries
3d. Structured Query Language – JOIN Operations
6.001 Jeopardy.
Intro to Programming Week # 6 Repetition Structure Lecture # 10
SQL Query Joins ASP.Net 2.0 – Visual Studio 2005
Hierarchy of Data in a Database
Introduction to Database Systems
Chapter 4: Intermediate SQL Joins
Discrete Structures for Computer Science
INNER JOIN INNER SPRIDEN SARADAP
Introduction to Database Systems CSE 444 Lecture 23: Final Review
CS4222 Principles of Database System
CMPT 354: Database System I
Lecture 30: Final Review Wednesday, December 6, 2000.
Query Functions.
Access: Queries III Participation Project
Lecture 30: Final Review Wednesday, December 10, 2003.
Introduction to Database Systems CSE 444 Lecture 23: Final Review
HW1 Debrief, Tail Recursion, More Pattern-Matching Winter 2019
Trainer: Bach Ngoc Toan– TEDU Website:
Presentation transcript:

Computer Science & Engineering 2111 CSE 2111 Lecture NZ Function 1CSE 2111 NZ Function

ClientPayments Let’s take a closer look at the PaymentsByClient Query….in an outer join with respect to Clients, when a record from Clients doesn’t have any matching records in Payments, it’s included in the results, but the fields that would have come from Payments are NULL. CSE 2111 NZ Function2

Access doesn’t know what $100 – NULL is, so it returns NULL as the result. But we know that in this case, NULL should be treated like zero – can we help Access out? CSE 2111 NZ Function3

NZ Function Syntax: Nz(variant, value_if_null) If this argument evaluates to NULL…. Return this value If the variant argument does NOT evaluate to NULL, Nz will return whatever the variant argument does evaluate to. CSE 2111 NZ Function4

BalanceDue Tables: PaymentsByClient,ChargesByClient Join On: ClientIDJoin Type: Inner Field: ClientIDFirstNameLastNameSumOfAmount Balance* Table: PaymentsBy Client ChargesBy Client Total: Sort: Show: XXXXXX Balance: Nz([Charges]![SumOfAmount],0) – Nz([Payments]![SumOfAmount],0) Balance Due with the Nz function….. CSE 2111 NZ Function5

Finally! CSE 2111 NZ Function6