Today s Experts. Mastering Dates Using SEQUEL 1. Technical Consultant. Technical Consultant

Size: px
Start display at page:

Download "Today s Experts. Mastering Dates Using SEQUEL 1. Technical Consultant. Technical Consultant"

Transcription

1 Today s Experts Steven Spieler Vivian Hall Technical Consultant Technical Consultant Mastering Dates Using SEQUEL 1

2 Mastering Dates Using SEQUEL Mastering Dates Using SEQUEL 2

3 Working with dates on the System i can be confusing. Confusing Dates I'm sure you have seen how challenging dates can be to work with on the System i. Different applications store dates in many ways. In one file you might see one format, and in another file the format is completely different. On some systems you may have dates that have been entered incorrectly or don t have a value yet. Maybe the date field contains a zero or is blank. In one file you may have character fields for dates, and in another file they are stored as a number. What you want is to be able to display your dates properly in interactive requests or in reports. You want to use dates to choose records and to sort output. You want to manipulate dates to solve business issues and answer questions. All of this can be a challenge. Mastering Dates Using SEQUEL 3

4 Understanding dates can help you answer your business questions. Learn about Dates Understanding dates is complicated for two reasons. First, you need to understand how dates might be stored and learn how to apply SEQUEL functions to convert and manipulate your dates. Secondly, and more importantly, you have to understand YOUR dates - where they are, what they are, and what they mean. Just as data can be different between applications, data will vary from business to business and from process to process. Understanding how your data is stored, how it is used, and how it relates to your organization is the key to solving any data issue. Mastering Dates Using SEQUEL 4

5 Many users are unaware of date issues and how to solve them. Character dates with different padding Numbers that may or may not be a real date Blanks or zero dates Dates stored in separate fields Different date formats and attributes Date Issues Issues related to dates are numerous and varied. Based on experience we have seen many common issues such as: Character dates with different padding (leading vs. trailing blanks). Numbers that may or may not be a real date. Blanks or zero date values. Dates stored in separate fields. Dates stored in different formats and with different attributes. How is record selection and sorting affected by these issues? How do I control how dates look? Again, understanding your data and how to use SEQUEL will help you solve any date related issue. Mastering Dates Using SEQUEL 5

6 SEQUEL helps solve your daterelated issues and questions. SEQUEL Can Help SEQUEL has many date related functions that will help you create, manipulate, and control your dates. Fields can be combined, or taken apart. You can control how to display your dates in views and reports. SEQUEL has functions to make your dates look like anything you want month-day-year, or year-month-day, and so on. There are functions that can help you test for valid date values and functions to help you work with, or work-around zero and blank values. You can perform date arithmetic, create durations, and much more. Mastering Dates Using SEQUEL 6

7 Learn these techniques and functions to control date issues. System i date-related issues and common problems How to use SEQUEL to create and manipulate dates Real-world examples Learn Techniques There are many resources available to help you learn about SEQUEL and date related functions. From webinars to on-site, instructor led training, to user guides and on-line help built into the software. All of these can help you expand your understanding of SEQUEL. Based on the volume of calls and requests from our users, we developed this session to address the many date issues we see in support. In the next hour we will discuss three areas related to dates: System i date related issues and common problems How to use SEQUEL to create and manipulate dates How to solve some common problems Mastering Dates Using SEQUEL 7

8 Understand How the System i Stores Dates Dates on the System i This first section of today s presentation will focus on three areas: We will spend some time talking about how dates can be stored on the System i and their different attributes. Next, we will look at issues related to dates that we see most often in support. I'm sure you will recognize many of these problems as well. Finally, we will talk about true dates on the System i Date Data Types. Mastering Dates Using SEQUEL 8

9 Historically, dates have been stored as character and numeric values. Characters and Numbers Before date data types were introduced most applications we have encountered used character and numeric fields to store date values. Date and time values are special kinds of information. Although they are referred to in numeric terms, they are constrained by rules that don t apply to base 10 numbers such as: Month values must be integers between one and twelve Day values must be integers greater than zero and less than 28, 30, or 31 February 29 is sometimes (but not usually) allowed The format and attributes for the data may have been dictated by the application, the decision of the developer, or sometimes storage was a factor. Remember Y2K? Sometimes you will see separate year, month, day and century fields that together represent a particular date for a given file or application. Mastering Dates Using SEQUEL 9

10 The System i can store date values in many formats. Form mmddyy mmddyyyy ddmmyy ddmmyyyy yymmdd cyymmdd yyyymmdd yyddd cyyddd yyyyddd Example Date Formats As the table shows above, date values come in many shapes and sizes. Some are better than others depending on what you are trying to use them for. Some may be better suited for display purposes. Some may make sorting output easier than others. Some lend themselves to record selection better than others. Numeric fields make arithmetic manipulation easier than character fields. Character fields can be manipulated as well but require an extra step to convert them to number. Mastering Dates Using SEQUEL 10

11 Dates can be stored in separate fields. Separate Fields Many databases will have dates separated into several fields. There can be fields for the month, day, and year values. A common fix for Y2K field size issues was to add a separate century field to a file. So you might see a separate century and date field that when combined will produce the full date with a 4 digit year. In the past, we could use math to combine these fields together if they were numeric. Mastering Dates Using SEQUEL 11

12 Users see many common issues when it comes to dates. Presentation, sorting, and record selection Data mapping and select/omit errors Creating prompts for dates Common Issues As we have seen, dates can be stored with different attributes, in different formats, and even in separate fields. It is no wonder users have encountered so many issues related to dates. The most common issues we have seen are: Zeros and blank dates can make presentation confusing and present problems with sorting and record selection. Data mapping errors and select-omit errors. What do they mean and what causes them? Many people want to make data requests easier for users by prompting for input. Dates for prompts and the correct syntax can cause confusion. Mastering Dates Using SEQUEL 12

13 Dates stored as zero or invalid dates. How to display? How to work around? How to convert? Zero Dates Dates that are stored as numeric or character can sometimes be zero or blank. If a package hasn t been delivered, or a patient hasn t checked out of the hospital, or an outstanding receivable hasn t been collected, these dates will be blank or zero. This is not necessarily a bad thing. It just presents a different set of issues to be aware of. How do you want to display a zero date in your views or reports? Do you want to set them to a default value? Do you simply want to skip them altogether during record selection? Invalid Dates Invalid dates are values that aren't real like December 32 nd, or a month of 13. This usually represents erroneous data in the file. Using SEQUEL, you can test for them, and decide what to do with them. Either change them, skip them, or fix them in the file. Mastering Dates Using SEQUEL 13

14 Data mapping and select/omit errors when converting. Error Messages Another issue seen by our users has to do with date related error messages. Depending on your choices for working with bad or zero values you may encounter error messages returned by the query processor. Data mapping errors occur when you attempt to convert a character or numeric field containing a bad or zero value to a date. This typically happens when CVTDATE is used on the SELECT clause Select / Omit errors happen most often when you attempt to use a converted date containing bad or zero dates for record selection. Typically, this occurs when CVTDATE is used on the WHERE clause. Mastering Dates Using SEQUEL 14

15 Using dates as a prompt value. Date Prompts A third issue we receive many calls about has to do with date prompts. Prompts can easily be added to views for all data values. However, date data fields or converted dates require some special consideration if you want to prompt for them in your views. We will look at how to solve all three of these issues in the third part of this presentation. Mastering Dates Using SEQUEL 15

16 More and more databases are storing dates as date data types. Date Types Date types are a relatively new data format on the System i. We will see the power and versatility of this unique format and how to take advantage of it using SEQUEL. Mastering Dates Using SEQUEL 16

17 Date data type fields are intelligent. Intelligence Date data type fields are considered intelligent in that they are seen by the System i as a true date. Because of this, they can be manipulated in many ways. They can be added and subtracted to and from each other to create new date values. They can be compared against each other for record selection and used to sort data correctly regardless of how the date values are displayed. Unique Date data type fields are neither character nor numeric. They are a unique type of data. A benefit of this is they can never be zero, and should never be invalid. Mastering Dates Using SEQUEL 17

18 Date types can be manipulated in many ways. Date Manipulation The power of date data types lies in the ability to manipulate and use them in different ways. They can be added together and subtracted from each other to create new date values. Durations can be created easily and individual date elements (month, day, year) can be extracted. Mastering Dates Using SEQUEL 18

19 How to Work With, Convert, and Manipulate Dates Working with Dates We will now spend some time talking about different ways to work with date fields, including true date types, system values, and dates converted from your numeric or character values. Mastering Dates Using SEQUEL 19

20 Use CVTDATE to create true dates from your char and number fields. Form mmddyy mmddyyyy ddmmyy ddmmyyyy yymmdd cyymmdd yyyymmdd yyddd cyyddd yyyyddd Example Format MDY MDY1 DMY DMY1 YMD CYMD YMD1 JUL CJUL JUL1 CVTDATE If your date values are not stored as date data types but you know how they are formatted in your database, then you can convert them into date data types in your view. Once converted you gain all the advantages of date data types. SEQUEL includes a date conversion function that makes it easy to convert dates in your System i database into date data type fields. CVTDATE can convert any of 10 different formats into date type values. The table above can be found in the Sequel Quick Reference card, the user guide and the on-line help. You can see an example of a date value, it s form and format. The format is used in the CVTDATE function. Mastering Dates Using SEQUEL 20

21 CVTDATE syntax and examples. CVTDATE(field, fmt) Syntax There are only two forms for the CVTDATE function. One for a single field, and one for separate date fields. The example above shows the syntax for a single field. You only need to specify the field name and the format separated with a comma. The CVTDATE function will accept almost any valid numeric or character date provided that its length and format matches one of the allowed types. This is where knowledge of your database is important. Is the date you want to convert Y-M-D, or M-D-Y, or is it a Julian date? Is it an 8 position field or 6? Mastering Dates Using SEQUEL 21

22 Use CVTDATE with separate fields. CVTDATE(cc, yy, mm, dd) Syntax This second example shows the syntax for separate date fields. There is no format to specify. Just make sure to put the fields in the order you see here (high to low), and separate them with commas. Mastering Dates Using SEQUEL 22

23 Extracting individual elements from date type fields. Date/Timestamp/Duration YEAR(expression) MONTH(expression) DAY(expression) DAYOFWEEK(expression) DAYOFYEAR(expression) QUARTER(expression) WEEK(expression) returns the year (4,0) returns the month (2,0) returns the day (2,0) returns value 1-7 with Sunday as 1 returns value returns value 1-4 returns value 1-53 Extract Functions Many functions are available to extract just a portion of a date, time, or timestamp expression. These functions can be used on date fields, a literal value, or an expression. Mastering Dates Using SEQUEL 23

24 Using system values. External Values Several reserved fields can be accessed within your SEQUEL statement to acquire information about the current operating system environment. The external values can be used in any part of the SEQUEL statement that date/time/timestamp values or literals can appear. So, you can add them to the SELECT for display, or in an expression, or you can use them in the WHERE for record selection. These fields return current System i system values for date, time, timestamp and timezone. The data type and length of the returned values match the data type implied by the name. The external values is accessed one time. Each row of the query will have the same value. Mastering Dates Using SEQUEL 24

25 CURRENT DATE WHERE duedate < CURRENT DATE SELECT DAYS(CURRENT DATE) DAYS(orderdate) WHERE YEAR(CURRENT DATE) = YEAR(paydate) Current Date You will use CURRENT DATE in many ways in your views. For record selection you can perform age-based filtering as in the first example. You can use the DAYS function to calculate the number of days between two dates. In the last example, we can filter records to show only payments made in the current year. Mastering Dates Using SEQUEL 25

26 Perform date math with date fields. Subtract to create date durations Increment to create new dates Decrement to create new dates Date Math There are three arithmetic operations allowed using date and time values: subtraction, increment and decrement. Mastering Dates Using SEQUEL 26

27 Subtract dates from each other to create durations. Date Date = Date Duration Time Time = Time Duration Timestamp Timestamp = Timestamp Duration CVTDATE( , ymd1) 5/1/2007 = 10,424 Subtraction Date subtraction is the simplest date operation. The result is a date duration - the number or years, months and days between the two dates. Sometimes the result of a date subtraction can be confusing. This is because the result looks like any other (8,0) decimal value, but it has special meaning because it represents elapsed time. The result of the example above - 10,424 - tells us there is 1 year, 4 months and 24 days between the two dates. Mastering Dates Using SEQUEL 27

28 Add or subtract date values to create a new date. Date + Date Duration = Date Value Time + Time Duration = Time Value Timestamp + Any Duration = Timestamp Value Date Date Duration = Date Value Time Time Duration = Time Value Timestamp Any Duration = Timestamp Value Increment / Decrement Date/time arithmetic also allows a date/time/timestamp value to be incremented or decremented by a duration. The result is a value of the same data type that has been changed by some interval. Adding or subtracting a number of months from a date has the same effect as turning pages on a calendar. The day portion of the result is unchanged unless doing so would cause an invalid date (such as September 31) in which case it is adjusted to reflect the end of the month Mastering Dates Using SEQUEL 28

