datagrid

Y

Yoshitha

Hi
I want to display 2 tables data within a single datagrid.
In table1 i've 4 fields
FirstName
LastName
Emailid primary key
Usertype

In table2 i've 2 fields

Emailid foreignkey
CompanyName

in datagrid i've to display all fields except usertype but i've to retrieve
data based on the usertype only not based on primary key field( emailid).

i know how to display data in grid based on primarykey field but in my
application i've to display the data of 2 tables in datagrid based on
usertype field which is presented in table1 not in table2.

can anyone tell me how to do this one.
its urgent for me
thanx in advance
yoshitha
 
V

Vaibhav

If i understand your question correctly.

The only thing is to create a query which joins both and tables on emailid
and retrieves data based on usertype of one of the tables.

Select a.*,b.* from tbl1 a, tbl2 b Where b.EmailId=a.EmailId and
a.userType='X'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top