PCC V10 import lines - csv

PCC V10-have exported the table (MS Excel), identified which transactions are missing and have isolated them in same format as original file.
Have saved as .csv with and without headers - wont' import.
I have saved as .txt file, says it imported the lines successfully, but I can find them? any suggestions as to the correct import procedure from csv format into pcc (open item file) table

Related

MySQL import wizard isn't importing the COMPLETE data

I used MySQL workbench's import wizard to import data from a csv file. The import was successful but not all the data rows were imported. My csv file contains 271,117 rows but only 270,396 were imported successfully. 721 rows were not imported.
There was no error message at all but this is no good, right? How do I rectify this issue?
I had the same problem. But I converted my csv data to JSON using https://csvjson.com/
Afterwards I validated the JSON using https://jsonlint.com/.
Btw when you convert the data to JSON remember the first row needs to be the column names :)
Then inside of mySQL workbench select the table --> Table Data Import Wizard --> select the JSON file.

How to import a file edited in Notepad++ to MySQL?

I exported a MySQL table as CSV (Just CSV and not "CSV for MS Excel") and edited in excel. Then I opened it with Notepad++ in order to change character encoding to UTF-8. Now I want to import this Notepad++ file back to the MySQL table.
I don't know what next. I tried copying it to excel and save as CSV and import the CSV file, but it doesn't work.
I use shared hosting. I exported the table from phpMyAdmin.
Export->Format->CSV
Please help me.
925,1,2020-04-29 20:00:00,2020-04-29 20:00:00,,ck-X{´¯nsâ ]nXmhv,,publish,closed,closed,,ck-x{´¯nsâ-]nxmhv,,,2020-04-29 20:00:00,2020-04-29 20:00:00,,0,https://example.com/questions/ck-x{´¯nsâ-]nxmhv,0,lp_question,,0
926,1,2020-04-29 20:00:00,2020-04-29 20:00:00,,B[p-\nI ck-X{´¯nsâ ]nXmhv,,publish,closed,closed,,b[p-\ni-ck-x{´¯nsâ-]nxmhv,,,2020-04-29 20:00:00,2020-04-29 20:00:00,,0,https://example.com/questions/b[p-\ni-ck-x{´¯nsâ-]nxmhv,0,lp_question,,0

Import file using DBeaver

I currently use Mysql Workbeanch and I want to move to DBeaver as it is an all in for multiple databases.
However I use a function to import a CSV from Amazon S3 buckets as follows
LOAD DATA FROM S3 's3-eu-west-2://csv-files/OCN04.txt'
INTO TABLE OCN
FIELDS TERMINATED BY '\t'
LINES TERMINATED BY '\n'
IGNORE 1 ROWS
;
This function does not work in DBEAVER
Load data infile works but i am guessing the file path is the issue here. I'm guessing that dbeaver only reads file from a specific directory. To know the specific/default directory, you try running the above code with simply the name of your file (i.e. 'OCN04.txt'). The error message will show the file path. Save your txt file in that directory and try running your code again.
The above method works for me.
On DBeaver you can import data from file into a table with the Gui.
Rigth-click on the table and select "import data" menu.
Import Data Capture
and select the file to import.

Importing PIPE delimited format txt into MySQL via PHPMyAdmin

I am importing some thousands lines of Data from a .txt file containing two columns and the format is as it follows:
A8041550408#=86^:|blablablablablablablablablablablablablablablablablablablabla1
blablablablablablablablablablablablablablablablablablablabla2
blablablablablablablablablablablablablablablablablablablabla3
A8041550408#=86^:|blablablablablablablablablablablablablablablablablablablabla1
blablablablablablablablablablablablablablablablablablablabla2
A8041550408#=86^:|blablablablablablablablablablablablablablablablablablablabla1
blablablablablablablablablablablablablablablablablablablabla2
blablablablablablablablablablablablablablablablablablablabla3
blablablablablablablablablablablablablablablablablablablabla4
etc....
What I have done so far is create a table with the two fields, but when i try to import the .txt file as a CSV and putting / Columns separated By : | /, I get an error:
"Invalid column count in CSV input on line 2."
Which is quite obvious since the second line of the .txt file is empty.
Moreover, I have tried importing the file as a CSV using LOAD DATA, and it didn't work as well it has just filled up the table with random words and phrases from the .txt file .
So my question is : How can I import the data from this file ?
You have to fix your file; in its current state you cannot expect the import module to be able to understand it. First step would be to remove the empty lines: How to remove blank lines from a Unix file

Is there a way of LOAD DATA INFILE (import) xlsx file into MySQL database table

I know that this is discussed a lot but I don't find solution of how to do that.
What I need is to import an excel file (xls/xlsx) to my database table. It is a button which does that and the command which is executed is like that:
string cmdText = "LOAD DATA INFILE 'importTest4MoreMore.csv' INTO TABLE management FIELDS TERMINATED BY ',';";
It works great. But I need to import excel file not CSV. As far as I know LOAD DATA command does not support binary files which xls is.
So what's the solution to that? Please help
Thanks a lot
pepys
.xls will never be importable directly into MySQL. it's a compound OLE file, which means its internal layout is not understandable by mere mortals (or even Bill Gates). .xlsx is basically just a .zip file which contains multiple .xml/xslt/etc. files. You can probably extract the relevant .xml that contains the actual spreadsheet data, but again - it's not likely to be in a format that's directly importable by MySQL's load infile.
The simplest solution is to export the .xls/xlsx to a .csv.
How to import 'xlsx' file into MySQL:
1/ Open your '.xlsx' file Office Excel and click on 'Save As' button from menu and select
'CSV (MS-DOS) (*.csv)'
from 'Save as type' list. Finally click 'Save' button.
2/ Copy or upload the .csv file into your installed MySQL server (a directory path like: '/root/someDirectory/' in Linux servers)
3/ Login to your database:
mysql -u root -pSomePassword
4/ Create and use destination database:
use db1
5/ Create a MySQL table in your destination database (e.g. 'db1') with columns like the ones of '.csv' file above.
6/ Execute the following command:
LOAD DATA INFILE '/root/someDirectory/file1.csv' INTO TABLE `Table1` FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n' IGNORE 1 LINES;
Please note that the option 'IGNORE 1 LINES' says MySQL to ignore the first line of '.csv' file. So, it is just for '.xlsx' files with 1 header column. You can remove this option.
You can load xls or xlsx files with Data Import tool (MS Excel or MS Excel 2007 format) in dbForge Studio for MySQL. This tool opens Excel files directly, COM interface is not used; and command line is supported.