29 Increment / Decrement Examples SELECT * FROM custmast WHERE CURRENT DATE 30 Days > paydate SELECT * FROM ordhead WHERE CVTDATE(cooyr,coomn,coody) + 1 month < CURRENT DATE SELECT oidate + 30 years COLHDG( Maturity date ) FROM security SELECT cname, paydate, paydate + 2 MONTHS + 27 DAYS FROM custmast Examples The first three examples above use a duration to increment or decrement a date value. The resulting date value can be presented to the user or used in a comparison with another date. Increment or decrement expressions requiring complex durations with a number of years, months and days can also be created. The last example demonstrates an increment for both months and days in the same statement. The increment uses a complex labeled duration of 2 months and 27 days. Mastering Dates Using SEQUEL 29

30 Use Date Data Types to Solve Common Problems Solve Date Issues In this final section of today s presentation, we will spend some time and see how to apply what we have learned about working with dates to solve some common date related issues. We will look at different ways to handle dates in your files that may be zero or invalid. There are many functions that we can use to set them to a default, present them, or skip them. We will look at different ways to create aging, and use this to create conditional columns for type results. Lastly, we will see how dates need some special consideration when filtering records and when using run-time prompts in the WHERE clause. Mastering Dates Using SEQUEL 30

31 Problem Solved: Working with zero and invalid dates. Zero or Blank Dates We know that using CVTDATE on a zero or invalid date will generate some errors in our view. We will see some ways to work around this issue. Invalid Dates We will use CASE in conjunction with the VALID_DATE function to test the validity of the date value. Mastering Dates Using SEQUEL 31

32 Use CASE to work with your zero dates. Zero Dates We could use the GREATEST function to process a default date value in place of a zero. CASE is used more often to conditionally test for a zero and then use a default value. If your derived column is for display only, you can use the CHAR function to cast the value to whatever date form you like. In the results above we use the USA format to display the date with slashes and a 4 digit year. If you want to display and sort on the converted date field, you can use NULL as the default value. Mastering Dates Using SEQUEL 32

33 Use the VALID_DATE function to test your values. 1=True 0=False -1=Invalid Length -2=Invalid Type Valid Date Function The VALID_DATE function will evaluate a date value and a date type and return an integer result of 1 if true, 0 if false, -1 if the length is invalid, and -2 if the type is invalid. Using these results we can test our date field and then convert it when it is valid. CASE makes this very easy to do as in the example above. Mastering Dates Using SEQUEL 33

34 Valid Date Syntax: VALID_DATE(value, type ) Form mmddyy mmddyyyy ddmmyy ddmmyyyy yymmdd cyymmdd yyyymmdd yyddd cyyddd yyyyddd Example Type *MDY *USA *DMY *DMY *YMD *CYMD *YMD *JUL *JUL *JUL Valid Date Syntax The VALID_DATE syntax is very simple. Specify a date value and a type. The incoming date value can be character or numeric. The function can test many different formats. In the chart above, you can see an example of a date value, it s form and the type value required by the VALID_DATE function. Notice the type must be enclosed in quotes. Mastering Dates Using SEQUEL 34

35 Problem Solved: Aging and date difference. Aging One of the most popular requests we receive in support is how to do aging type operation. There are many ways to create the results shown above. Long ago you would create separate work files for each of the summary columns and join them together in a final view. The conditional calculations in the report writer will also work well for this kind of request, but the results can t be output to an Excel file. This view uses CASE and a DAYs duration to create the aging columns. Mastering Dates Using SEQUEL 35

36 Calculate Days difference. DAYS(paydte) DAYS(idate) = Days Difference DAYS Using the DAYS function on a date value, as in the DAYS(paydte) expression above, will convert the date to a number of days between that date and the start of the System Calendar. When the days of the invoice date is then subtracted, we end up with a number of days between the two dates. Each column will conditionally display the invoice amount field if the days difference falls within the range specified. Mastering Dates Using SEQUEL 36

37 Problem solved: Record selection and date fields. Date Filtering As you can see the value you use to test against a date field requires quotes. The system recognizes this value and automatically converts it to a date type. This is why date prompts can be tricky to set up in your view. Mastering Dates Using SEQUEL 37

38 Use the proper syntax. idate BETWEEN &&BEGDATE AND &&ENDDATE idate BETWEEN 6/1/2008 AND 10/1/2008 Date Prompt Syntax Prompting for date values is different than any other type of prompt. You need to create your prompt as usual in the WHERE clause, but with a slight difference in the syntax. What we see in the example above is WHERE the invoice date is between a beginning date variable and an ending date variable. Both are surrounded in quotes. Notice for dates we need to use two ampersands instead of the usual single ampersand. The value that is tested against the date field will end up looking like a character string month, day, and year, separated with slashes and surrounded in quotes. This is why we use quotes around the variable, and because we use quotes, we must use two ampersands to designate a variable in the SQL. Mastering Dates Using SEQUEL 38

39 In Conclusion: Dates can be confusing and cause many users difficulty. Once you understand your data, and master these techniques, you can gain control over date-related issues. Summary We saw how dates might be stored on the System i and the issues users face when trying to work with date values. We learned how to use Sequel s CVTDATE function to create, present, and manipulate dates and system values in our views. Lastly we solved some real-world problems encountered by many users on the System i such as: Zero and invalid dates Aging and date difference Record selection with date prompts Once you understand your data, and master these techniques, you can gain control over date related issues. Mastering Dates Using SEQUEL 39

40 We are ready for your questions! Today s Experts Steven Spieler Vivian Hall Technical Consultant Technical Consultant Mastering Dates Using SEQUEL 40

41 Thank you for joining us today! CONTACT INFORMATION: Web site: Telephone: or Handouts: Mastering Dates Using SEQUEL 41

BASIC OPERATORS AND FUNCTIONS

BASIC OPERATORS AND FUNCTIONS 4 BASIC OPERATORS AND FUNCTIONS Chapter 3 covers the use of isolated constants and variables in a CL procedure. This chapter explains the various manipulations you can perform in CL to combine two or more

More information

Programming Date and Time APIs

Programming Date and Time APIs System i Programming Date and Time APIs Version 6 Release 1 System i Programming Date and Time APIs Version 6 Release 1 Note Before using this information and the product it supports, read the information

More information

Lecture 05 I/O statements Printf, Scanf Simple statements, Compound statements

Lecture 05 I/O statements Printf, Scanf Simple statements, Compound statements Programming, Data Structures and Algorithms Prof. Shankar Balachandran Department of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 05 I/O statements Printf, Scanf Simple

More information

Convert Date to Lilian Format (CEEDAYS) API

Convert Date to Lilian Format (CEEDAYS) API Convert Date to Lilian Format (CEEDAYS) API Required Parameter Group: 1 input_char_date Input VSTRING 2 picture_string Input VSTRING 3 output_lilian_date Output INT4 Omissible Parameter: 4 fc Output FEEDBACK

More information

Full file at

Full file at SQL for SQL Server 1 True/False Questions Chapter 2 Creating Tables and Indexes 1. In order to create a table, three pieces of information must be determined: (1) the table name, (2) the column names,

More information

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9)

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 3 Professional Program: Data Administration and Management MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) AGENDA

More information

Some of the functions listed will only work properly on OS/400 V5R2 and higher. Enjoy!

Some of the functions listed will only work properly on OS/400 V5R2 and higher. Enjoy! If you are new to free-format RPG and deal with any kind of character or numeric date data, you have no doubt been frustrated trying to figure out how to convert data from one format to another. Or perhaps

More information

Cognos report studio cast string to date. Cognos report studio cast string to date.zip

Cognos report studio cast string to date. Cognos report studio cast string to date.zip Cognos report studio cast string to date Cognos report studio cast string to date.zip Using the Cognos RRDI Report Studio, Report Studio Reports with Parent / Child Work Items; Determine the difference

More information

Unit 4. Scalar Functions and Arithmetic

Unit 4. Scalar Functions and Arithmetic Unit 4. Scalar Functions and Arithmetic What This Unit Is About Scalar functions can be used to manipulate column or expression values. This unit will discuss the format and syntax of basic scalar functions.

More information

Order Import File Definition

Order Import File Definition Order Import File Definition Order Import File Definition February 2013 Page 1 CONTENTS I. INTRODUCTION TO THE ORDERS IMPORT PROCESS 3 II. SUPPORTED FILE FORMATS 3 1. CSV format 3 a. Supported decimal

More information

Title for SAS Global Forum 2014 Sample Paper

Title for SAS Global Forum 2014 Sample Paper Paper 1623-2014 Title for SAS Global Forum 2014 Sample Paper Jenine Milum, Equifax Inc. ABSTRACT No matter how long you ve been programming in SAS, using and manipulating dates still seems to require effort.

More information

The Year argument can be one to four digits between 1 and Month is a number representing the month of the year between 1 and 12.

The Year argument can be one to four digits between 1 and Month is a number representing the month of the year between 1 and 12. The table below lists all of the Excel -style date and time functions provided by the WinCalcManager control, along with a description and example of each function. FUNCTION DESCRIPTION REMARKS EXAMPLE

More information

Medical Office System Chapter 18: Calculator

Medical Office System Chapter 18: Calculator Chapter 18: Calculator This chapter discusses Accessing the Calculator! the calculator program incorporated into the MOS system.! the business and general math functions.! the arithmetic functions.! amortization

More information

Chapter 2 Basic Elements of C++

Chapter 2 Basic Elements of C++ C++ Programming: From Problem Analysis to Program Design, Fifth Edition 2-1 Chapter 2 Basic Elements of C++ At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class Discussion

More information

Reserved Words and Identifiers

Reserved Words and Identifiers 1 Programming in C Reserved Words and Identifiers Reserved word Word that has a specific meaning in C Ex: int, return Identifier Word used to name and refer to a data element or object manipulated by the

More information

How to Use Adhoc Parameters in Actuate Reports

How to Use Adhoc Parameters in Actuate Reports How to Use Adhoc Parameters in Actuate Reports By Chris Geiss chris_geiss@yahoo.com http://www.chrisgeiss.com How to Use Adhoc Parameters in Actuate Reports By Chris Geiss Revised 3/31/2002 This document

More information

How Actuate Reports Process Adhoc Parameter Values and Expressions

How Actuate Reports Process Adhoc Parameter Values and Expressions How Actuate Reports Process Adhoc Parameter Values and Expressions By Chris Geiss chris_geiss@yahoo.com How Actuate Reports Process Adhoc Parameter Values and Expressions By Chris Geiss (chris_geiss@yahoo.com)

More information

SELF TEST. List the Capabilities of SQL SELECT Statements

SELF TEST. List the Capabilities of SQL SELECT Statements 98 SELF TEST The following questions will help you measure your understanding of the material presented in this chapter. Read all the choices carefully because there might be more than one correct answer.

More information

Year 2000 Issues for SAS Users Mike Kalt, SAS Institute Inc., Cary, NC Rick Langston, SAS Institute Inc., Cary, NC

Year 2000 Issues for SAS Users Mike Kalt, SAS Institute Inc., Cary, NC Rick Langston, SAS Institute Inc., Cary, NC Paper 308 Year 2000 Issues for SAS Users Mike Kalt, SAS Institute Inc, Cary, NC Rick Langston, SAS Institute Inc, Cary, NC ABSTRACT This paper addresses the most frequently asked questions about Year 2000

More information

Instructor: Craig Duckett. Lecture 02: Thursday, March 29 th, 2018 SQL Basics and SELECT, FROM, WHERE

Instructor: Craig Duckett. Lecture 02: Thursday, March 29 th, 2018 SQL Basics and SELECT, FROM, WHERE Instructor: Craig Duckett Lecture 02: Thursday, March 29 th, 2018 SQL Basics and SELECT, FROM, WHERE 1 Assignment 1 is due LECTURE 5, Tuesday, April 10 th, 2018 in StudentTracker by MIDNIGHT MID-TERM EXAM

More information

Full file at

Full file at Testbank, Access Chapter 2 1) When designing a database, all of the following statements are true EXCEPT: A) You need to consider the output requirements of the database B) You need not be concerned with

More information

Part 1 - Your First algorithm

Part 1 - Your First algorithm California State University, Sacramento College of Engineering and Computer Science Computer Science 10: Introduction to Programming Logic Spring 2016 Activity A Introduction to Flowgorithm Flowcharts

More information

Using Parameter Queries

Using Parameter Queries [Revised and Updated 21 August 2018] A useful feature of the query is that it can be saved and used again and again, whenever we want to ask the same question. The result we see (the recordset) always

