Solved

IN syntax in access

Posted on 2011-02-19
6
276 Views
Last Modified: 2012-05-11
is t-sql's IN, NOT IN syntax work in access sql the same way?

thanks
0
Comment
Question by:anushahanna
6 Comments
 
LVL 11

Accepted Solution

by:
rowansmith earned 167 total points
ID: 34936078
Yes.  It is exactly the same.

See : http://msdn.microsoft.com/en-us/library/bb208859(v=office.12).aspx

-Rowan
0
 
LVL 11

Expert Comment

by:rowansmith
ID: 34936086
However I should clarify that you can not use "in" with another select statement in access (as you can with T-SQL).

eg:  select a from tabX where a in (select a from tabY)

Will not work in access.
0
 
LVL 77

Assisted Solution

by:peter57r
peter57r earned 167 total points
ID: 34936135
rowansmith,

select a from tabX where a in (select a from tabY)

...will definitely work in Access, assuming the 'a' fields are compatible.
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 166 total points
ID: 34937119
Ditto what Peter said; I use the IN keyword frequently in Access with a sub-select.
0
 
LVL 11

Expert Comment

by:rowansmith
ID: 34938449
Agreed. My mistake.
0
 
LVL 6

Author Comment

by:anushahanna
ID: 34939972
Thank you experts.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now