Maneesh A N

Maneesh A N

  • NA
  • 179
  • 108.3k

insert itemname into corresponding columns in sql 2005

Sep 13 2013 5:34 AM
if we have got itemid in tableSalesItem, how to save itemname into corresponding columns in database.means ,example  itemname 'tea' ,corresponding itemid '1' getting,but not inserting...how to use if..else condition for each catagory...

tableSalesItem(i want to insert vTea    Coffee
                                                    Tea    Coffee  like this,here i have doubt..how?)

vTea        int,
vCoffe      int,
vSoft        int,
vMineral   int,
vFax         int,


tableItem(already inserted)

vItemName      iItemId

 
Tea                    1
Coffee                2
Soft                    3
Mineral               4
Fax                     5

Answers (2)