okay let's go ahead and run another
query this is going to be using the wear
statement of course you use the wear
statement to select your specific
records so I'm going to close this
previous window close this previous
window uh we'll pick on the file open
and let's click on file and we're going
to get one that's called Italy
only uh so now you see where ship
country equals Italy uh it still has the
order by in there of course so let's go
ahead and run
that and notice how we only have the
Italy uh items now we were shown 56 rows
if you scroll
down uh Now it only has the ones from
Italy of course let's do another example
like that uh I'm going to pick on file
open
file and this time let's get the Italy
can Canada and Spain so notice the
criteria this time we're using a clause
called in where to ship country in Italy
Canada and Spain that is the syntax the
commas are between each country and each
country is in quotes and the whole thing
is in parentheses go ahead and run that
this
time and now we have some from Canada if
we scroll down
further we have some from Italy if we
scroll down
further now we have some from Spain
Noti how is still sorted by the country
and then by the order amount descending
within country of course so um let's do
another example another popular one is
going to be a date range so I'm going to
pick on file
open
file and then we're going to do uh this
one that's called date
range uh notice what's happening in
between here we say we it's still going
to be from Italy Canada and Spain and
the order date we're using the The
Reserve or between here and you put your
start date and your end date and make
notice of the dates are in single quotes
so now it's only going to return the
ones that are um between January 1st of
the year 2000 and December 31st of the
year 2000 I'm going to go ahead and run
that uh now we have less records than we
have before we have still have
Canada Italy and Spain as the country as
we can see but look at the order dates
they go from August of 2012 actually
they're not sorted by date so but uh if
I scroll down you can see that they're
all from the year
2000 um whereas before we had more than
that so those are examples of using the
wear Clause now when you do this one
with the date range people might ask you
if there's a way that uh we can prompt
the user for the date range or is there
a way we can prompt the user for the
criteria and the answer will be yes uh
we're going to do that when we do some
stored procedures later on today