hello i'm ok taxes 2013 shoot or ooze
this video gonna be talking you through queries
such gonna play along for the link below the video tattooed on a 6-2 website and
download access 2013
TV 06 miss opener but boyer
who Kate know if you are intending on doing the course
I would def ni download this databases this contains
all the tables and data from the database I showed you
in the first video but minus school reforms
reports queries macro so this is the
two bases which we're going to create our database
a right side let's begin okay this lessons on queries
I now what our queries well
we basically use queries to
of data Australia ask questions if the data
I'm in the database and if we take a look
table rooms you can see that
as with most tables wise to vote I was very much
information guess entered has created
which means is it was entered in
gorda and so for example please don't tell me why
the room number 41 was into here
and room number 2004 wasn't
he this record and its pretty normal so what are things we can use queries for
is to ask a question such a show me all day to
in Table rooms sorted by room number so
room number would appear in order a
safe week clothes are said to do that go up to create
and click on query design when you get this
this books he
is where you can choose tables to base your queries awful for you can actually
also
we don't have any based queries of other queries
which is actually quite useful feature we just interested in
single table queries at the moment so interested table room cyclical table
with the click
had I'm and
the information we see in the query is what we've
here so what we do is double click on room I T
so it appears here
telecom room number tie
cost for night notes and active or exceed
at the moment is recreating the table could what we said now is
City show me remind the room number type cost per night notes an active
from Table herbs and if we take run
you get this which is basically the same as the
rooms table no different but what we want is you want to sort by room number
so go back to disarm you
I'm getting from number my sis saw change it to sending
and then click Run now you can see the sexy sorted
the room number by the sending character so he goes to run through to a 5-3 want
for 235 40 and 45 51 55
so that's and it hasn't just saw it obviously room numbers taken the whole
record a move the whole record into the
for free location and everything you can do so
descending which is the same I to
backwards you can also be a bit more sophisticated your queries
for example we've lost foo with information firm the
I'm table rooms sort by room number but what about if we just want to see
the and I the same double beds
we're not interested in singles twins and
Sweex how do we do that but we have to use tackle criteria
so no what we're saying to the databases show me
with information from table room so it by room number
where the type equals
double so we do clicking criteria
and
and variation eat even really use any calls
open/close quotation marks because it was searching on a string
destroyed double in Africa run you get
sort by room number where type is double
and you can change that to single
and you can change it
tweet
Emperor exit to protect design view
know what a pal
if we want to ask a financial question were interested
in every room the
has a cost per night is greater the 230-pound
tonight can we do to easy we have to use
am bassoon criteria for us to use a symbol too little
her which points to the right icon say don't know the exact name for their
I'm so if you do night please put in the comments section video
you should be rewarded if gold and silver just not mine
so point where to the right which means greater than
I'm and it up in 139 press run
we're now telling this
Creek show me who love the rooms or so it by room number
where the cost per night is greater than 130 so you think about the way you
actually phrase these questions
an English and he say then that can help you to think about this kinda queries
you create
and you can
now if you want to say okay 131 great 1930 by one
less than and less than or equal to 150
how we do that well he do
politic indian-american builder I don't need to do this part is going to Iraq so
we say we want less
the greater than 130 and less than
which is there are reporting to the left and equal to
150 okay
purse from now we have
rooms sort by remember
read a cost is Grayson and in 30 or less than or equal to
150 K yes mother where you can use criteria
shift kinda get used to the symbols the
area to the right means greater than ours it left me less than
and the crew guess what that means i dont okay
so what about remember what about if we wanted to
I'm see everything
in or on the
third floor well this is a hotel
database I'm telling you right now everything on the third floor
is that which is
who love the room numbers that begin whiffed on three
you know before we do anything this get a table rooms
for to find a rich icon right there good as I'm few
covering them with short text okay
so reason I've done this is to find out what they taught real number is a short
text so we're gonna have to do
is what we're gonna send to the OSC database now is
bit more complicated were gonna say please show me every
recalled from Table rooms a.m.
so driver number where the first
character covering number the
these three and we do that we're in order to do that we have to use
the like operator so much looking criteria here for room number
to build a and the like operator
is literally yet show me rooms like this
so for in like then what we do to
double quotation mark and
three and then Asterix
kanin double quotation mark again
going to show you this explain
what this means press run and you get everything
in 43 which is essentially room numbers that begin with
number three so or did I just do K
wife said is I want everything
from room number I
like cannon of pips 3 fantastic to keep
actual thing here is assessed eric's s3x means I want everything for room number
like
where where the room number begins with
the character three and as any amount of characters after it
and that's what the s3x making just like a wild card character
mean any amount of characters for move to
what this actually says show me
I'm who rooms a.m.
firm table rooms where the room number is
equal to 3 which we don't have
I'm now all the real numbers
are three digits long so yes tricks is not the only character can use here
I can also use question mark and your question mark does the same thing is
is well call it character be only represents one wild card character
so 3 character character which should also produce the same results
301 302 303 but if you not sure mean if
for example I'm this moment such a case we might have firm numbers with like 30
33 03 04 for whatever
if they're different link the characters you definitely need to use P
Esther so you know
so we can do
we get that result okay so that's like
I'm isola save this query
what do I in a minute I'll save in a minute discover that and one last thing
on a show you
if you look over active see the only forms are active instead of twin
if you want to search true or false
am says active just type in true
press Return an irony
give us apartments that are active and true
okay so let's go back to the grind your that my main
thank for this query was actually sort sending
I'm which have done and save it
directorship saying cool it Creary
a rooms
sorted a a I'm
PSC name inquiries is just a nightmare
telling you right now there's no other found any really good
solid naming convention and
inevitably you name query them because if a couple careers like you realize AXI
the name you gave the first query doesn't is a really consistent with the
other ones he change it
when you make a few more queries and realize actually should change it back
to the original
I did so wherever very discreet every room sort ascending
be a mere eight ish week rewritten so it by room number sending but then you end
up with
stupidly long name so yeah one or the other really any
thats queries a single tail queries and index we're gonna be looking at most two
total queries: thanks watching to see them