vinay.tanguturu
Starting Member
2 Posts |
Posted - 2010-05-24 : 10:49:49
|
Good day, Am working on a reengineer project and we have developed db accessing perl code which is not working against SQL server 2005 d/b. But when i ran the same query in Sql server management studio, it is not working. Error which I have got is:Revision : 1 Mon May 24 16:08:09 2010 DIE: ETL - OTHER ERROR : Store Number->147, Tran_Date->2002.09.10, Terminal->7, Transaction->6440 DBD::ODBC::st execute failed: [Microsoft][ODBC SQL Server Driver]Invalid precision value (SQL-HY104) at E:\ETL\testfolder\kc_tlog_loader.pl line 1395, <$data_fh> line 7.Revision : 1 Mon May 24 16:08:09 2010 INSERT INTO kcpos_tran_header(org_number,return_amount,orig_store_nbr,tran_taxable_amount,tran_seq_nbr,tran_time,tran_tax_total,terminal_number,tran_gross_total,orig_tran_nbr,orig_tran_date,tender_code,tran_number,orig_term_nbr,sub_tran_type,pv_time_lapse,store_number,phone_no,tran_type,kcpos_kth_user_403,clerk_code,rtn_with_rcpt,tran_date,mkd_total,sale_amount,prev_tran_type,orig_tender_code,coup_total,prev_sub_tran_type,tran_alttax_total,employee_number,split_tender) VALUES ( ? , ? , ? , ? , ? , convert(datetime,?,120) , ? , ? , ? , ? , convert(datetime,?,10) , ? , ? , ? , ? , ? , ? , ? , ? , convert(datetime,?,120) , ? , ? ,convert(datetime,?,102) , ? , ? , ? , ? , ? , ? , ? , ? , ? )Revision : 1 Mon May 24 16:08:09 2010 11:NULL|32:N|21:8014700051|7:NULL|26:NULL|2:NULL|17:147|22:NULL|1:8|18:NULL|30:NULL|23:2002.09.10|13:6440|16:NULL|29:NULL|6:2002-09-10 19:08:00|27:00|25:NULL|28:NULL|3:NULL|9:NULL|12:11|15:C|20:2010-05-24 16:08:09|14:NULL|8:7|4:NULL|24:NULL|19:42|10:NULL|31:NULL|5:1|I have printed down the values which we are binding in the error file, with this help, i compiled the insert statement as below..INSERT INTO kcpos_tran_header(org_number,return_amount,orig_store_nbr,tran_taxable_amount,tran_seq_nbr,tran_time,tran_tax_total,terminal_number,tran_gross_total,orig_tran_nbr,orig_tran_date,tender_code,tran_number,orig_term_nbr,sub_tran_type,pv_time_lapse,store_number,phone_no,tran_type,kcpos_kth_user_403,clerk_code,rtn_with_rcpt,tran_date,mkd_total,sale_amount,prev_tran_type,orig_tender_code,coup_total,prev_sub_tran_type,tran_alttax_total,employee_number,split_tender) VALUES ( 8 , null , null , null , 1 , convert(datetime,'2002-09-10 19:08:00',120) , null , 7 , null , null , convert(datetime,null,10) , '11' , 6440 , null , 'C' , null , 147 , null , '42' , convert(datetime,'2010-05-24 16:08:09',120) , '8014700051' , null , convert(datetime,'2002.09.10',102) , null , null , null , '00' , null , null , null , null , 'N' )the above manually prepared statement is working well when i run in management studio!. Can you people help me out with this issue. is this some thing to do with perl modules or with ODBC driver? |
|