Click here to Skip to main content
15,888,968 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Actually i want to join two tables e.g.
table-1
Movieid
Moviecode

table-2
id
Movieid
Moviename

so i want to bind these two table to get result like,get moviename and in bracket its movie code..

e.g. Abc(212)
Posted

check this query
SQL
SELECT table2.Moviename+'('+ table1.Moviecode+')' as movieName FROM table1
INNER JOIN table2 ON table1.Movieid=table2.Movieid
 
Share this answer
 
Comments
Siva Hyderabad 1-Mar-14 0:46am    
+5
george4986 1-Mar-14 1:09am    
thanks siva ;-)
Member 10559568 1-Mar-14 7:15am    
thnx...:-)
george4986 1-Mar-14 7:41am    
;-)
C#
var query =(from a in table1 inner join b in table2 on a.movieid=b.movieid
select NEW {b.moviename+" ( "+a.moviecode+" ) " }).ToList();
 
Share this answer
 
Comments
Member 10559568 1-Mar-14 7:15am    
Thank you..:-)
King Fisher 3-Mar-14 1:25am    
:)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900