Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've been using the SQLite Manager extension for Firefox to edit my Chrome web data file in order to restore my keyword searches, and I think I have everything in place except that when I import a CSV file into a table,

  • it won't import into the actual table because the table doesn't allow null values
  • if I import it into a new table that does allow null values, then all the empty strings end up as null and I have to manually edit the row, type and delete a character, and then it's set to empty string and it's fine

So: is there either a way to import the CSV so that empty cells are automatically turned into empty strings instead of null, OR is there a way once a table is imported that has null values to convert it into one that doesn't allow null values, where each formerly null value is the empty string?

Thanks!

share|improve this question
2  
if the values that are null are all strings, how about search/replacing all ocurrences of ;; with ;""; in the csv file ? –  Weltenwanderer Dec 28 '10 at 17:01
    
Weltenwanderer, put that in an answer instead of a commment. It's worthy of real votes. –  Doug Harris Dec 28 '10 at 17:07
    
I tried that and thought it didn't work, but it turned out the reason it didn't work was because of a different error message I couldn't read because the dialog flowed off the screen. I agree--put that in an answer and I will accept it, thanks! Though note that you have to search more than once because e.g. ,,, will only replace the first ,, and then ignore the next ,, after it's processed the first one. –  Philip Dec 28 '10 at 18:41
    
added my comment as an answer, cheers –  Weltenwanderer Dec 28 '10 at 18:48

1 Answer 1

up vote 3 down vote accepted

If the values that are null are all strings, how about search/replacing all ocurrences of ;; with ;""; in the csv file ?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.