Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
h.singh10
Starting Member
16 Posts |
Posted - 2012-01-11 : 17:17:19
|
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 delimiter20120111^140232^0My expression is :DT_STR,4,1252)DATEPART( "yyyy" , @[System::StartTime] ) + RIGHT("0" + (DT_STR,4,1252)DATEPART( "mm" , @[System::StartTime] ), 2) + RIGHT("0" + (DT_STR,4,1252)DATEPART( "dd" , @[System::StartTime] ), 2) + "^"+RIGHT("0" + (DT_STR,4,1252)DATEPART( "hh" , @[System::StartTime] ), 2) + RIGHT("0" + (DT_STR,4,1252)DATEPART( "mi" , @[System::StartTime] ), 2) + RIGHT("0" + (DT_STR,4,1252)DATEPART( "ss" , @[System::StartTime] ), 2)+"^"+(DT_WSTR, 1)@[User::Case_RecordCount]+"\r\n"Please let me know how to get a value of record count in header.Thanks |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-01-12 : 02:12:13
|
how are you populating value for record count variable? are you using a rowcount task?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
h.singh10
Starting Member
16 Posts |
Posted - 2012-01-12 : 12:12:58
|
yes, i am using a row count tranformation before the flat file destination and i am writing that expression in the flat file connection manager (in the expression window, header row delimiter in the property) |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-01-12 : 12:47:06
|
can you show screenshot of the expression you set in flat file connection manager?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|
|
|