More information

Unit 6. Scalar Functions

Unit 6. Scalar Functions Unit 6. Scalar Functions What This Unit Is About This unit provides information on how to use various common scalar functions. What You Should Be Able to Do After completing this unit, you should be able

More information

Part 1 - Your First algorithm

Part 1 - Your First algorithm California State University, Sacramento College of Engineering and Computer Science Computer Science 10A: Accelerated Introduction to Programming Logic Spring 2017 Activity A Introduction to Flowgorithm

More information

Beginning Tutorials DATE HANDLING IN THE SAS SYSTEM. Bruce Gilsen, Federal Reserve Board

Beginning Tutorials DATE HANDLING IN THE SAS SYSTEM. Bruce Gilsen, Federal Reserve Board DATE HANDLING IN THE SAS SYSTEM Bruce Gilsen, Federal Reserve Board 1. Introduction A calendar date can be represented in the SAS system as a SAS date value, a special representation of a calendar date

More information

1. Introduction to Microsoft Excel

1. Introduction to Microsoft Excel 1. Introduction to Microsoft Excel A spreadsheet is an online version of an accountant's worksheet, which can automatically do most of the calculating for you. You can do budgets, analyze data, or generate

More information

GIFT Department of Computing Science. [Spring 2016] CS-217: Database Systems. Lab-3 Manual. Single Row Functions in SQL

GIFT Department of Computing Science. [Spring 2016] CS-217: Database Systems. Lab-3 Manual. Single Row Functions in SQL GIFT Department of Computing Science [Spring 2016] CS-217: Database Systems Lab-3 Manual Single Row Functions in SQL V3.0 4/26/2016 Introduction to Lab-3 Functions make the basic query block more powerful,

More information

Common SQL Questions

Common SQL Questions L04 Common SQL Questions Why and How-to Tuesday, May 9, 2006 08:30a.m. 09:40 a.m. There are a few questions that come up time and time again. Why do certain SQL statements behave the way they do, and how

More information

VARIABLES. Aim Understanding how computer programs store values, and how they are accessed and used in computer programs.

VARIABLES. Aim Understanding how computer programs store values, and how they are accessed and used in computer programs. Lesson 2 VARIABLES Aim Understanding how computer programs store values, and how they are accessed and used in computer programs. WHAT ARE VARIABLES? When you input data (i.e. information) into a computer

More information

Java Programming Fundamentals - Day Instructor: Jason Yoon Website:

Java Programming Fundamentals - Day Instructor: Jason Yoon Website: Java Programming Fundamentals - Day 1 07.09.2016 Instructor: Jason Yoon Website: http://mryoon.weebly.com Quick Advice Before We Get Started Java is not the same as javascript! Don t get them confused

More information

Fundamentals of Programming Session 4

Fundamentals of Programming Session 4 Fundamentals of Programming Session 4 Instructor: Reza Entezari-Maleki Email: entezari@ce.sharif.edu 1 Fall 2011 These slides are created using Deitel s slides, ( 1992-2010 by Pearson Education, Inc).

More information

Defining Notifications Reminders

Defining Notifications  Reminders Defining Notifications E-mail Reminders www.docusnap.com TITLE Defining Notifications AUTHOR Docusnap Consulting DATE 07/07/2015 The reproduction and distribution of this document as a whole or in part

More information

12. Pointers Address-of operator (&)

12. Pointers Address-of operator (&) 12. Pointers In earlier chapters, variables have been explained as locations in the computer's memory which can be accessed by their identifer (their name). This way, the program does not need to care

More information

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */ Overview Language Basics This chapter describes the basic elements of Rexx. It discusses the simple components that make up the language. These include script structure, elements of the language, operators,

More information

Part 1 Simple Arithmetic

Part 1 Simple Arithmetic California State University, Sacramento College of Engineering and Computer Science Computer Science 10A: Accelerated Introduction to Programming Logic Activity B Variables, Assignments, and More Computers

More information

C++ Reference NYU Digital Electronics Lab Fall 2016

C++ Reference NYU Digital Electronics Lab Fall 2016 C++ Reference NYU Digital Electronics Lab Fall 2016 Updated on August 24, 2016 This document outlines important information about the C++ programming language as it relates to NYU s Digital Electronics

More information

Full file at

Full file at Java Programming: From Problem Analysis to Program Design, 3 rd Edition 2-1 Chapter 2 Basic Elements of Java At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class

More information

If Statements, For Loops, Functions

If Statements, For Loops, Functions Fundamentals of Programming If Statements, For Loops, Functions Table of Contents Hello World Types of Variables Integers and Floats String Boolean Relational Operators Lists Conditionals If and Else Statements

More information

Access Intermediate

Access Intermediate Access 2013 - Intermediate 103-134 Advanced Queries Quick Links Overview Pages AC124 AC125 Selecting Fields Pages AC125 AC128 AC129 AC131 AC238 Sorting Results Pages AC131 AC136 Specifying Criteria Pages

More information

Programming for Engineers Introduction to C

Programming for Engineers Introduction to C Programming for Engineers Introduction to C ICEN 200 Spring 2018 Prof. Dola Saha 1 Simple Program 2 Comments // Fig. 2.1: fig02_01.c // A first program in C begin with //, indicating that these two lines

More information

Fundamentals. Fundamentals. Fundamentals. We build up instructions from three types of materials

Fundamentals. Fundamentals. Fundamentals. We build up instructions from three types of materials Fundamentals We build up instructions from three types of materials Constants Expressions Fundamentals Constants are just that, they are values that don t change as our macros are executing Fundamentals

More information

When faced with 2,000 rows of data, in the basic form shown below, a CHARTrunner user might conclude the data cannot be charted:

When faced with 2,000 rows of data, in the basic form shown below, a CHARTrunner user might conclude the data cannot be charted: Charting counted incidents Customers often need to chart Excel data that is the result of a database query. The database might be a customer relationship management system (CRM) or it might be a hospital

More information

Access Intermediate

Access Intermediate Access 2010 - Intermediate 103-134 Advanced Queries Quick Links Overview Pages AC116 AC117 Selecting Fields Pages AC118 AC119 AC122 Sorting Results Pages AC125 AC126 Specifying Criteria Pages AC132 AC134

More information

C Language Part 1 Digital Computer Concept and Practice Copyright 2012 by Jaejin Lee

