OK let's go through some of these solutions.
So the first one versed in uppercase is following sentence despite the cat look at me with such hatred.
So I'm just going to copy it.
And the first thing I'm actually going to do is make a new file so I'll come up here and do new file
and I'll just call this exercises.
Q Well done in there.
I'll paste this.
And we know that we need to do two things we need to reverse it in upper case.
The order doesn't really matter.
So let's do a we need to do a select first.
Either way select reverse.
And we're going to select the reverse of this and then we can do Opper here just like that or we could
switch them and do select upper reverse.
Well let's give it a shot and I'm missing my quote there.
Let's get out of here.
Missing that closing quote.
Go try it again.
And there we go.
It's reversed and all uppercase.
So now I'm going to comment that out and we'll move on to the next one.
What does this printout.
So let's start on the inside.
Concatenate I with the space with like space and cat.
So it will be I like casse the sentence with spaces but then we have a replace and replace.
It's going to get rid of all those spaces and put dashes.
So it should be I dash like Dash cats.
Let's try it.
There we go.
I like cats with dashes so that one is really just testing that you understand how these are actually
executed and that you can stack multiple nest multiple functions.
Next up we have our first one really working with the book's data.
So replace all spaces in book titles with the arrow.
So we need to do a select and we know that there's going to be a replace and we know that it's going
to be from books.
So let's start with that.
So what are we replacing.
Well we're looking for all titles and we're replacing a space with the arrow.
Double check or play spaces with arrows that should be good.
And the other thing was that appear we had title.
So we need to use as a title.
So let's copy it.
Make sure it works.
There we go.
Title the arrow namesake Norse arrow.
Mythology and so on.
I'll comment that one out and we'll move on to the next one.
Print this out.
So we should have forward and backwards.
And this is last name printed regularly and this is last name reversed.
So let's start.
We know we need to have a select and the first thing that we know is that we're going to have author
Ellen name as forward's.
Just make sure I have that.
So that's says that that will give us this right here.
And let's close off let's do from books just like that so we can start with this if we want it and we
get that left portion.
Now we need this right portion so we need a comma because we're now selecting two different things.
And what we want to do here is use reverse author our name as backwards just like that.
Let's copy it and then we go forwards backwards.
Regular last name reversed last name.
All right comment that went out and we move on this one.
We need to print a full name so first and last name of the author all in caps.
So there's a couple of ways we can approach this.
The easiest way is just to capitalize one string.
So we combine the two first in mice and then capitalized.
If you wanted to though you could take capital first and then capital second or excuse me capital first
name capital last name then combine them.
And that works just as well.
But it's easier to just do it once.
And it's also faster.
So the other thing is we have four names in caps up here.
So we need to use as.
So let's start by printing fullname.
So we have a select from books and what we need to do is concat And what are we can catting author f
name comma author LNA and I'll leave it like this for now but hopefully you can predict what the problem
is.
When I do that we don't have spaces so let's at our space in and that should give us the concatenated
version and well free at the right comma.
Now let's try it.
There you go.
So you get Jhumpa Lahiri Dave Eggers and so on with the spaces.
So now what we want to do is just uppercase that so we could do it on the same line because uppercase
is so short we can just say upper of that copy and paste it in.
We also need to rename this up there so we need as and what to call it full name and caps.
So there are spaces in that.
So we need to use quotes full name in caps.
Copy that.
There we go full name in caps.
And if you want to format a little bit better here we can do this
just like that and it will work just the same.
Ok let's come with that one now and move on.
Make this happen.
So what we have again is first that excuse me the title was released in and then the year.
So we're going to need to make use of concatenates.
So let's start off with our select and we'll have a concat but we will also have from books just like
everything else we've done.
So what are we going to concatenate.
Well first is the title after the title.
We have space was released in space so we need those spaces.
Comma like that.
And we could just start with that.
Want to take a look and we get the namesake was released and Norse mythology was released and then we
just need to add in the year comma released year and we haven't really worked with a year in a while
sort of you forgot what the name of that column is.
Earlier I when I was recording something I ended up having to redo it because I was referring to year
rather than released year.
So you could just you describe books and see that.
OK.
It's called released here.
All right.
So then we'll copy that and paste it and we get the namesake was released in 2003 and so on.
The only thing we need to change is this appear.
It's supposed to be called blurb as blurb.
And there we go.
So we're done with that one commented out.
Next up print book titles and the length of each title.
So printing the title is easy.
Then we just need to use char length and print the character length.
So let's do that now select from books and what do we want to select.
Well first we want title and then after we select the title we want char length.
And one thing I should highlight there is that because this is a sequel file might have noticed I get
these autocomplete suggestions so I can either click or I can hit tab.
And that's much faster in my experiences to hit tab.
So we want the length of the title just like that
and we get the namesake 12 Norse mythology 15.
And that's what we want.
Except we need character count just like that.
However this will cause an error.
We need to put it in quotes because there is a space there.
Now we give it a shot and it works out right.
Last one I promise.
So this one is more complex.
Three different things for selecting each one is complex on its own.
So let's tackle the first bit.
The short title.
So we want the first 10 characters of the title plus dot dot dot.
So we'll comment this out.
We'll do our same select from books and we'll start by selecting the first 10 characters so that substring
or fairly easy substrate or whatever that's the substring.
And we want it of title from 1 to 10 just like that.
So that should just give us at this point should know what it does gives us the first 10 characters.
But we also want to concatenate that with dot dot dot.
So we'll do that here concat with the string dot dot dot dot com Economy.com.
And now we copy that.
That works but it's supposed to be called short title.
So we add as short title and we just triple check our work looks good.
Now we have our next thing we're selecting which is the author but we want last name comma first thing
so it's going to be another concat actually.
And we'll start with the author L name comma a comma in quotes.
Kind of hard to talk about comma comma common but this coming here is actually going to be concatenated
in.
This is quite a string to look at their author name.
And we want it to be as author so we don't have to use quotes for that.
Let's try it and see if we made any mistakes.
It looks good.
So we get here we come a jumper game and come in Neal.
That's what we expect.
And it's called author.
Finally we need this last portion quantity and this should be the number in-stock followed by the string
in stock.
So if you don't remember what the column name is we can do describe books and you can see OK we have
stock quantity.
So that's what we want to use.
So this time we're starting off with a stock quantity comma and then we want space in space stock
just like that.
And then we need to use as quantity boy.
That's a long one.
So let's try it out make sure we didn't do anything wrong and that looks good.
32 in-stock hundred fifty four in-stock.
And then we have author and short title both working.
Now one thing I want to point out here that stock quantity is a number it's an it.
But it doesn't break everything.
Concat is OK with numbers like this.
What it does is it just takes the string version the text version of 32 and adds it to in-stock.
So it basically does this 32 plus in stock.
So that's very different than trying to add a number to text.
All right so that was a lot I know but we're done now.
We're done with these string functions and we're moving on.