okay um so you can make a query using
the select uh the SQL code uh another
way to do it is to use the query
designer what we can do here is pick on
query and then you pick on design query
in the
editor uh now you're going to pick your
table let's pick the order
master I'm double clicking on order
master and Order details you can pick as
many as you wanted to uh in this case
we'll pick on close
now if you are going to have more than
one table of course it would be very
important to join the tables together on
a common field so I want to pick on
order ID and drag it over to the order
ID over here now now they're linked
together uh now you can start picking
your Fields so I'm I'm going to pick on
the order ID the customer ID the
employee ID the order
date and uh let's say the ship
country and the order amount from the
order master and we'll get the product
ID and the unit price and the quantity
from the order
details notice how it's actually
building the code for you so um this
this window this part of the window up
here has the actual tables this window
is where we can start to add criteria
and we'll do that in just a second and
then this is where it's building the
actual SQL code for you so uh let's say
this um we want to do a sort on customer
ID so I'm going to pick on that and make
it
um make it
ascending and then the employee ID uh or
let's say by order date and we'll pick
on that make that ascending okay and the
sort order in this case would be two but
you can change you can change it if you
wanted to uh the lower the number then
then um it would be like it's going to
stored first by customer ID and then by
order date now over here you can
actually put criteria uh so let's say we
want the order date to be
between you know the same kind of thing
that we had before we're going to have
the dates and quotes like that
[Music]
[Music]
so you can type in your
criteria and notice how that shows up uh
in your actual statement down here so
when we do that here's how the criteria
works if something is is in the same
column it becomes a logical
end but then different columns are going
to be uh ORS so I can have this or this
or
this or if you had more than one
criteria in the same column it would be
this and that or this and that all right
as long as they're in the same column
then it would be an and uh so at this
point when you're done with
that you can click on okay and now you
can see the actual query has has your
code in there and then you can run that
as
normal uh in this case uh something is
not correct there incorrect syntax so
this is where you start to use the uh
the the message and help you out a
little bit so it tells you what line
that it's going to be in so if you look
at this 1 2 3 4 five
6 and um oh I see uh this class manual
one oh oh this is from the previous
query I see what happened so let's get
rid of all this
code that really should been there we
should have just started with a new
query there and now let's run that and
now you can see it did run that is how
we have fields from both
tables and then notice how it made that
into what we call an inner join all
right so that's how you can use the
query design Builder to start to build
your queries watch
again right we did um
query and then design query in the
editor
[Music]