Click here to Skip to main content
15,917,795 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
i have one gridview , and have two tables
like this photo
http://i.stack.imgur.com/ZrwJJ.png[^]

how can i show these two table on this gridview , sorting by DATE ? i means something like this photo :

http://i.stack.imgur.com/DLW3Q.png[^]
Posted
Comments
King Fisher 28-May-14 15:24pm    
just google about joins in Sql server

1 solution

you can use SQL JOIN statement as below
SQL
SELECT E.[DATE], E.PIC, P.NAME, P.ID
FROM EVENT_TABLE E
JOIN ON PLACELIVED P ON E.ID =P.ID
ORDER BY E.[DATE] DESC
 
Share this answer
 

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