Skip to content

Insert itemname into corresponding columns in sql 2005

Maneesh A N

Asked Sep 13, 2013, 1:34 AM EDT2 answers
Share
LinkedInX
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

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • Suthish Nair
    0
    Please close the duplicate thread. Already another thread is active and please do not create duplicate threads going forward.
    0
  • 1 short reply
    • 0
      pls Ans Sir
      0