- Posts: 34
- Thank you received: 0
Converting .txt files to sql..problems..
9 years 6 months ago #10023
by ABJ
Converting .txt files to sql..problems.. was created by ABJ
Hi Mike
Trying the forum now..hope it works
Im trying to convert a txt file to sql.
Let me decribe the prosess :
Step 1:Downloading a txt file via FTP to a local drive.
Step 2:Convert the file to SQL.
Step 3:Copy the file to another FTP location.
Step 4:Delete the file from the local drive.
The 2 problems is when i try to read the file.
1: Using odbc, works fine when i try it out with a file in the local drive. It reads the file fine.
But, when theres no file in the dir, and i start the package, it copys file correct, goes to the "read file"
but then says theres no file in the dir.. it is either a missing delay or it will not allow me to read *.txt
2: using read from text (not ODBC), not working at all, could not read the txt.
Some of the txt file is attached
The 3. problem is that the numbers in the file is in float, eg. 5.3600254E+1.
The reader reads . as a 1000 seperator, not as decimal. Is it possible to change it in ETl or is on the server basis (global
region setting).
I can not do this, since my SQL server handles more DB´s and i would prefer not to mees with it..
Does it make any sense ?
Best regards
Anders B. Jensen, Spica Tech
Trying the forum now..hope it works

Im trying to convert a txt file to sql.
Let me decribe the prosess :
Step 1:Downloading a txt file via FTP to a local drive.
Step 2:Convert the file to SQL.
Step 3:Copy the file to another FTP location.
Step 4:Delete the file from the local drive.
The 2 problems is when i try to read the file.
1: Using odbc, works fine when i try it out with a file in the local drive. It reads the file fine.
But, when theres no file in the dir, and i start the package, it copys file correct, goes to the "read file"
but then says theres no file in the dir.. it is either a missing delay or it will not allow me to read *.txt
2: using read from text (not ODBC), not working at all, could not read the txt.
Some of the txt file is attached
The 3. problem is that the numbers in the file is in float, eg. 5.3600254E+1.
The reader reads . as a 1000 seperator, not as decimal. Is it possible to change it in ETl or is on the server basis (global
region setting).
I can not do this, since my SQL server handles more DB´s and i would prefer not to mees with it..
Does it make any sense ?
Best regards
Anders B. Jensen, Spica Tech
Please Log in or Create an account to join the conversation.
9 years 6 months ago #10024
by admin
Mike
ETL Architect
Replied by admin on topic Converting .txt files to sql..problems..
when you say
Step 2:Convert the file to SQL.
Are you loading the file into MS Sql server?
Mike
Step 2:Convert the file to SQL.
Are you loading the file into MS Sql server?
Mike
Mike
ETL Architect
Please Log in or Create an account to join the conversation.
9 years 6 months ago #10025
by ABJ
Replied by ABJ on topic Converting .txt files to sql..problems..
Maybe 
Reader -> Validator -> Transformer -> Writer.
I have a SQL DB the writer is connected to via ODBC..works fine
/Anders

Reader -> Validator -> Transformer -> Writer.
I have a SQL DB the writer is connected to via ODBC..works fine
/Anders
Please Log in or Create an account to join the conversation.
9 years 6 months ago #10026
by admin
Mike
ETL Architect
Replied by admin on topic Converting .txt files to sql..problems..
The 3. problem is that the numbers in the file is in float, eg. 5.3600254E+1.
So the main problem that you are not able to load 5.3600254E+1 value into the database?
Mike
So the main problem that you are not able to load 5.3600254E+1 value into the database?
Mike
Mike
ETL Architect
Please Log in or Create an account to join the conversation.
9 years 6 months ago #10028
by ABJ
Replied by ABJ on topic Converting .txt files to sql..problems..
Yes and no, they will figure as 53600245E+8 or something like it
/Anders
/Anders
Please Log in or Create an account to join the conversation.
9 years 6 months ago #10029
by ABJ
Replied by ABJ on topic Converting .txt files to sql..problems..
BTW, we can change the *.txt file format if needed, e.g. with a "header here";"another here"; etc..
/Anders
/Anders
Please Log in or Create an account to join the conversation.