Presentation is loading. Please wait.

Presentation is loading. Please wait.

This shows the tables that I made for the order system.

Similar presentations


Presentation on theme: "This shows the tables that I made for the order system."— Presentation transcript:

1 This shows the tables that I made for the order system.

2

3 good idea to use different spellings.

4

5 Need the where to link the tables together
Need the where to link the tables together. An alternate approach is to use join.

6

7 Joining three tables so I need to do the relationships between the orderz table and the ordline table based on ordno and the link between the ordline table and the inven table based on itemno.

8

9 linked which involves three linkages.

10

11

12 Starting to look at subqueries.
The subquery is resolved first and it returns a number in yrgoal which is then used in the where clause of the main query to find a yrgoal > then the one that came back from the subquery.

13

14 When multiple things are returned need to use something like IN, ANY, ALL.

15

16

17 Actually can return multiple idno so I have the IN.

18 Then the outer query forms groups and checks each of the groups for the criteria in the HAVING.

19 The first two inner queries are resolved and that provides data for the tests in the where clause. This is an AND relationship so both have to be true.

20

21

22

23

24

25

26

27

28

29 Side trip into looking at how the editor works
Side trip into looking at how the editor works. If you key in the wrong SQL, you can fix it in the editor.

30 Editor with information from the buffer.

31 Fixed in the editor.

32 I will now enter a / at the SQL prompt to run.

33

34 Looking for the set of dept and itemclass that meet the criteria.

35

36

37

38

39 Selecting dept with one and itemclass with other and both criteria need to be met but not looking at a set.


Download ppt "This shows the tables that I made for the order system."

Similar presentations


Ads by Google