SSIS Help!
i have 13 select queries that select record on a sql database, the result should be written an excel file. HOwever, whenever there is no data, i need "NO DATA" to be written to the excel file... i have 13 sheets in a excel file.
what control flow and data flow should i use?
May 12th, 2011 7:27am
Hi,
Do you have already a package in place, or you're just starting from scratch?
also do you take a data row counts?
The "NO DATA" could be done by several ways, script task, derived column.
Let me know about your package design and i'll advise you where to place it.
ThanksMCITP - BI 2008 http://asqlb.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
May 12th, 2011 7:43am
Thank you for the quick response. i already have a package in place, ole db connection ->data conversion -> xls destination.
I tried putting a row count and contional split after ole db connection, however in 2nd case of condtional split where i need to put "no data" on the excel file, i dont know which object to select.
May 12th, 2011 7:48am
Thank you for the quick response. i already have a package in place, ole db connection ->data conversion -> xls destination.
I tried putting a row count and contional split after ole db connection, however in 2nd case of condtional split where i need to put "no data" on the excel file, i dont know which object to select.
Just add a derived column to check on the length of you identity column, and will replace the identity column with the "No Data" if it's not there.
LEN(TRIM([IDColumn])) == 0 ? "No Data" : [IDColumn]
MCITP - BI 2008 http://asqlb.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
May 12th, 2011 8:14am
Thank you for the quick response. i already have a package in place, ole db connection ->data conversion -> xls destination.
I tried putting a row count and contional split after ole db connection, however in 2nd case of condtional split where i need to put "no data" on the excel file, i dont know which object to select.
1- add a row count after the ole DB, count the rows into a variable, after the conversion or even before use the 'Precedence Constraints' to check @[User::RowsCount] == 0 to only dump a nice excel template and @[User::RowsCount] >
0 and divert the flow to the normal conversion then xls destination route.
2-Just a derived column to check on the length of you identity column, that will replace the identiry column LEN(TRIM([IDColumn])) == 0 ? "No Data" : [IDColumn]
3-the best way is to add a row count after the ole DB, count the rows into a variable , that will create a new column @[User::RowsCount] == 0 ? "No Data" : "Data"
MCITP - BI 2008 http://asqlb.blogspot.com/
May 12th, 2011 8:15am
Thank you for the quick response. i already have a package in place, ole db connection ->data conversion -> xls destination.
I tried putting a row count and contional split after ole db connection, however in 2nd case of condtional split where i need to put "no data" on the excel file, i dont know which object to select.
Just add a derived column to check on the length of you identity column, and will replace the identity column with the "No Data" if it's not there.
LEN(TRIM([IDColumn])) == 0 ? "No Data" : [IDColumn]
MCITP - BI 2008 http://asqlb.blogspot.com/
see the attached screen shot... I've created it and tested it fine..i'll blog about it later
http://www.box.net/shared/ecx3aj8i6p
MCITP - BI 2008 http://asqlb.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
May 12th, 2011 3:55pm