-
need help in query
Hi,
I am not sure how i should write the query to fetch one record. below is how the data in my table. rows 1 and 2 have the same value and value in ID1 is value of ID in second row.
The query needs to fetch one row per value.
Appreciate if you anyone help me with the query in access.
ID Value ID1
11 100 21
21 100 11
31 200 41
41 200 31
thanks,
-
Create a select query with one of the Id's as the criteria. You will only get one record returned.
-
I donot know the Id to pass to the query. I have to work on the whole set and get one record from the pair.
-
Try using Union Query for example if your data looks like
ID, Value, ID1
11 100 21
And you want it to look like
ID, Value
1I 100
2I 100
You have to use UNION QUERY.
Example:
SELECT Value,
[ID] AS ID,
[ID1] AS ID
UNION ALL
From Table;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules