Saturday, November 12, 2005

DATA FROM TEMPLATES

Just when i had finished the work on a project , I've got another one on the list . It is about importing data from templates and i have to do the validation part before the actual data is imported into the database. The template is actually a .doc file and i have to get the data into the right type , in order to be imported into some temporally table , where i will make the proper validation . When importing data into sql server from any supported type you must be carefully . For example importing data from a .xls file does not work as it should . For example ,lets say that on the xls rows you got the name of the objects that you want to import and the columns are populated with their values . If the first line of the column is empty , the data from that column is not imported into the database. To make it more clearly ,the first column has strings and the second xls column has integer values and if the first line from the second column is empty ...the whole column is not imported . When using Enterprise Manager to do this , you can change the col's type when importing . If the firs line from the numeric column is not empty , the sql converts the data into float and if the line is empty , it will convert the data into varchar. Obviously , Enterprise Manager will determine the type of the first line and set's the column type , whatever is find's . This is not a good idea , but even so , i should find the data imported as varchar type into the database . This is a fucking annoying bug when you have to import data very often . Finding the solution to solve this could take a lot of time .

0 Comments:

Post a Comment

<< Home