By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,964 Members | 1,206 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,964 IT Pros & Developers. It's quick & easy.

autonumber query to number in another table

P: n/a
hi all,

i have a quick question. i have a table where we use autonumbers to
catergorize it, and another table where we use those autonumbers not as
the primary id, but still have them in the table.

is it possible to develop a query between the number and the
autonumber?
my current sql code:

SELECT [Logbook].[Bid #], [pre-bids].[Bid Number], [Logbook].[Job]
FROM Logbook, [pre-bids]
WHERE (([Logbook].[Bid #]) = ([pre-bids].[Bid Number]) Or
(([Logbook].[Job])=([Pre-bids].[Bid Number])));

where bid # is the autonumber. any suggestions would help!

Thanks!

TOny

Mar 3 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Br
tk****@gmail.com wrote:
hi all,

i have a quick question. i have a table where we use autonumbers to
catergorize it, and another table where we use those autonumbers not
as the primary id, but still have them in the table.

is it possible to develop a query between the number and the
autonumber?
my current sql code:

SELECT [Logbook].[Bid #], [pre-bids].[Bid Number], [Logbook].[Job]
FROM Logbook, [pre-bids]
WHERE (([Logbook].[Bid #]) = ([pre-bids].[Bid Number]) Or
(([Logbook].[Job])=([Pre-bids].[Bid Number])));

where bid # is the autonumber. any suggestions would help!

Thanks!

TOny


Yes, just use a simple join.

SELECT tblMain.*
FROM tblMain INNER JOIN tblSecondary ON tblMain.[ID] = tblSecondary.[Course
ID];
--
regards,

Br@dley
Mar 3 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.