"IN"

  • Thread starter Thread starter Wei
  • Start date Start date
W

Wei

In the following sql:

SELECT [Policy Number]
FROM YourTable
WHERE Coverage IN ("CL", "AP")

What does IN() do? I'm a beginner in sql, I usually just
use query design to make my queries.

Is it necessary for me to learn sql? Coz it seems that not
everything can be done through query design view...

thanks.

Wei
 
Hi,



In this case, it means you supply a list. It is the same to say


WHERE Coverage = "CL" OR Coverage="AP"


but the list based syntax soon becomes "smarter" or "easier" as you get
more and more items.



It is nice to know SQL better as you progress, since it is definitively
faster and many times easier to do the job in SQL than to do it with
recordsets, generally, but start doing it by looking at the statements the
query designer writes for you. You will soon acquire confidence in your SQL
skills and be ready to jump into more complex SQL statements that the
designer can't produce for you.




Hoping it may help,
Vanderghast, Access MVP
 
Thanks a lot Michel!

ok, I'll start learning SQL then.

Wei
-----Original Message-----
Hi,



In this case, it means you supply a list. It is the same to say


WHERE Coverage = "CL" OR Coverage="AP"


but the list based syntax soon becomes "smarter" or "easier" as you get
more and more items.



It is nice to know SQL better as you progress, since it is definitively
faster and many times easier to do the job in SQL than to do it with
recordsets, generally, but start doing it by looking at the statements the
query designer writes for you. You will soon acquire confidence in your SQL
skills and be ready to jump into more complex SQL statements that the
designer can't produce for you.




Hoping it may help,
Vanderghast, Access MVP



In the following sql:

SELECT [Policy Number]
FROM YourTable
WHERE Coverage IN ("CL", "AP")

What does IN() do? I'm a beginner in sql, I usually just
use query design to make my queries.

Is it necessary for me to learn sql? Coz it seems that not
everything can be done through query design view...

thanks.

Wei


.
 
Back
Top