# Getting SQL error with CSV NUMERIC NULL

**URL:** <https://forum.liquibase.org/t/getting-sql-error-with-csv-numeric-null/1903>\
**Category:** General Discussion\
**Created:** [April 3, 2012, 3:38am UTC](https://forum.liquibase.org/t/getting-sql-error-with-csv-numeric-null/1903 "2012-04-03T03:38:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thiagobonfante](https://avatars.discourse-cdn.com/v4/letter/t/87869e/32.png) [@thiagobonfante](https://forum.liquibase.org/u/thiagobonfante)\
**Post date:** [April 3, 2012, 3:38am UTC](https://forum.liquibase.org/t/getting-sql-error-with-csv-numeric-null/1903/1 "2012-04-03T03:38:00Z")

</div>

Hi,  
  
I’m trying to convert a MySQL table to PostgreSQL, but when I create the CSV file with CSVWriter, a NUMERIC field who have NULL values was receiving “” (quote quote) instead “NULL”, then the SQL generated is invalid as it:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INSERT INTO table (field1, field2, field3) VALUES (1, , ‘John’);   
Anyone knows what’s going on?  
  
Regards,  
  
Thiago

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [April 3, 2012, 3:38am UTC](https://forum.liquibase.org/t/getting-sql-error-with-csv-numeric-null/1903/2 "2012-04-03T03:38:00Z")

</div>

Are you using liquibase 2.0.3?  
  
Nathan

---

<div class="post-metadata">

**Author:** ![thiagobonfante](https://avatars.discourse-cdn.com/v4/letter/t/87869e/32.png) [@thiagobonfante](https://forum.liquibase.org/u/thiagobonfante)\
**Post date:** [April 3, 2012, 3:38am UTC](https://forum.liquibase.org/t/getting-sql-error-with-csv-numeric-null/1903/3 "2012-04-03T03:38:00Z")

</div>

Yes Nathan.  
  
Actually i couldnt wait for an answer then I’ve created my own csv writer (not that hard). I’m developing a backup tool for MySQL, PostgreSQL and SQLServer and tanks to liquibase, I’ve progressed a lot.  
  
Anyway, dunno why the error.  
  
Thiago
