[thelist] SQL: looking for resources, have one question

Scott Schrantz scotts at rci-nv.com
Tue Oct 22 00:18:01 CDT 2002


> -----Original Message-----
> From: Chris W. Parker [mailto:cparker at swatgear.com]
>
> > There is a way to cheat and have Access build your JOINs for
> > you. (Don't let Rudy know!) If you build a Query in Access,
> > it will construct a SQL statement for you. Just go to View>SQL View,
> > and you can copy and paste from there. If you draw data from
> > two or more tables, it will build an INNER JOIN.
>
> now this might be hard to believe, but i've yet been able to
> figure out how to use access for this purpose. writing the
> query's by hand has been much more fruitful than using access.
>
> so if you would, list the steps you took to make that query in access.

I do this all the time when I have a complex query, or one involving JOINS.
And I'm glad to know that it's all legit (Thanks Rudy!)

Assuming you've already set up your tables (Access 2000):

* Go to Queries
* Choose "Create Query in Design view"
* A list of your tables will pop up. Add products and manufacturers, then
close the pop-up.
* Drag the ID from the products table down to the first column, and name
from the manufacturers table down to the second column.
* You've written your query! Go to View>SQL View.
* If you play around with the Sort and Criteria fields, it will add ORDER BY
and WHERE clauses for you too.

--
Scott Schrantz
work: www.rci-nv.com
play: www.computer-vet.com



More information about the thelist mailing list