If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > ssis flat file header issue

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-11-12, 17:16
h.singh10 h.singh10 is offline
Registered User
 
Join Date: Dec 2011
Posts: 13
ssis flat file header issue

I am using an expression to create a dynamic header row in the flat file. I am able to create dynamic date and time whenever the file is created and i am struggling to get the record count (total number of records loaded into flat file). I am getting the header as below: zero shows number of records which infact is not a right number. i am using the expression in the flat file connection manager and in the property i am using header row delimiters.

^ (Carrot) is the column delimiter

20120111^140232^0

My expression is :

DT_STR,4,1252)DATEPART( "yyyy" , @[System:tartTime] ) +
RIGHT("0" + (DT_STR,4,1252)DATEPART( "mm" , @[System:tartTime] ), 2) +
RIGHT("0" + (DT_STR,4,1252)DATEPART( "dd" , @[System:tartTime] ), 2) + "^"+
RIGHT("0" + (DT_STR,4,1252)DATEPART( "hh" , @[System:tartTime] ), 2) +
RIGHT("0" + (DT_STR,4,1252)DATEPART( "mi" , @[System:tartTime] ), 2) +
RIGHT("0" + (DT_STR,4,1252)DATEPART( "ss" , @[System:tartTime] ), 2)+"^"+(DT_WSTR, 1)@[User::Case_RecordCount]+"\r\n"



Please let me know how to get a value of record count in header.

Thanks
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On