Re: [cx-oracle-users] Error Expecting numeric Data
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2013-01-27 02:55:27
|
On Sat, Jan 26, 2013 at 7:37 PM, Ivanelson Nunes <iva...@gm...>wrote: > Some type of limitation or restriction security. For when I insert only 30 > lines generates no exception. > No. This a programming error. You are passing *both* strings *and* numbers at the same time. Oracle insists that it be one type or the other! The first 30 lines are all of the same type, it would seem. The error occurs sometime later. One suggestion: print the types of the tuples you are inserting -- that should help you figure things out. > > My code is here: > https://github.com/ivanelson/zim2ora/blob/master/zim2ora_bulk.py > > I also found these comments on this issue: > https://github.com/dmwm/WMCore/issues/4297#issuecomment-10706585 > > > Any idea? > > > []s > 2013/1/26 Roger Downing <rog...@gm...> > >> Hi, >> It would be helpful if you were to give more context to your code. What >> is 'L' for example? >> >> cursor.executemany() expects as its second argument a sequence. The >> elements of the sequence should either be sequences or parameter mappings >> as described in the documentation. >> >> The error you are getting could mean that you are trying to insert >> non-numeric data into a column which has been specified as numeric. >> >> Cheers, >> >> Roger >> >> >> On 25 January 2013 18:19, Ivanelson Nunes <iva...@gm...>wrote: >> >>> What kind of error is this? >>> >>> cursor.executemany (sql_insert, L) >>>> TypeError: expecting numeric data >>> >>> >>> I am reading a csv file with 2000 lines and 115 columns. >>> >>> Any idea? >>> >>> Thanks, >>> >>> Ivan - Brazil >>> @ivanelson >>> >>> >>> ------------------------------------------------------------------------------ >>> Master Visual Studio, SharePoint, SQL, ASP.NET <http://asp.net/>, C# >>> 2012, HTML5, CSS, >>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >>> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >>> MVPs and experts. ON SALE this month only -- learn more at: >>> http://p.sf.net/sfu/learnnow-d2d >>> _______________________________________________ >>> cx-oracle-users mailing list >>> cx-...@li... >>> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >>> >>> >> >> >> ------------------------------------------------------------------------------ >> Master Visual Studio, SharePoint, SQL, ASP.NET <http://asp.net/>, C# >> 2012, HTML5, CSS, >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >> MVPs and experts. ON SALE this month only -- learn more at: >> http://p.sf.net/sfu/learnnow-d2d >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> >> > > > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > MVPs and experts. ON SALE this month only -- learn more at: > http://p.sf.net/sfu/learnnow-d2d > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |