Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1451

Inserting NaN or Null values into a text file processed by MySqlBulkLoader (no replies)

$
0
0
Hello,

I am creating a text file for MySqlBulkLoader to process. The table is simple:

CREATE TABLE VariableData (
ExperimentID INTEGER UNSIGNED NOT NULL,
VariableID INTEGER UNSIGNED NOT NULL,
ordinal INTEGER UNSIGNED NOT NULL,
value DOUBLE NULL,
PRIMARY KEY(ExperimentID, VariableID, ordinal)
);

Sometimes the 'value' value is NaN. What do I need to write in the text file that BulkLoader processes in order to insert either NaN or a Null into the table? I've tried these two strings:

stmt = idExperimentStr + ',' + idVariableStr + ',' + str(ordinal) + ',NaN\r'
stmt = idExperimentStr + ',' + idVariableStr + ',' + str(ordinal) + ',\r'

but '0' gets written as the 'value' in both statements.

Viewing all articles
Browse latest Browse all 1451

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>