Jump to content

Inconsistency in exported data from database direct queries


Alex8000

Recommended Posts

Hi all,

Not sure where to place this, apologies if this is the wrong (sub)forum.
I am noticing some inconsistencies with comma placement in the from database direct exported .CSV's.
When running this simple query:

SELECT * FROM h_cmdb_assets as a
LEFT JOIN h_cmdb_assets_computer_peripheral as b 
on a.h_pk_asset_id = b.h_pk_asset_id
WHERE a.h_name LIKE '%Jabra%'
order by a.h_pk_asset_id ASC
limit 250

I get the following data returned:

VktXtZR.png

As you can see the the retired_date column is only filled in on the first record. 
When exporting this through the CSV button I get the following .CSV (opened in Notepad++ before even touching it with Excel).
I took the liberty of "tabbing" the plain text for readability
9qQa0Q1.png

As you can see the exported file seems to be missing a few commas. This happens throughout this document and other documents exported this way.

Does anyone else experience the same problems?

Thanks,

Alex

  • Like 1
Link to comment
Share on other sites

Hi,

I've been having this problem for a while - I've raised it some time ago here:You just need to define column names for it to work.

Thanks,

Samuel

  • Like 1
Link to comment
Share on other sites

Hi Samuel,

Sorry, I must have missed your post when looking for related issues!
Thank you for the solution, good to know that defining column names makes it work.

Have you heard back from @TrevorKillick regarding possible fixes for this? It might be a good idea to document this on the wiki for users who don't spend time on the forums.

Thank you,

Alex

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...