0
votes

My data set like as.

 AccName    Debit   Credit
 A          500000  0
 B          400000  0
 C          30000   0
 D          10000   0
 E          0       950000

Now i want to show AccName i.e E in a Text box(which Credit greater than 0).DataSet contain only one row which contain Credit greater than 0. Thanks in Advance.

1

1 Answers

1
votes

Use a where condition for filter the rows based on AccName column content

 select AccName,    Debit,   Credit
 from my_table 
 where AccName  = 'E';

or based on Credit column content

 select AccName,    Debit,   Credit
 from my_table 
 where Credit> 0;

If you need only AccName then select only this column

 select AccName
 from my_table 
 where Credit> 0;