vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Can anyone help me insert an "infinity" value into a float column? - I moved a table with bcp - and can't get two of the rows into the new table.. the 2 lines in the bcp'd file look like 10111339~11~ FXCHF01W ~rateFgn_mkt ~inf.0 10111339~11~FXITL01W ~rateFgn_mkt~inf.0 --> The inf.0 value is what I can't get inserted into the float column |
| |||
| Hello, Did you try bcp'ing in native mode? (bcp -n) http://infocenter.sybase.com/help/in...s/blocks27.htm If that did not work what version of ASE were you trying to bcp into? What version of ASE did these values come from? Thanks, Neal |
| |||
| On Apr 29, 3:50 pm, SybaseNeal <nstac...@gmail.com> wrote: > Hello, > > Did you try bcp'ing in native mode? (bcp -n) > http://infocenter.sybase.com/help/in...sybase.help.as... > > If that did not work what version of ASE were you trying to bcp into? > > What version of ASE did these values come from? > > Thanks, > Neal I tried with -n but it doesn't work.. I am bcp'ing from - 32 bit ASE 12.0.0 on Solaris to 64 bit ASE 15.0.2 on linux |
| ||||
| Hello, I think newer versions disallow nan and inf for the most part. Here is a note from one of the bugs that were fixed that now disallow these non-numbers: ================================================== ====================== ASE does not allow the insertion of floating point values "NaN" and "Inf" through straightforward language methods, but does allow such values to be inserted through other means. The behavior should be consistant, either always allowing such values or never allowing them. The current inconsistant behavior causes terrible problems to replication environments, as clients can insert Nan values and repserver will try to replicate them, but does so by generating TSQL language which is rejected by the destination server, causing the replication system to fail. ================================================== ====================== I found fixes in both the client utilities and in ASE that attempt to prevent users from entering them: 231344 - CTBCP: native mode bcp now can prevent insertion of floating point NaN and InF values. Fixed in: 12.0 ESD#13, 12.5 ESD#6 and higher 271561 - Implement strong data type checking for floating-point values of "NaN" and "Inf". Disable using -T4067 at boottime. Fixed in: 12.5.0.3 or higher So if you REALLY want to try and insert them into 15.0.x, you could try booting ASE with -T4067 and use the older version of bcp. However, I would really discourage doing so as it might end up causing more problems once you force them into ASE. I would recommend running a query similar to this to find the invalid FLOAT values and then correct them once you find them: select floatcolumn from mytable where convert(int,convert(binary(8),floatcolumn) & convert(int,0x7ff0) = convert(int,0x7ff0) Thanks, Neal |