SQL to the rescue... CRs from Imported CSV disappear?

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
KSan
AppGini Super Hero
AppGini Super Hero
Posts: 252
Joined: 2013-01-08 20:17

SQL to the rescue... CRs from Imported CSV disappear?

Post by KSan » 2013-06-06 21:33

I have an Excel based template which my application owner uses to provide me data with. There is a long text description column and very often there are carriage returns in it. I then save it as csv and import into my AppGini app using the AppGini import csv feature in the Admin area... So far so good!

For some reason the CRs in Excel file are imported as rr into MySQL. I am sure somehow someday we will be able to avoid this altogether but in the meanwhile I found the following SQL statement to help fix the issue in one sweep after import. Adds one more thing to my checklist but saves a whole lot of headache later on. Thought I should share.

UPDATE your_table_name set field_name = replace(field_name, "rr", "\n\n")

KSan
AppGini Super Hero
AppGini Super Hero
Posts: 252
Joined: 2013-01-08 20:17

Re: SQL to the rescue... CRs from Imported CSV disappear?

Post by KSan » 2014-06-20 19:55

One year later and few version updates under the bridge I am sorry to say that this very same issue is still here and is now bugging me again. I wish this would get some attention in this coming year! :(

Edit : The above solution is not a viable option either. I just found out how many words in English have 'rr' in them and now they are all replaced with line breaks in my database...

Ahmad please fix this. It is not right that a major issue affecting data integrity is left to linger on for as long as it has. Thank you very much for hearing me out on this.

User avatar
a.gneady
Site Admin
Posts: 1281
Joined: 2012-09-27 14:46
Contact:

Re: SQL to the rescue... CRs from Imported CSV disappear?

Post by a.gneady » 2014-06-22 03:43

Sorry, I guess this one went unnoticed after a while. I've added it to the backlog now for fixing as soon as possible.
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

KSan
AppGini Super Hero
AppGini Super Hero
Posts: 252
Joined: 2013-01-08 20:17

Re: SQL to the rescue... CRs from Imported CSV disappear?

Post by KSan » 2014-06-22 18:10

Super. I appreciate your effort to resolve this one.

Post Reply