ASP.NET - concatenate qry ? - Asked By Jahir on 06-Mar-12 02:30 AM

this is one table:

create table tbl_register(id bigint primary key identity,name varchar(100),username varchar(100),password varchar(100),dateofbirth datetime, address varchar(1000),emailid varchar(100),mobilenumber bigint,amount float)

this is another table:

create


table tbl_agent(id bigint primary key identity,Agentid bigint,username varchar(100),address varchar(100),mobilenumber bigint,date datetime,nooftickets bigint,amount float)

here mathch is shaded in black i want concatenate qry for this like this qry:

adap =


new SqlDataAdapter("select a.id,b.agentid,a.username,a.mobilenumber,a.date,a.nooftickets,a.amount from tbl_agent a,tbl_register b where a.agentid=b.id", con);

//error

i want qry like this but this is error qry ?
Anandh Ramanujam replied to Jahir on 06-Mar-12 06:06 AM

try this...

select

a.id,b.agentid,a.username,a.mobilenumber,a.date,a.nooftickets,a.amount from tbl_agent a

inner


join tbl_register b on a.agentid=b.id