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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

joining two datatables/views?

Status
Not open for further replies.

KevoMee

Technical User
Apr 30, 2002
72
IE
Hi,

I have 2 tables in my dataset, "auctions" and "items". Every auction contains an item id (which is a foreign key to a particular item in table item).

auction table - auction no, item no, needs

items table - item no, item name, description

I want to put all of the auction details in the datagrid, I also want to put the name of the item on the datagrid. Does anyone know how to do this using dataviews or any other way?

cheers,
kev.
 
Select
auction.auction_no, auction.needs, items.item_name
From auction, items
Where auction.item_no = items.item_no

Try that, I think it should give you what you wanted.

If you want to sort it before displaying it, just dump it into a dataview object and perform a sort.

Jack
 
hi,

ok thanks. Would I be able to run that command on a dataset? if so how do I do it? Or would I have to run it straight from the database and create a new Webservice just for that table?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top