sathish kumar

sathish kumar

  • NA
  • 117
  • 165.2k

Sql insertion error

May 18 2012 2:10 AM
 string strSQL1 = "INSERT INTO [Table_1] SELECT LocationFrom,ItemCode,BatchNo,ExpiryDate,Qty,UOM,Rate,Value,IssueDocumentNo,LocationTo,ReceivedQTY FROM [Temp_Transaction] ";

while i am inserting values from Temp_Transaction to Table_1 i m getting error-converting-data-type-varchar-to-numer.... pls anyone help me...




  Table_1 (Structure)                                         Temp_Transaction                         i inserted value such as

LocationFrom varchar(50)                                   LocationFrom varchar(50)             Central Store

ItemCode  varchar(50)                                   ItemCode  varchar(50)                       rty78 

BatchNo  varchar(50)                                   BatchNo  varchar(50)                              gh

ExpiryDate date                                           ExpiryDate date                                  2012-05-18

UOM varchar(50)                                         UOM varchar(50)                                   lit
 
Qty numeric(12, 2)                                      Qty numeric(12, 2)                               100.00

Rate numeric(12, 2)                                      Rate numeric(12, 2)                            100.00

Value numeric(12, 2)                                       Value numeric(12, 2)                          10000.00

IssueDocumentNo  int                                   IssueDocumentNo  int                            22

LocationTo  varchar(50)                                LocationTo  varchar(50)                       Pharmacy

ReceivedQTY  numeric(12, 2)                         ReceivedQTY  numeric(12, 2)               100
          

Answers (3)