1 00:00:01,120 --> 00:00:03,350 a look taxes 2013 shoot or ooze 2 00:00:03,350 --> 00:00:06,798 in this video we'll be talking to you about concatenation 3 00:00:06,799 --> 00:00:10,990 social play-along follow the link below the video to Thomas ok to the website 4 00:00:10,990 --> 00:00:12,580 and other taxes 2013 5 00:00:12,580 --> 00:00:16,019 the B-seventeen and open that 6 00:00:16,019 --> 00:00:19,239 one up with 2013 7 00:00:19,239 --> 00:00:22,439 of course okie dokie 8 00:00:22,439 --> 00:00:26,070 okay what we've been doing where we've been creating 9 00:00:26,070 --> 00:00:29,490 query cookware you looking details extended we've used 10 00:00:29,489 --> 00:00:33,189 in problem it is going to use the lookup function 11 00:00:33,189 --> 00:00:36,439 to get the cost per night for the room and 12 00:00:36,439 --> 00:00:39,960 lost video we used but they to function to get the duration 13 00:00:39,960 --> 00:00:43,210 and before I get 14 00:00:43,210 --> 00:00:47,829 and concatenation I want to go to work out the actual cost to the state 15 00:00:47,829 --> 00:00:51,399 and across the state is obviously cost per night times duration: 16 00:00:51,399 --> 00:00:54,710 so North worked out clicking here 17 00:00:54,710 --> 00:00:59,609 this crap food cooked 02 poll on cost per night 18 00:00:59,609 --> 00:01:02,649 times CS troops 19 00:01:02,649 --> 00:01:06,010 duration: okay the rum 20 00:01:06,010 --> 00:01:09,840 and we get that total to 21 00:01:09,840 --> 00:01:13,329 which is kinda great now I 22 00:01:13,329 --> 00:01:17,780 I'm gonna cleverness a little bit for do I want to point out one thing 23 00:01:17,780 --> 00:01:23,349 quite important the two fields on basing this total of of 24 00:01:23,349 --> 00:01:27,169 or themselves a kind of calculated fields 25 00:01:27,170 --> 00:01:31,019 or maybe character it feels is not the right terminology but they're not foods 26 00:01:31,019 --> 00:01:33,670 and native to the table we've got to work them out 27 00:01:33,670 --> 00:01:38,978 using functions I'm and with more flight and together we've got the total 28 00:01:38,978 --> 00:01:42,659 I am this works most the time 29 00:01:42,659 --> 00:01:46,640 except and welcome to the rules just have a looker 30 00:01:46,640 --> 00:01:50,390 around here its gonna at the Rose ground here not a control group 31 00:01:50,390 --> 00:01:54,250 now for added a row so third one down cool total 32 00:01:54,250 --> 00:01:59,259 i'm ok explain what these totals of suffice to say that 33 00:01:59,259 --> 00:02:02,299 aggregations for field perm 34 00:02:02,299 --> 00:02:06,530 so I didn't actually just explain that but if you try run this query now 35 00:02:06,530 --> 00:02:10,219 won't work because it they were good workout cost per night 36 00:02:10,219 --> 00:02:14,020 someone removed totals there is no mention that as I spent many a happy 37 00:02:14,020 --> 00:02:16,840 hour banging my head against the wall trying to work out why 38 00:02:16,840 --> 00:02:21,430 my filled up sometimes being 39 00:02:21,430 --> 00:02:26,099 phil has sometimes been understood by AXA sometimes know and it's to do with 40 00:02:26,098 --> 00:02:30,539 where the photos employees don't know just for the record if you wanted to 41 00:02:30,539 --> 00:02:31,250 work out 42 00:02:31,250 --> 00:02:34,340 cost per night will total 43 00:02:34,340 --> 00:02:39,550 you have to actually take this expression here 44 00:02:39,550 --> 00:02:43,370 and take this expression he did 45 00:02:43,370 --> 00:02:46,530 and drop them into total I'm 46 00:02:46,530 --> 00:02:50,650 tonight that's just a quick one on why the does it doesn't work sometimes 47 00:02:50,650 --> 00:02:53,810 right now to the job in hand for his concatenation 48 00:02:53,810 --> 00:02:57,170 well where want to do is on the Cray 49 00:02:57,169 --> 00:03:00,669 for the field over here and I think I'm gonna call this field 50 00:03:00,669 --> 00:03:03,929 a cost 51 00:03:03,930 --> 00:03:08,920 because I can and I want the food to read something along the lines that this 52 00:03:08,919 --> 00:03:13,530 so four nights 120 Pampa mike was formed in eighty 53 00:03:13,530 --> 00:03:17,560 obviously I want this the change depending on the duration for record 54 00:03:17,560 --> 00:03:22,689 I warm this number here to change depending 55 00:03:22,689 --> 00:03:25,989 on the cost to the room and I want this to change 56 00:03:25,989 --> 00:03:29,400 depending on the tosoh 57 00:03:29,400 --> 00:03:32,730 but i wanna put together in one single filled 58 00:03:32,729 --> 00:03:37,369 I have my reasons how do we do that row weekend 59 00:03:37,370 --> 00:03:41,908 reference the fields over here by 60 00:03:41,908 --> 00:03:45,449 growing cost per night duration: auto to in here but we're going to use a 61 00:03:45,449 --> 00:03:46,250 technique called 62 00:03:46,250 --> 00:03:49,269 concatenation to turn them into something the 63 00:03:49,269 --> 00:03:54,060 speak and the hutu join the filter adding them 64 00:03:54,060 --> 00:03:58,259 to make sense okay so the nameless foods gonna be our school it cost 65 00:03:58,259 --> 00:04:01,598 to seize member and if you remember from our 66 00:04:01,598 --> 00:04:06,688 2x four nights at 120 pound per night so the first thing is 67 00:04:06,688 --> 00:04:10,128 the duration perform and then 68 00:04:10,128 --> 00:04:14,469 North right nights fifties and ampersand never gonna post 69 00:04:14,469 --> 00:04:18,100 a string variable nights to make treatise space 70 00:04:18,100 --> 00:04:21,400 and nights space at 71 00:04:21,399 --> 00:04:25,269 so we've got four remember adding on to the fore 72 00:04:25,269 --> 00:04:29,089 or putting it together with the expression night 73 00:04:29,089 --> 00:04:36,089 at we now need to have crossed the room 120 pound 74 00:04:36,259 --> 00:04:41,370 and per 75 00:04:41,370 --> 00:04:44,629 knowing 76 00:04:44,629 --> 00:04:47,779 equals 77 00:04:47,779 --> 00:04:53,029 and I'm total 78 00:04:53,029 --> 00:04:57,369 hasn't quite worked out there because wouldn't say that 79 00:04:57,370 --> 00:05:03,199 in total some say that and run an issue we care 80 00:05:03,199 --> 00:05:10,199 occur so we're almost there we've got 81 00:05:13,199 --> 00:05:17,560 cake so we got four nights at 120 for nine Eagles for eighty four nights on 82 00:05:17,560 --> 00:05:19,449 250 per not equal 600 83 00:05:19,449 --> 00:05:23,419 so what we're missing actually a two-pound science here and here 84 00:05:23,418 --> 00:05:27,948 to take another quick look at what we've 85 00:05:27,949 --> 00:05:32,610 dumb were taken afula a value from the field so for example duration: it was 86 00:05:32,610 --> 00:05:33,139 for 87 00:05:33,139 --> 00:05:36,310 with venues and ampersand and 88 00:05:36,310 --> 00:05:40,879 added the expression nights at so we're not performing calculations that this of 89 00:05:40,879 --> 00:05:42,680 key point with concatenation 90 00:05:42,680 --> 00:05:46,038 not calculating the number one adding to the number for all 91 00:05:46,038 --> 00:05:49,990 and to more dividing you hope motif like it 92 00:05:49,990 --> 00:05:54,300 we're treating it as a character that we can see so you're saying for 93 00:05:54,300 --> 00:05:57,460 were tacking on this expression nights 94 00:05:57,459 --> 00:06:00,758 at when next taking another expression 95 00:06:00,759 --> 00:06:04,520 cost per night to attack in that one on and then 96 00:06:04,519 --> 00:06:07,788 another string variables per night equals and then 97 00:06:07,788 --> 00:06:12,378 for expression which were attacking on so we're not perform any calculations on 98 00:06:12,379 --> 00:06:14,039 these expressions religiously 99 00:06:14,038 --> 00:06:17,728 creating a string that displays these expressions 100 00:06:17,728 --> 00:06:21,089 in such a way that we can read a measly understand them 101 00:06:21,089 --> 00:06:25,129 now in order to get the pound signs in just after the app 102 00:06:25,129 --> 00:06:28,168 course and space and then you put hey 103 00:06:28,168 --> 00:06:31,560 pound sign and in turn I 104 00:06:31,560 --> 00:06:34,658 be cool space Council 105 00:06:34,658 --> 00:06:41,658 okay press run gonorrhea for myself 120 pound per night because for 190 pound so 106 00:06:43,069 --> 00:06:47,009 that's the idea of concatenation key points not for calculations it so you 107 00:06:47,009 --> 00:06:47,778 can put 108 00:06:47,778 --> 00:06:52,528 streams in variables together and display them in a way that sorta 109 00:06:52,528 --> 00:06:54,259 meaningful to humans this 110 00:06:54,259 --> 00:06:57,669 pretty much know they have to cut the nation's far as I see it 111 00:06:57,668 --> 00:07:01,769 I'm so thanks for watching the video and 112 00:07:01,769 --> 00:07:02,528 hopes in exon