...

View Full Version : Using a field as reference



lebronletchev
07-04-2007, 08:13 AM
Hi,

I have a table with 2 columns (in MSAccess). At the present time when I call
by columnx it shown all records of columnx. How I do to select only that records with same variable in columny?

For example:

COLUMNXCOLUMNY

copper 1
cultural 1
safari 1
welcome 1
boast 2
hourney 2
flat 2
intention 2
rummage 3
door 3
despite 3


How I select the elements in columX that have the same columnY?

Thank you in advance.

Lebron

mehere
07-04-2007, 05:19 PM
if you want records where columnx = columny use that in a where clause

SELECT * FROM tbl_TableName WHERE columnx = columny

Spudhead
07-04-2007, 05:58 PM
How I select the elements in columX that have the same columnY?


SELECT columnx FROM tbl_TableName WHERE columny = 1

lebronletchev
07-04-2007, 07:16 PM
Thank you for both suggestions.

Lebron



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum