select bcd from bcd22 where [email protected] group by bcd having count(bcd)%2=0
cmd22.Parameters.Add("@bcd1", SqlDbType.NChar, 20, "bcd").Value = textBox1.Text;
whereas I want the output to be as
It looks to me like the output you're getting and the output you want are the same thing, with the exception of the order, and there's no guaranteed order for a query like the one you posted.
If you want a specific order, you can achieve that by adding an
ORDER BY clause, but it's hard to provide much specific help on that without more information. For example, it looks like you want the output to be in the same order as the input, but I'm not quite clear where those input values are coming from. All I see is a single parameter in your query.