C Language Part 1 Digital Computer Concept and Practice Copyright 2012 by Jaejin Lee C Language Part 1 (Minor modifications by the instructor) References C for Python Programmers, by Carl Burch, 2011. http://www.toves.org/books/cpy/ The C Programming Language. 2nd ed., Kernighan, Brian,

More information

Use of Formulas. Formula Usage. Formula Example

Use of Formulas. Formula Usage. Formula Example Formula Usage, page 1 Formula Example, page 1 Variables, page 2 Operators, page 9 Built-in Functions, page 1 Custom Functions, page 18 Formula Usage You can use formulas in many routing nodes to both categorize

More information

age = 23 age = age + 1 data types Integers Floating-point numbers Strings Booleans loosely typed age = In my 20s

age = 23 age = age + 1 data types Integers Floating-point numbers Strings Booleans loosely typed age = In my 20s Intro to Python Python Getting increasingly more common Designed to have intuitive and lightweight syntax In this class, we will be using Python 3.x Python 2.x is still very popular, and the differences

More information

School of Computer Science CPS109 Course Notes 5 Alexander Ferworn Updated Fall 15

School of Computer Science CPS109 Course Notes 5 Alexander Ferworn Updated Fall 15 Table of Contents 1 INTRODUCTION... 1 2 IF... 1 2.1 BOOLEAN EXPRESSIONS... 3 2.2 BLOCKS... 3 2.3 IF-ELSE... 4 2.4 NESTING... 5 3 SWITCH (SOMETIMES KNOWN AS CASE )... 6 3.1 A BIT ABOUT BREAK... 7 4 CONDITIONAL

More information

Language Reference Manual

Language Reference Manual TAPE: A File Handling Language Language Reference Manual Tianhua Fang (tf2377) Alexander Sato (as4628) Priscilla Wang (pyw2102) Edwin Chan (cc3919) Programming Languages and Translators COMSW 4115 Fall

More information

LABORATORY. 16 Databases OBJECTIVE REFERENCES. Write simple SQL queries using the Simple SQL app.

LABORATORY. 16 Databases OBJECTIVE REFERENCES. Write simple SQL queries using the Simple SQL app. Dmitriy Shironosov/ShutterStock, Inc. Databases 171 LABORATORY 16 Databases OBJECTIVE Write simple SQL queries using the Simple SQL app. REFERENCES Software needed: 1) Simple SQL app from the Lab Manual

More information

The Way of the Semicolon -or- Three Things I Wish I Had Known Before I Ever Coded One Patricia Hettinger, Oakbrook Terrace, IL

The Way of the Semicolon -or- Three Things I Wish I Had Known Before I Ever Coded One Patricia Hettinger, Oakbrook Terrace, IL The Way of the Semicolon -or- Three Things I Wish I Had Known Before I Ever Coded One Patricia Hettinger, Oakbrook Terrace, IL ABSTRACT Learning SAS or teaching it to someone else can be very difficult.

More information

Course contents. Overview: Goodbye, calculator. Lesson 1: Get started. Lesson 2: Use cell references. Lesson 3: Simplify formulas by using functions

Course contents. Overview: Goodbye, calculator. Lesson 1: Get started. Lesson 2: Use cell references. Lesson 3: Simplify formulas by using functions Course contents Overview: Goodbye, calculator Lesson 1: Get started Lesson 2: Use cell references Lesson 3: Simplify formulas by using functions Overview: Goodbye, calculator Excel is great for working

More information

Title. Syntax. stata.com. datetime business calendars creation Business calendars creation

Title. Syntax. stata.com. datetime business calendars creation Business calendars creation Title statacom datetime business calendars creation Business calendars creation Syntax Description Remarks and examples Also see Syntax Business calendar calname and corresponding display format %tbcalname

More information

Creating a Relational Database Using Microsoft SQL Code. Farrokh Alemi, Ph.D.

Creating a Relational Database Using Microsoft SQL Code. Farrokh Alemi, Ph.D. Creating a Relational Database Using Microsoft SQL Code Farrokh Alemi, Ph.D. The objective of this note is to help you understand how a relational database is organized as a collection of tables, linked

More information

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming Intro to Programming Unit 7 Intro to Programming 1 What is Programming? 1. Programming Languages 2. Markup vs. Programming 1. Introduction 2. Print Statement 3. Strings 4. Types and Values 5. Math Externals

More information

T H E I N T E R A C T I V E S H E L L

T H E I N T E R A C T I V E S H E L L 3 T H E I N T E R A C T I V E S H E L L The Analytical Engine has no pretensions whatever to originate anything. It can do whatever we know how to order it to perform. Ada Lovelace, October 1842 Before

More information

Control Structures. Code can be purely arithmetic assignments. At some point we will need some kind of control or decision making process to occur

Control Structures. Code can be purely arithmetic assignments. At some point we will need some kind of control or decision making process to occur Control Structures Code can be purely arithmetic assignments At some point we will need some kind of control or decision making process to occur C uses the if keyword as part of it s control structure

More information

C-LANGUAGE CURRICULAM

C-LANGUAGE CURRICULAM C-LANGUAGE CURRICULAM Duration: 2 Months. 1. Introducing C 1.1 History of C Origin Standardization C-Based Languages 1.2 Strengths and Weaknesses Of C Strengths Weaknesses Effective Use of C 2. C Fundamentals

More information

Full file at

Full file at ch2 True/False Indicate whether the statement is true or false. 1. The SQL command to create a database table is an example of DML. 2. A user schema contains all database objects created by a user. 3.

More information

Week 3 More Formatted Input/Output; Arithmetic and Assignment Operators

Week 3 More Formatted Input/Output; Arithmetic and Assignment Operators Week 3 More Formatted Input/Output; Arithmetic and Assignment Operators Formatted Input and Output The printf function The scanf function Arithmetic and Assignment Operators Simple Assignment Side Effect

More information

Lecture 3. Input, Output and Data Types

Lecture 3. Input, Output and Data Types Lecture 3 Input, Output and Data Types Goals for today Variable Types Integers, Floating-Point, Strings, Booleans Conversion between types Operations on types Input/Output Some ways of getting input, and

More information

Arthur L. Carpenter California Occidental Consultants

Arthur L. Carpenter California Occidental Consultants Paper 255-30 Looking for a Date? A Tutorial on Using SAS Dates and Times Arthur L. Carpenter California Occidental Consultants ABSTRACT What are SAS date and time values? How are they used and why do we

More information

= 3 + (5*4) + (1/2)*(4/2)^2.

= 3 + (5*4) + (1/2)*(4/2)^2. Physics 100 Lab 1: Use of a Spreadsheet to Analyze Data by Kenneth Hahn and Michael Goggin In this lab you will learn how to enter data into a spreadsheet and to manipulate the data in meaningful ways.

More information

CSE 1001 Fundamentals of Software Development 1. Identifiers, Variables, and Data Types Dr. H. Crawford Fall 2018

CSE 1001 Fundamentals of Software Development 1. Identifiers, Variables, and Data Types Dr. H. Crawford Fall 2018 CSE 1001 Fundamentals of Software Development 1 Identifiers, Variables, and Data Types Dr. H. Crawford Fall 2018 Identifiers, Variables and Data Types Reserved Words Identifiers in C Variables and Values

More information

Table of Contents EXCEL ADD-IN CHANGE LOG VERSION (APRIL 28, 2013)... 2 Changes... 2 VERSION (FEBRUARY 20, 2013)...

Table of Contents EXCEL ADD-IN CHANGE LOG VERSION (APRIL 28, 2013)... 2 Changes... 2 VERSION (FEBRUARY 20, 2013)... Table of Contents EXCEL ADD-IN CHANGE LOG... 2 VERSION 3.4.0.0 (APRIL 28, 2013)... 2 Changes... 2 VERSION 3.3.1.1 (FEBRUARY 20, 2013)... 2 Changes... 2 Maximum number of items per query was increased to

More information

Microsoft Office Excel Training

Microsoft Office Excel Training Region One ESC presents: Microsoft Office Excel Training Create your first workbook Course contents Overview: Where to begin? Lesson 1: Meet the workbook Lesson 2: Enter data Lesson 3: Edit data and revise

More information

COSC 304 Introduction to Database Systems SQL DDL. Dr. Ramon Lawrence University of British Columbia Okanagan

COSC 304 Introduction to Database Systems SQL DDL. Dr. Ramon Lawrence University of British Columbia Okanagan COSC 304 Introduction to Database Systems SQL DDL Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca SQL Overview Structured Query Language or SQL is the standard query language

More information

Difference Between Dates Case Study 2002 M. J. Clancy and M. C. Linn

Difference Between Dates Case Study 2002 M. J. Clancy and M. C. Linn Difference Between Dates Case Study 2002 M. J. Clancy and M. C. Linn Problem Write and test a Scheme program to compute how many days are spanned by two given days. The program will include a procedure

More information

Creating the Data Layer

Creating the Data Layer Creating the Data Layer When interacting with any system it is always useful if it remembers all the settings and changes between visits. For example, Facebook has the details of your login and any conversations

More information

Introduction to Databases, Fall 2005 IT University of Copenhagen. Lecture 2: Relations and SQL. September 5, Lecturer: Rasmus Pagh

Introduction to Databases, Fall 2005 IT University of Copenhagen. Lecture 2: Relations and SQL. September 5, Lecturer: Rasmus Pagh Introduction to Databases, Fall 2005 IT University of Copenhagen Lecture 2: Relations and SQL September 5, 2005 Lecturer: Rasmus Pagh Today s lecture What, exactly, is the relational data model? What are

More information

Access: You will have to

Access: You will have to Access: You will have to Create a new blank database Import data from a text file and set up the fields correctly Add some records to the table Create some reports. o For these reports you will need to

More information

Repetition CSC 121 Fall 2014 Howard Rosenthal

Repetition CSC 121 Fall 2014 Howard Rosenthal Repetition CSC 121 Fall 2014 Howard Rosenthal Lesson Goals Learn the following three repetition methods, their similarities and differences, and how to avoid common errors when using them: while do-while

More information

C++ Basic Elements of COMPUTER PROGRAMMING. Special symbols include: Word symbols. Objectives. Programming. Symbols. Symbols.

C++ Basic Elements of COMPUTER PROGRAMMING. Special symbols include: Word symbols. Objectives. Programming. Symbols. Symbols. EEE-117 COMPUTER PROGRAMMING Basic Elements of C++ Objectives General Questions Become familiar with the basic components of a C++ program functions, special symbols, and identifiers Data types Arithmetic

More information

TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA

TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA 1 TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach by M. Guzdial and B. Ericson, and instructor materials prepared

More information

Chapter 2 The SAS Environment

Chapter 2 The SAS Environment Chapter 2 The SAS Environment Abstract In this chapter, we begin to become familiar with the basic SAS working environment. We introduce the basic 3-screen layout, how to navigate the SAS Explorer window,

More information

Basic Arithmetic Operations

Basic Arithmetic Operations Basic Arithmetic Operations Learning Outcome When you complete this module you will be able to: Perform basic arithmetic operations without the use of a calculator. Learning Objectives Here is what you

More information

Software Design & Programming I

Software Design & Programming I Software Design & Programming I Starting Out with C++ (From Control Structures through Objects) 7th Edition Written by: Tony Gaddis Pearson - Addison Wesley ISBN: 13-978-0-132-57625-3 Chapter 4 Making

More information

Relational Database Language

Relational Database Language DATA BASE MANAGEMENT SYSTEMS Unit IV Relational Database Language: Data definition in SQL, Queries in SQL, Insert, Delete and Update Statements in SQL, Views in SQL, Specifying General Constraints as Assertions,

More information

COMP-202 Unit 2: Java Basics. CONTENTS: Using Expressions and Variables Types Strings Methods

COMP-202 Unit 2: Java Basics. CONTENTS: Using Expressions and Variables Types Strings Methods COMP-202 Unit 2: Java Basics CONTENTS: Using Expressions and Variables Types Strings Methods Assignment 1 Assignment 1 posted on WebCt and course website. It is due May 18th st at 23:30 Worth 6% Part programming,

More information

Instructor s Notes Java - Beginning Built-In Classes. Java - Beginning Built-In Classes

Instructor s Notes Java - Beginning Built-In Classes. Java - Beginning Built-In Classes Java - Beginning 152-130 Built-In Classes Notes Quick Links Vector Class Pages Wrapper Classes Pages 91 95 String Class Pages 222 225 342 346 Calendar Class Pages 230 235 DecimalFormat Class Pages 269

More information

Excel Expert Microsoft Excel 2010

Excel Expert Microsoft Excel 2010 Excel Expert Microsoft Excel 2010 Formulas & Functions Table of Contents Excel 2010 Formulas & Functions... 2 o Formula Basics... 2 o Order of Operation... 2 Conditional Formatting... 2 Cell Styles...

More information

Access Intermediate

