Joma Rajab

Joma Rajab

  • NA
  • 110
  • 51.5k

How to write query to retrieve from two linked tables

Jul 26 2016 11:34 AM
I need to retrieve user Id from module Relation table based on the user type which is in user table and they have relationship 
Please how to write that query in sql data source tag
  1. <asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"  
  2.    SelectCommand="SELECT distinct [Full_Name], [UniID] FROM [Users] WHERE [UniID]= (SELECT [UniID]from [ModuleRelation]) AND [user_type]='Staff'"></asp:SqlDataSource>  
Please help
thank you  

Answers (4)