Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Choose one field from a table with multiple rows

Status
Not open for further replies.

Tig30

IS-IT--Management
Feb 20, 2006
3
GB

Hi,
I'm looking for some assistance with a query problem. I have a query (very very example below, I have more tables joined). I have a line for each Client_ID with other info and I want the Account_No from the AccountsTable but there are 2 or 3 rows for each Client_No so I get 2 or 3 rows returned on the left side when I only want the one. I have tried things like
max/minof(AccountsTable.Account_No) but I get errors.

I would appreciate any help anyone can give.
many thanks

ClientTable -> AccountsTable(Standard Join by Client ID)
Client_ID Client_ID Account_No Account_Type
009812 009812 12234421 Sales1
009812 12234421 Sales2
I want to return:
Client_ID Client_ID Account_No
009812 009812 12234421
 
Hi,
( It sis called row inflation, and is very common)
Group your Report on
Client_ID
and place the Account_No in the details .

It will produce:

009812
12234421 Sales1
12234421 Sales2


[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top