Access Intermediate Access 2010 - Intermediate (103-134) Building Access Databases Notes Quick Links Building Databases Pages AC52 AC56 AC91 AC93 Building Access Tables Pages AC59 AC67 Field Types Pages AC54 AC56 AC267 AC270

More information

Tutorial 3 Maintaining and Querying a Database. Finding Data in a Table. Updating a Database

Tutorial 3 Maintaining and Querying a Database. Finding Data in a Table. Updating a Database Tutorial 3 Maintaining and Querying a Database Finding Data in a Table Must navigate to a record before view/delete/change it Find is a great way to navigate to a record But... Find can t: show matching

More information

Introduction to Functions and Variables

Introduction to Functions and Variables Introduction to Functions and Variables Functions are a way to add additional elements into your OBI Report. They enable you to manipulate data, perform computations and comparisons, and get system information.

More information

Microsoft Access 2010

Microsoft Access 2010 www.jwalkonline.org/main michael@jwalkonline.org @MichaelJWalk Microsoft Access 2010 Part 3 Michael J. Walk It's about control: use advanced features of Access to control data entry, automate processes,

More information

SQL Fundamentals. Chapter 3. Class 03: SQL Fundamentals 1

SQL Fundamentals. Chapter 3. Class 03: SQL Fundamentals 1 SQL Fundamentals Chapter 3 Class 03: SQL Fundamentals 1 Class 03: SQL Fundamentals 2 SQL SQL (Structured Query Language): A language that is used in relational databases to build and query tables. Earlier

More information

12B. Laboratory. Databases. Objective. References. Write simple SQL queries using the Simple SQL applet.

12B. Laboratory. Databases. Objective. References. Write simple SQL queries using the Simple SQL applet. Laboratory Databases 12B Objective Write simple SQL queries using the Simple SQL applet. References Software needed: 1) A web browser (Internet Explorer or Netscape) 2) Applet from the CD-ROM: a) Simple

More information

Table of Contents EXCEL ADD-IN CHANGE LOG VERSION (OCT )... 3 New Features... 3

Table of Contents EXCEL ADD-IN CHANGE LOG VERSION (OCT )... 3 New Features... 3 Table of Contents EXCEL ADD-IN CHANGE LOG... 3 VERSION 3.6.0.4 (OCT 10 2013)... 3... 3 Multiple account support... 3 Defining queries for multiple accounts... 4 Single sign on support... 4 Setting up SSO

More information

SYSTEM 2000 Essentials

SYSTEM 2000 Essentials 7 CHAPTER 2 SYSTEM 2000 Essentials Introduction 7 SYSTEM 2000 Software 8 SYSTEM 2000 Databases 8 Database Name 9 Labeling Data 9 Grouping Data 10 Establishing Relationships between Schema Records 10 Logical

More information

GIFT Department of Computing Science Data Selection and Filtering using the SELECT Statement

GIFT Department of Computing Science Data Selection and Filtering using the SELECT Statement GIFT Department of Computing Science [Spring 2013] CS-217: Database Systems Lab-2 Manual Data Selection and Filtering using the SELECT Statement V1.0 4/12/2016 Introduction to Lab-2 This lab reinforces

More information

SQL Functionality SQL. Creating Relation Schemas. Creating Relation Schemas

SQL Functionality SQL. Creating Relation Schemas. Creating Relation Schemas SQL SQL Functionality stands for Structured Query Language sometimes pronounced sequel a very-high-level (declarative) language user specifies what is wanted, not how to find it number of standards original

More information

Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture 15 Branching : IF ELSE Statement We are looking

More information

Connecting Spotfire to Data Sources with Information Designer

Connecting Spotfire to Data Sources with Information Designer Connecting Spotfire to Data Sources with Information Designer Margot Goodwin, Senior Manager, Application Consulting September 15, 2016 HUMAN HEALTH ENVIRONMENTAL HEALTH 2014 PerkinElmer Spotfire Information

More information

DATA AND ABSTRACTION. Today you will learn : How to work with variables How to break a program down Good program design

DATA AND ABSTRACTION. Today you will learn : How to work with variables How to break a program down Good program design DATA AND ABSTRACTION Today you will learn : How to work with variables How to break a program down Good program design VARIABLES Variables are a named memory location Before you use a variable you must

More information

How to Read, Write, and Manipulate SAS Dates

How to Read, Write, and Manipulate SAS Dates Paper HW-063 How to Read, Write, and Manipulate SAS Dates Jenine Milum, Charlotte, NC ABSTRACT No matter how long you ve been programming in SAS, using and manipulating dates still seems to require effort.

More information

Introduction to QuickCalc BASIC. QUICKCALC Sample Programs. QUICKCALC BASIC vs IBM BASIC. Note: Please read the User License Agreement, below.

Introduction to QuickCalc BASIC. QUICKCALC Sample Programs. QUICKCALC BASIC vs IBM BASIC. Note: Please read the User License Agreement, below. Introduction to QuickCalc BASIC Note: Please read the User License Agreement, below. QuickCalc is a BASIC language interpreter. BASIC was developed a long time ago when PCs were brand-new and had very

More information

chapter 2 G ETTING I NFORMATION FROM A TABLE

chapter 2 G ETTING I NFORMATION FROM A TABLE chapter 2 Chapter G ETTING I NFORMATION FROM A TABLE This chapter explains the basic technique for getting the information you want from a table when you do not want to make any changes to the data and

More information

QUIZ: What value is stored in a after this

QUIZ: What value is stored in a after this QUIZ: What value is stored in a after this statement is executed? Why? a = 23/7; QUIZ evaluates to 16. Lesson 4 Statements, Expressions, Operators Statement = complete instruction that directs the computer

More information

Maximizing Statistical Interactions Part II: Database Issues Provided by: The Biostatistics Collaboration Center (BCC) at Northwestern University

Maximizing Statistical Interactions Part II: Database Issues Provided by: The Biostatistics Collaboration Center (BCC) at Northwestern University Maximizing Statistical Interactions Part II: Database Issues Provided by: The Biostatistics Collaboration Center (BCC) at Northwestern University While your data tables or spreadsheets may look good to

More information

What we will do today Explain and look at examples of. Programs that examine data. Data types. Topic 4. variables. expressions. assignment statements

What we will do today Explain and look at examples of. Programs that examine data. Data types. Topic 4. variables. expressions. assignment statements Topic 4 Variables Once a programmer has understood the use of variables, he has understood the essence of programming -Edsger Dijkstra What we will do today Explain and look at examples of primitive data

More information