Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
asifbhura
Posting Yak Master
165 Posts |
Posted - 2010-04-10 : 10:28:05
|
| Hi,I have two tables such as ticket and customer,in customer table i have these fields such mobileno,customerName,Addrss,Id etc....ID column is autogenerated(IDENTITY)In, ticket table,I have these fields,id,cust_id,ticket_detail,createdDate etc....here also ID is autogenerated,Now, there can be more than one ticket for one customerI need query like,I want all tickets records with customerName and mobileno.means it must take from cust_id in ticket tablemeans i want result like thisid,cust_id,ticket_details,customer name,mobilenoRegards,ASIF |
|
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-04-10 : 11:11:29
|
| Try this:Select T.ID, C.id as Cust_id, T.ticket_detail , C.customerName,C.mobilenofrom ticket_table t inner join Customer_table C on C.Id = T.Cust_idRegards,Bohra |
 |
|
|
|
|
|
|
|