Solved

IN syntax in access

Posted on 2011-02-19
6
279 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Flowing down data to other tables 13 36
update query 4 28
Trying to filter a sub-report 9 34
Back-end Database connect string being set someplace where I can't find it. 10 30
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

820 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