MySQL Forums
Forum List  »  Newbie

Re: Uploading CSV. 0 records imported
Posted by: Ben Wade
Date: July 20, 2022 11:01AM

Ben Wade Wrote:
> Ben Wade Wrote:
> -------------------------------------------------------
> > 1)mysql80
> > 2) https:// imgur. com/wzXyQzm
> > 3) https:// imgur. com/TQPAfKN
> > 4) https:// imgur. com/ib4cfJl
> >
> > Before using links remove spaces please.
> >
> > as you can see on the first screenshot. ther's
> an
> > issue with decimal value. I put 15,5 it should
> be
> > enough no? In total 15 digits, 10 before
> decimal
> > comma and 5 after decimal comma.
> I changed decimal to varchar for columns with
> currency and was able to insert the data. Also, I
> removed the primary key from the transaction ID
> because this column isn't unique and it was
> causing several issues(duplicate data weren't
> inserted).
> The reason why I wanted to use decimal instead of
> varchar because these columns represent currency.
> And as I understood after googling, it is better
> to use decimal for money. I wanted to make it the
> right way but as we can see it brings up certain
> issues.
> 1) https:// imgur. com/GAHvcay as you can see
> here decimal type causes unnecessary zeros at the
> end of certain numbers.
> 2) https:// imgur. com/lCpDWWy but with varchar
> no issues.
> Maybe you could tell me what datatype better to
> use and if you say that decimal is a better option
> then where did I make a mistake and how to fix
> decial datatype issue in my example?

One more thing. This data comes from the google data analytics course. They teach SQL in bigquery but I don't want to perform tasks in bigquery. As I understood, it isn't that popular and would be better to learn MySQL instead. I don't want to end up in a situation where a company that is going to hire me uses MySQL and all this time i was learning bigquery so it will take extra time to transition from bigquery to MySQL. although both of them represent a tool to run SQL, however, there are a lot of differences regarding data import, interface, etc. I hope my conclusion is right.

Options: ReplyQuote

Written By
Re: Uploading CSV. 0 records imported
July 20, 2022 11:01AM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.