October 8, 2024 at 6:49 pm
Hello everyone,
First of all, thank you very much for this great community.
I hope you can help me.
I have been struggling for days with importing CSV files. The background is that I am currently doing an SQL course and would like to work with the CSV files provided.
I have already tried all possible variants that I can find on the Internet. I have also switched to MySQL and DBeaver and tried it there. Without success.
I'm not sure whether I just lack basic knowledge or whether it is generally difficult to import CSV into SQL. How do you do it with data sets in CSV format that are too big for Excel?
I would like to view and analyze many data sets in CSV format later, so I need a solution for this problem. Or is this data format not recommended anyway?
I am uploading an example file here. The import actually worked, but there were always problems with the data type in the last column (Value). I think this was probably also due to the 1000 separators.
I have read countless instructions for importing files on the Internet. Nothing worked.
I hope you can give me a few tips on how to deal with this.
Many thanks and best regards
October 8, 2024 at 8:11 pm
I just tried this and it imported quite easily.
Assuming you're in SQL Server Management Studio and want to import the data into a new table in a database which already exists, here is what I did:
I received the following warning – I have not analysed the data to find out which bits have been dropped.
Job done.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
October 8, 2024 at 8:14 pm
These are the rows that did not import properly:
and here are the originals (taken from the CSV file)
So now you can see why they were set to NULL during the import … they are not numeric.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply