Hi Obiron,
Thanks for your comment!
It is a linked server in my Management Studio.
The customer did exactly what you said. All of the fields are at the end Strings. I discovered it because there are no NULL values in the tables, instead there are empty or blank spaces (""). Then depending on the context I treat a field as a numeric, string or datetime field.
The problem here is the customer hired a company for the cash desk system of its stores, another company for the online shop and then our company to create a CRM system, so I have to wait a lot of time until somebody decide who is responsible to deliver documentation and so on.
In previous experiences I've faced similar situations and at the end I received the documentation, but after one or two weeks.
I think it would be nice to develop a tool or a plugin to aim the auto discover data types and length of a given table. I know that SSIS has something similar to tables and flat/csv files, also Pentaho has something similar to csv files, but I don't know exactly how they work internally.
Kind Regards.