June 8, 2012 at 8:26 am
Hi,
I have the below table struc in SQL server 2008
IDChar10
D_DATEDate10
STATUSChar1
S_NUMChar16
K_AMTNumeric16
N_NUMChar30
B_NUMChar1
R_IChar1
I_NUMChar30
C_DTdate8
Need to load the flat file source into the above table.
Can you please suggest how to load?\
Rows in flat file are as follows
010T11003219920120605 S0000020224 52.26 QS2011201206031 1OT1100321990000002006
Regards
SqlStud
June 8, 2012 at 9:55 am
It is Fixed length Format.
There are no delimiters in the file so when one field ends, the other starts without any tabs, comma(s), or spaces between them. Whitespace fills in where there is no data to maintain the field length. There are no null characters, only whitespace.
Regsards
SqlStud
June 8, 2012 at 9:59 am
SSIS allows you to define fixed format inputs. Had to do this with DTS (SQL Server 7/2000) packages at a previous employer many years ago.
June 11, 2012 at 12:12 am
Can anyone please reply on this.?
I need to complete the task today
Regards
SqlStud
June 11, 2012 at 12:21 am
Did you tried Google? I cannot imagine that typing in "ssis import file fixed length" wouldn't give any meaningful result.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
June 11, 2012 at 12:37 am
Hi,
Is it possible or need to follow the other way ie creating SP etc
Regards
Sivakkolundu
June 11, 2012 at 12:51 am
sqlstud (6/11/2012)
Hi,Is it possible or need to follow the other way ie creating SP etc
Regards
Sivakkolundu
It's very very easy in SSIS. Just create a flat file connection manager and explore the options.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
June 11, 2012 at 4:11 am
Hi
As already said
It is Fixed length Format.
There are no delimiters in the file so when one field ends, the other starts without any tabs, comma(s), or spaces between them. Whitespace fills in where there is no data to maintain the field length. There are no null characters, only whitespace.
No headers in the source file
Please suggest
Regards
SqlStud
June 11, 2012 at 4:42 am
sqlstud (6/11/2012)
HiAs already said
It is Fixed length Format.
There are no delimiters in the file so when one field ends, the other starts without any tabs, comma(s), or spaces between them. Whitespace fills in where there is no data to maintain the field length. There are no null characters, only whitespace.
No headers in the source file
Yes, and...?
All you just said can be configured in the flat file connection manager. Have you even looked at it?
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
June 11, 2012 at 6:03 am
Hi from flat file fixed length data we can store into table using ssis but the length of source u given is 78 and in the data types which u declared
total length was 128 and K_amt has declared as numeric 16 according to source '26 QS2011201206031' it wil come this value but data type is numeric
here it will come varchar according to data . 🙂
June 12, 2012 at 1:26 am
Thanks to all
June 12, 2012 at 8:55 am
Hi ,
You can use script componet and write the c# or vb script as per requirements
June 12, 2012 at 9:20 am
sqlserver8650 (6/12/2012)
Hi ,You can use script componet and write the c# or vb script as per requirements
Why would I use a script component when I can define each column of the fixed width formatted file in the flat file connector and map those columns directly to the appropriate columns of the destination table?
June 12, 2012 at 1:16 pm
Lynn Pettis (6/12/2012)
sqlserver8650 (6/12/2012)
Hi ,You can use script componet and write the c# or vb script as per requirements
Why would I use a script component when I can define each column of the fixed width formatted file in the flat file connector and map those columns directly to the appropriate columns of the destination table?
Because you can, that's why.
:hehe:
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
June 12, 2012 at 1:41 pm
Koen Verbeeck (6/12/2012)
Lynn Pettis (6/12/2012)
sqlserver8650 (6/12/2012)
Hi ,You can use script componet and write the c# or vb script as per requirements
Why would I use a script component when I can define each column of the fixed width formatted file in the flat file connector and map those columns directly to the appropriate columns of the destination table?
Because you can, that's why.
:hehe:
True, but why the extra complexity? :w00t:
Viewing 15 posts - 1 through 14 (of 14 total)
You must be logged in to reply to this topic. Login to reply