Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export numeric-like columns as text in mdb-export. #413

Open
spalechor opened this issue Jun 28, 2023 · 1 comment
Open

Export numeric-like columns as text in mdb-export. #413

spalechor opened this issue Jun 28, 2023 · 1 comment

Comments

@spalechor
Copy link

Hello everyone.

Is there someway to export all columns as text no matter the content? I have this scenario.

image

But when I export the table using mdb-export tool, that specific column is being treated as numeric so the zeros dissapear having something like this:

Propnum
1
1
2
3

Is there a way to avoid this behaviour?

Maybe is good to make clear that the property of the column in terms of type is short text and not numeric.

Thanks in advance.

@rhurlin
Copy link
Contributor

rhurlin commented Aug 3, 2023

Hi @spalechor,

I have tried to understand your problem. For this I created a corresponding mdb database, which contains a number field and a field of data type short text and filled that with some "00000001" to "00000003".

When I output this table with mdb-export, the display is as expected:


mdb-export spalechor.mdb table1
number1,PROPNUM
3264, "00000001"
0, "00000001"
0, "00000001"
0, "00000001"
0, "00000001"
0, "00000001"
0, "00000002"
0, "00000002"
0, "00000002"
0, "00000002"
3, "00000003"
3, "00000003"
0, "00000003"

Maybe the version of mdbtools you are using is not sufficient? I work with the 'dev' branch. Maybe it is worth to try a newer version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants