![]() ![]() ![]() This site and a few others seem to suggest setting the Null Strings option in pgadmin to NULL. When I import the CSV file, I get this error:ĮRROR: invalid input syntax for type smallint: "" So in any given row, either the bank_debit column or the bank_credit column will be blank.Ĥ. Also, there will ONLY be a value in either the "bank_debit" or the "bank_credit" column, but never both. In the CSV file, there are no values in the "check_no" column because this only gets a value when I write a check, and I don't do that a ton. I've downloaded the CSV file from my bank that has my transactions from the previous month and corresponds identically to the columns above (except for bank_id).ģ. IMPORT CSV TO PGADMIN 4 SERIALI've set up a table in pgadmin via the following query:ĬREATE TABLE bank_import( bank\_id SERIAL PRIMARY KEY,Ģ. I've searched all over Google, Reddit, stackexchange, but cannot seem to find a solution to this problem. Either (a) I get an invalid input syntax error, (b) I can alter the debit and credit columns to be VARCHAR datatypes, but then I have my debits and credits as a bunch of strings that I can't do math with. Problem: I can't seem to manage the null values. That csv file has columns with empty (null?) values that also need to be imported into the SQL database into columns that have datatype NUMERIC. Objective: Import a csv file into PostgreSQL using pgadmin 4 (since I'm new at this and that's the most my skill level will allow). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |