Hello,
I am working asp.net and oracle as db.
I am searching data with PolicyNo, but pollicy has multiple rows(For ex.15 rows) depending on Covers.When i am binding that policy to dataset ds, it binds 15 rows.
I dont want to get same policy no again, coz I am looping Dataset ds in FOR loop. DISTINCT is not working
| PolicyNo | RefNo | Cover | Cover_Premium |
| 123 | 888 | cover1 | 100 |
| 123 | 888 | cover2 | 200 |
| 123 | 888 | cover3 | 300 |
| 123 | 888 | cover4 | 400 |
Once the policy is saved, I dont want to get the same policy no again.
Thanks in advance
Sangeetha SPosted Jul 4, 2025, 10:39 AM
This is a common and efficient approach in C#:
William GramPosted Jul 3, 2025, 1:08 AM
SELECT DISTINCT FROM YourTable