473,385 Members | 1,333 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Convert from SQL to access

I need help converting this statement to work with access 2000

SELECT COUNT(DISTINCT s.supercatID) AS num FROM supercat s WHERE
s.supercatID IN (SELECT p.supercatID from Products p WHERE p.outlet=1)

Nov 13 '05 #1
4 1407
>>
SELECT COUNT(DISTINCT s.supercatID) AS num FROM supercat s WHERE
s.supercatID IN (SELECT p.supercatID from Products p WHERE p.outlet=1)
<<
Select Count(t.supercatID) As num From (Select s.supercatID From
supercat s Where s.supercat In (Select p.supercatID from Products p
Where p.outlet = 1) Group by s.supercatID) t

Note: I tried a similar query to this without the alias'es and got the
same results (Access2002 - should work the same in Access 2000). Also,
I try to avoid the Distinct keyword. Group By is more reliable.
Rich

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #2
I don't think access 2000 allows for select inside of other select.
From what I understand I need help converting this to a join statement


Nov 13 '05 #3
thecrew wrote:
I don't think access 2000 allows for select inside of other select.
From what I understand I need help converting this to a join statement


Access has nothing to do with this. JET does allow one SELECT inside
another SELECT, (provided the syntax is correct) but not multiple nestings.

If you had quoted a bit of the post which you are referencing we might
have some idea of what you are talking about.
Nov 13 '05 #4
Lyle,
AFAIK, the limit is three-deep. Beyond that Jet chokes. Rich P's
suggestion should work. I use subqueries a lot since getting educated about
them. Very useful thing, subqueries.

--
Alan Webb
kn*******@SPAMhotmail.com
"It's not IT, it's IS
"Lyle Fairfield" <ff*******@yahoo.com> wrote in message
news:Io****************@read1.cgocable.net...
thecrew wrote:
I don't think access 2000 allows for select inside of other select.
From what I understand I need help converting this to a join statement


Access has nothing to do with this. JET does allow one SELECT inside
another SELECT, (provided the syntax is correct) but not multiple
nestings.

If you had quoted a bit of the post which you are referencing we might
have some idea of what you are talking about.

Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Gary Dale | last post by:
I have a database that was originally set up in Access 97 (because that was what we had in the office). We had a copy of Access 2000 set up on one machine for a brief period to get at another...
3
by: Derek Riley | last post by:
I have been using Access97 for some time now and decided to upgrade to 2000, the problem is when I convert it to 2000 I get the following message "There were compilation errors during the...
25
by: cory | last post by:
Hi, I have an Access database and am having an ASP.NEt application written for it. It is almost complete. I have a hosting company that I signed up with a month ago but before I did anything I...
5
by: Omey Samaroo | last post by:
Dear Access Gurus, I am tasked with converting an Access 97 Database to A2K. I created Macros, switchboards and used the full feature of buttons on forms. The A97 is also split (FE and BE). Are...
3
by: Jon S via DotNetMonster.com | last post by:
Hi all, Is there a way to convert an Access.mdb from one format (say Access '97 or Access 2000) to Access 2002 format using ADO.NET and C#??? I know how to do it manually using the Access DBMS...
3
by: Bill Nicholson | last post by:
What tools are available to convert Access projects (Forms, Code, Queries, Reports) to VB Dot Net? Does anyone have experience with this type of conversion? Please tell me I don't have to do it...
2
by: egoldthwait | last post by:
I need to convert a 17mb access 2000 db to Oracle and house it in a Citrix farm. The issue: we have never converted an Access Db to Oracle but can probably use Oracle's Workbench to assist with...
5
by: melickas | last post by:
We designed a custom application using Office Developer Tools '97 which included a Run-time version of Access--- so it would not matter if our customer even had any version of Access on their...
4
by: perryclisbee via AccessMonster.com | last post by:
I have dates of service for several people that range all over each month. ie: patient had dates of service of: 7/3/2006, 7/24/2006 and 7/25/2006. I need to create a new field via a query that...
6
by: tombsy | last post by:
Hello Group. I work for a company who is about to embark on a long awaited Office upgrade from Office 97 to Office XP. Office XP comes with Access 2002. I am an accomplished Access developer...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.