Last post Jul 28, 2020 09:19 AM by yij sun
Jul 23, 2020 06:46 AM|Gopi.MCA|LINK
My Result is showing like this
I want as resultset
how to get his resulset
Jul 23, 2020 11:26 AM|PatriceSc|LINK
Seems you just want to query from a table using SELECT * FROM YourTable ? I'm not sure how you could just get 110 when trying to do that?
Keep in mind we have no other context than what you told us. Either you are still learning the basics about accessing a database (from previous post it seems you are suing ADO.NET and already have done SQL queries before).
Else we are missing some context to understand which problem you have when trying to do something that seems pretty simple. This 110 value is not some kind of debugging message that was just left rather than showing the actual data you want ???
Jul 23, 2020 03:44 PM|wmec|LINK
Maybe your query is getting sum of Column2. Try to rewrite it by putting all respective columns.
Jul 24, 2020 08:30 AM|Gopi.MCA|LINK
Sorry it was little mistake here is the below
Jul 24, 2020 12:12 PM|PatriceSc|LINK
From old posts it seems you are using Web Forms and know already how to use a GridView? It should be something such as http://www.simplylearnprogramming.com/display-data-in-Asp.net-GridView/55
If it doesn't help, show maybe the minimal amount of code so that we can see what you are doing and how to fix this while keeping the same approach for the time being.
For those using Web Forms I would recommend having a look at https://docs.microsoft.com/en-us/aspnet/web-forms/overview/presenting-and-managing-data/model-binding/retrieving-data which
was new in 4.5 and got little exposure (seems you want to use ADO.NET rather than, Entity Framework ?)
Edit : ah or what you show is just the result of a SQL query you are running in SQL Server Management Studio? In this case show your current SQL query. SELECT * FROM MyTable should work.
I'm really having a hard time how you could have something like this wrong with more than 500 posts which seems to show you do have already a bit of experience. Keep also in mind that we have no other context than what you explicitly told us.
Jul 28, 2020 04:40 AM|shaili shah|LINK
You should fire the query like :
SELECT column1,column2 FROM table WHERE column2 = '110' ;
Maybe you are looking for this.
Hope this'll helpful to you.
Jul 28, 2020 09:19 AM|yij sun|LINK
Accroding to your description,I'm guessing that you want to find the duplicate values of the Column2.
You could do just like this:
COUNT(*) > 1
If you have other problems,you could tell us more details of your requirment clearly.