Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Select statement to get all data with the same column value

$
0
0

i have created a page for user to search the sql server.. the search page has 2 dropdown, one is the Entity dropdown containing all the entity_ID in SQL server the other is Business Unit Dropdown which contain all bU_ID

after the user click on search, my select statement for now is : 

Select * FROM Table where entity_ID=int.Parse(drpEntity.SelectedValue) and bU_ID=int.Parse(drpBU.SelectedValue)

i would like to know how do i tweak my select statement so that other data gotten from the above select statement, i would also like to get all the rows with the same entity_ID and same name.

Meaning to say if user select entity_ID=3 and bU_ID=2.. the new select statement is suppose to return 4 rows of data..


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>