S
Shiplu
hi,
I am looking for a function in ADO.NET.
it's like IF() in MySQL.
suppose a table,
[sample_table]
memo, name, sex, amount
1, cust1, 'M',100
2, cust2, 'F', 200
3, cust2, 'F', 230
5, cust4, 'F', 460
6, cust1, 'M',70
In MySQL I would query "SELECT name, IF(sex='M','GUY','LADY') as type,
amount from sample_table where memo < 5";
and the result set,
name type amount
cust1 GUY 100
cust2 LADY 200
cust2 LADY 230
---------------------------------------------------------------------
now, I want this result set from that table.
what would be the equavalent query or IF() function in ADO.NET ?
please help !
I am stuck,
I am looking for a function in ADO.NET.
it's like IF() in MySQL.
suppose a table,
[sample_table]
memo, name, sex, amount
1, cust1, 'M',100
2, cust2, 'F', 200
3, cust2, 'F', 230
5, cust4, 'F', 460
6, cust1, 'M',70
In MySQL I would query "SELECT name, IF(sex='M','GUY','LADY') as type,
amount from sample_table where memo < 5";
and the result set,
name type amount
cust1 GUY 100
cust2 LADY 200
cust2 LADY 230
---------------------------------------------------------------------
now, I want this result set from that table.
what would be the equavalent query or IF() function in ADO.NET ?
please help !
I am stuck,