How to fix error problem when i import excel to postgresql? - sql

I am trying to import an excel file with some Japanese data in it. I tried solutions that use COPY, use pgadmin import but I always end with an error message:
C:/Users/設備53/Desktop/Book4.csv : Invalid argument
and for the way using copy:
ERROR: could not open file "C:\Users\設備53\Desktop\Book4.csv" for reading:
No such file or directory
SQL state: 58P01
I I tried many little things e.g. be careful of the encoding, changing the security parameter etc that I saw on the net.

Related

I am trying to perform a simple linear regression on a csv data set, but R won't read the dataset

I am running the code below to use a CSV file so that I can perform a linear regression. A few fixes I found here and on other sites included the "setwd" command and closing the CSV file before running the command. I am still generating the error.
setwd("C:/Users/Tommy/Desktop/")
dataset = file.choose("Project_subset.csv")
dataset = read.csv("dataset")`
> dataset = read.csv("dataset")
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") : cannot open file 'dataset': No such file or directory
I appreciate the help on a simple problem.
I entered several different codes to read the csv file and none have been successful. I keep getting the error above that the file does not exist. I also used the file.exist() code and it returned FALSE. I am very confused as this seems to be a simple command to use.

unable to import 'econml' in pandas

I have installed the 'econml' package but when I try to import DML, using :
from econml.dml import DML
I am getting the following error:
'ImportError: cannot import name 'show_config' from 'numpy' (unknown location)'
I am wondering how can I fix this issue.
Two steps:
Find any file named as "numpy.py" in your script directory and change it into another name.
Delete any file named as "numpy.pyc" or any other file generated while compiling your code.

Import Data From CSV Using Control File Is failing

I am importing CSV file into HANA server using control file using hdbsql and for that purpose i am using IMPORT FROm CSVs statements into control file. My HANA Studio file import is working fine but when i am trying to import through hdbsql using control file as input , my import is failing for no reason, no error.
My CSV file is record delimited {CR}{LF} and i am using '\r\n' as record delimited separator and this file is UTF-16LE encoded.
Just add to #LarsBr. comment, you also need to be careful on where you will load the file from.
It needs to be in a specific directory or you will need to adjust the configuration to use a different one.
Here is a tutorial I wrote to explain that: https://developers.sap.com/tutorials/mlb-hxe-import-data-sql-import.html
There is a "ERROR LOG" option available as well documented here: https://help.sap.com/viewer/4fe29514fd584807ac9f2a04f6754767/latest/en-US/20f712e175191014907393741fadcb97.html

Runtime error in Access 2010 when importing csv with VBA

i am writing a simple application in Access 2010 which imports FlatFiles into the database according to an import specification (fixed column lengths).
The following line:
DoCmd.TransferText acImportFixed, "Betreuer_Importspezifikation", "Betreuer", Me.txt_betreuer_path, 0
Produces this error:
Runtime Error '3035': System resouce exceeded
When importing this exact File with this specification in the table manually everything works fine. The same line works with other files and the according specifications. And i also tried to not use the textfield but hardcode the path (same error occured).
Also the file that raises this error only has 37 records with 11 columns and files with >4k records and 150 columns work find so i don't think the size is the problem (although the error message sounds like it).
Does anyone have an idea what the problem could be? I am really out of ideas at this point.
BR

Proper CSV export from SQL Server

I have a table in SQL Management Studio I want to export as a CSV and afterwards import it into WEKA.
I queried all data from the table, selected it, then right-clicked and chose "Save results as"->CSV.
When I try to import this CSV into WEKA, I get the following error message:
File <path> not recognized as an 'CSV data files' here.
Reason:
wrong number of values. READ 27, expected 26, read Token[EOL], line 1023
I assume, I need to escape a String at line 1023, but what if another 100... errors will follow?
Is there any way to automatically escape all characters to get a proper CSV file, without post-processing?