1 00:00:00,880 --> 00:00:03,169 along x-axis 2013 tutorials 2 00:00:03,169 --> 00:00:06,209 in this video I'm gonna be creating 3 00:00:06,209 --> 00:00:09,509 the lookup table we're gonna need for the showed uniform 4 00:00:09,509 --> 00:00:13,859 and site from a play along for the link below the video to dissection website 5 00:00:13,859 --> 00:00:16,339 and on alexis 2013 TV 58 6 00:00:16,339 --> 00:00:19,868 nope 7 00:00:19,868 --> 00:00:24,320 a gay first things first issues 8 00:00:24,320 --> 00:00:27,859 sheeps if you 9 00:00:27,859 --> 00:00:31,720 have in sports the last video Anya 10 00:00:31,719 --> 00:00:35,479 she greeting me to discuss Cartesian products 11 00:00:35,479 --> 00:00:40,199 I am he's very quick reminder for trying to do 12 00:00:40,200 --> 00:00:44,379 we're trying to use create a table 13 00:00:44,378 --> 00:00:49,199 that list a booking actually 14 00:00:49,200 --> 00:00:53,520 records for booking details should say so that we're able to ask simple 15 00:00:53,520 --> 00:00:54,210 question 16 00:00:54,210 --> 00:00:58,469 for example on the night shift October in room 201 17 00:00:58,469 --> 00:01:01,829 was fair is there guest thing 18 00:01:01,829 --> 00:01:06,400 and we're gonna have corresponding text boxes on each other records 19 00:01:06,400 --> 00:01:09,618 here again for the information in there 20 00:01:09,618 --> 00:01:12,840 I'm another challenge we have is 21 00:01:12,840 --> 00:01:16,868 the should table booking details we have 22 00:01:16,868 --> 00:01:19,909 range of dates so she's on the list 23 00:01:19,909 --> 00:01:23,030 bookings in the 16th July into the 19th 24 00:01:23,030 --> 00:01:28,140 August and we've tried to recreate some kinda complicated lookup functioned 25 00:01:28,140 --> 00:01:33,368 mix-up the date within that date range 26 00:01:33,368 --> 00:01:37,950 a.m. but it's gonna be really complicated can be a pain to 27 00:01:37,950 --> 00:01:42,859 maintain if there's any issues after testes headache so fresh you trying to 28 00:01:42,859 --> 00:01:43,269 use 29 00:01:43,269 --> 00:01:47,298 try and take take booking details and we're gonna 30 00:01:47,299 --> 00:01:50,509 school exploded stable so that you end up with 31 00:01:50,509 --> 00:01:55,879 one record per day and this is where the torch los TX are going to use 32 00:01:55,879 --> 00:01:59,408 cartesian product to do that so St right now 33 00:01:59,409 --> 00:02:03,700 gonna go to create for design a Mesa table early I'm inquiry were trying to 34 00:02:03,700 --> 00:02:04,579 trick weary 35 00:02:04,578 --> 00:02:09,250 week Information Office minister table takes in there 36 00:02:09,250 --> 00:02:12,489 table takes if you don't know 37 00:02:12,489 --> 00:02:15,819 is a table with every single day 38 00:02:15,818 --> 00:02:19,479 from the first is January 2007 cool to wear 39 00:02:19,479 --> 00:02:23,759 sues the training I actually from 2027 40 00:02:23,759 --> 00:02:26,789 you stop so 41 00:02:26,789 --> 00:02:29,859 let us interested really in 42 00:02:29,860 --> 00:02:34,280 open takes an LNG day a.m. 43 00:02:34,280 --> 00:02:37,900 now for a run that we get 44 00:02:37,900 --> 00:02:41,219 who revels in the world I'm interested in records 45 00:02:41,219 --> 00:02:46,780 and whatever more interested in find solutions 46 00:02:46,780 --> 00:02:51,250 on is really really interested in explode and he takes between 47 00:02:51,250 --> 00:02:55,459 the first a in the surgeon the law states the first days and nights in 48 00:02:55,459 --> 00:02:59,610 time lost ace 23rd October so immediately the first thing you want to 49 00:02:59,610 --> 00:02:59,860 do 50 00:02:59,759 --> 00:03:04,649 strict we don't display 07424 records when you honestly 40 51 00:03:04,650 --> 00:03:09,030 so it wasn't a layer of you when the shitter 52 00:03:09,030 --> 00:03:16,030 loads up lines with its 53 00:03:17,919 --> 00:03:20,899 this temp stop here loading up hansel 54 00:03:20,900 --> 00:03:25,189 into she's attempt and a scroll to the bottom 55 00:03:25,189 --> 00:03:32,189 said Tim very cool 56 00:03:32,530 --> 00:03:37,370 so she can 57 00:03:37,370 --> 00:03:40,659 Ste and 58 00:03:40,659 --> 00:03:44,789 temp and take and it's going to be 59 00:03:44,789 --> 00:03:49,639 to 60 00:03:49,639 --> 00:03:53,500 stand 61 00:03:53,500 --> 00:03:56,139 as a sequel to you start date just 62 00:03:56,139 --> 00:04:00,250 10 stop temp and going to use them to restrict 63 00:04:00,250 --> 00:04:03,389 the values in this 64 00:04:03,389 --> 00:04:06,619 she foresees close its 65 00:04:06,620 --> 00:04:10,920 very thank you cake maybe go 66 00:04:10,919 --> 00:04:15,500 say and Angie day must be greater than or equal to 67 00:04:15,500 --> 00:04:18,870 Tim us temps 68 00:04:18,870 --> 00:04:22,060 me and 69 00:04:22,060 --> 00:04:25,399 must be less than or equal to 70 00:04:25,399 --> 00:04:28,399 to us 10 71 00:04:28,399 --> 00:04:32,638 and dokie 72 00:04:32,639 --> 00:04:37,150 yes dates you go says he saved us right now 73 00:04:37,149 --> 00:04:40,589 cleary Kings 74 00:04:40,589 --> 00:04:43,589 pics loader okay 75 00:04:43,589 --> 00:04:47,189 I'm going to use a concept to the cartesian product now work in a creek 76 00:04:47,189 --> 00:04:48,579 separate day to say 77 00:04:48,579 --> 00:04:52,909 I'm not gonna lick the dates to it so we're gonna 78 00:04:52,910 --> 00:04:59,470 and shooting booking details bookings guests 79 00:04:59,470 --> 00:05:03,210 and rims this these full 80 00:05:03,209 --> 00:05:07,989 times LinkedIn sense to be one day to set and anything we pull from these 81 00:05:07,990 --> 00:05:08,810 tables 82 00:05:08,810 --> 00:05:11,889 multiplied records in Table dates 83 00:05:11,889 --> 00:05:18,889 so us missed due to Gita 84 00:05:19,490 --> 00:05:26,490 teacher the shaking the checkout 85 00:05:29,459 --> 00:05:32,310 guessed it: you know 86 00:05:32,310 --> 00:05:36,480 from my GV so actually name to the guest 87 00:05:36,480 --> 00:05:40,780 so cast 88 00:05:40,779 --> 00:05:44,168 best Kong cat a nation table guests 89 00:05:44,168 --> 00:05:51,168 first name amps its 90 00:05:51,418 --> 00:05:55,310 last night cakes remember 91 00:05:55,310 --> 00:05:59,850 we have 210 rickles 92 00:05:59,850 --> 00:06:03,470 Street Suite 210 records is table dates 93 00:06:03,470 --> 00:06:07,620 is returning 14 records 94 00:06:07,620 --> 00:06:11,100 believe may be shifting and is multiplying it by the records 95 00:06:11,100 --> 00:06:17,069 be returned here and records be returned here actually 96 00:06:17,069 --> 00:06:20,598 40 so 14 time something is 210 97 00:06:20,598 --> 00:06:25,248 just went on sixty okay see Table de ses you turn in 15 records in its 98 00:06:25,249 --> 00:06:29,300 just a sister turned 14 the most fun together 99 00:06:29,300 --> 00:06:32,309 so the moment as you can see 100 00:06:32,309 --> 00:06:35,649 checking take 15 for July check out that ninety-five August 101 00:06:35,649 --> 00:06:40,759 date tonight serve October 102 00:06:40,759 --> 00:06:45,249 so this first set is booking details 103 00:06:45,249 --> 00:06:49,749 multiplied by the knife October the second was on booking details marked by 104 00:06:49,749 --> 00:06:50,659 the temple time 105 00:06:50,658 --> 00:06:53,949 which is good except reaction I wanna make a restriction because 106 00:06:53,949 --> 00:06:58,240 if the state here doesn't full VIN checkin checkout date 107 00:06:58,240 --> 00:07:02,079 should be there so we gonna place instruction on that criteria 108 00:07:02,079 --> 00:07:05,709 asking me to check in date must be 109 00:07:05,709 --> 00:07:09,649 less than or equal to 110 00:07:09,649 --> 00:07:13,879 table take 111 00:07:13,879 --> 00:07:16,959 stock take she's and 112 00:07:16,959 --> 00:07:21,619 check act check-out date must be greater than or equal to you 113 00:07:21,619 --> 00:07:28,110 table takes dates number I 114 00:07:28,110 --> 00:07:32,769 we get nothing just completely correct reasons completely correct his 115 00:07:32,769 --> 00:07:36,668 there's nothing in the booking details actually falls in this time period 116 00:07:36,668 --> 00:07:39,829 today's night over so 117 00:07:39,829 --> 00:07:44,490 exchange these much 118 00:07:44,490 --> 00:07:50,269 them sing term 119 00:07:50,269 --> 00:07:53,288 and Creek 120 00:07:53,288 --> 00:08:00,288 news 121 00:08:02,040 --> 00:08:06,290 to sure easy ship 122 00:08:06,290 --> 00:08:09,689 cases three if the 123 00:08:09,689 --> 00:08:13,740 booking details for women range now to be close to 124 00:08:13,740 --> 00:08:17,680 process life nothing happens amazing 125 00:08:17,680 --> 00:08:20,970 30 re huge 126 00:08:20,970 --> 00:08:24,530 and either okay so 127 00:08:24,529 --> 00:08:28,589 me 45 records an example recalled 128 00:08:28,589 --> 00:08:31,819 is the nice for type 129 00:08:31,819 --> 00:08:35,049 every single booking details falls on my October 130 00:08:35,049 --> 00:08:39,000 showing fact to leave the bookings 131 00:08:39,000 --> 00:08:44,320 full dates so you're the date ranges 22 July 2 21st December 132 00:08:44,320 --> 00:08:47,910 so that's clearly the National times within that 133 00:08:47,909 --> 00:08:51,139 another date range be the third is 134 00:08:51,139 --> 00:08:55,460 over to the 24th time that falls within that exploded every single 135 00:08:55,460 --> 00:08:58,480 record in D booking details tabled 136 00:08:58,480 --> 00:09:02,620 schools have been the day range okay work to shine Eunice 137 00:09:02,620 --> 00:09:06,019 tutorial is at least 138 00:09:06,019 --> 00:09:11,720 a little bit complicated and Tennessee I do using a cartesian product to explode 139 00:09:11,720 --> 00:09:17,129 the records I'm best thing to do 140 00:09:17,129 --> 00:09:21,210 disease complicated makes banging head against a wall video see a sea change in 141 00:09:21,210 --> 00:09:22,650 its watch the video again 142 00:09:22,649 --> 00:09:26,409 to you've got table dates which you can 143 00:09:26,409 --> 00:09:30,019 a.m. get into any database you make 144 00:09:30,019 --> 00:09:33,740 external data comports maxine bring in table base in there 145 00:09:33,740 --> 00:09:36,840 the technique is here it's a bit confusing 146 00:09:36,840 --> 00:09:40,879 as long as you make sure to use trick debates been shown foresees an induction 147 00:09:40,879 --> 00:09:42,210 seven thousand days 148 00:09:42,210 --> 00:09:46,940 and then just to make sure that use it whenever their stock places 149 00:09:46,940 --> 00:09:50,350 he said it to be less than or equal to take some whatever the 150 00:09:50,350 --> 00:09:54,040 and a has to be greater than today's am 151 00:09:54,039 --> 00:09:58,199 I hesitate to say simple as that it's one of those things you can have to 152 00:09:58,200 --> 00:10:02,300 watch it a few times I guarantee you if we truly understand it and 153 00:10:02,299 --> 00:10:06,059 yes their rights is how to tree exploding picking 154 00:10:06,059 --> 00:10:08,639 and I sure hope to see you next video