SSIS question - Email the results of the table in pipe delimited format to the users

I am new to SSIS and I have a requirement.  I have a sales table that has transactions for all months.  I am trying to automate the process which involves following steps:
I need to query the table based on previous month.
Email the results of the table in pipe delimited format to the users.
What I am currently doing:
I created a temp table and load the query results in it every month by truncating the previous month’s data.  Saved the query results in excel format. Open the excel and save it in csv format. Use SSIS package to convert csv to txt format and email
them manually with the txt file name as “Salesresults_<previousmonth>.
I just want to automate this process but the main challenge comes up with email with txt attached. Please help me out.

First create a SSIS variable(@[User::Path]) that store folder path as "C:\Test".
Select the "Expression" tab in Send Mail Task Editor and select the appropriate property(FileAttachments) and assign the below expression.
@[User::Path] + "\\Salesresults_" + (DT_WSTR, 10) MONTH( GETDATE() ) + (DT_WSTR, 10) YEAR( GETDATE() ) + ".txt"
Regards, RSingh

Similar Messages

  • Excel allows array arithmetic (e.g. sum(a1:a5* b1:b5) where the contents of the cells are the results of formulae.  Numbers only allows constants in the array cells. Right?  Any work-arounds?

    Excel allows array arithmetic (e.g. sum{(a1:a5* b1:b5)} where the contents of the cells are the results of formulae.  Numbers only allows constants in the array cells. Right?  Any work-arounds?

    CJPerry wrote:
    Any work-arounds?
    There is a very simple one : use libreOffice.
    Yvan KOENIG (VALLAURIS, France) dimanche 1 janvier 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : http://public.me.com/koenigyvan
    Please : Search for questions similar to your own before submitting them to the community
    For iWork's applications dedicated to iOS, go to :
    https://discussions.apple.com/community/app_store/iwork_for_ios

  • Wenn I've made changes on my private home-page and want to see the result, how do I get my Mac to load the new side instead of the "old" one?

    When I've worked on my private home-page and want to controll the results, how do I get my Mac to take the new version instead of the old one? I tried cmd R without any change! Who knows? Nina

    Try clearing the cache - command-option-e in Safari.

  • HT201272 I have numbers and pages on my iPhone but cannot seem to transfer them to the mac I purchased today ? Are they formatted for the iPhone only ? They appear to be downloaded but I cannot find them on the MAC - where should I look ?

    I have numbers and pages on my iPhone but cannot seem to transfer them to the mac I purchased today ? Are they formatted for the iPhone only ? They appear to be downloaded but I cannot find them on the MAC - where should I look ?

    Welcome to the Apple community.
    The apps you have purchased for your mobile device will not work on a computer. You will need to download the appropriate versions on your Mac from the Mac apps store.

  • Save query results in pipe delimited format

    I am running a query in SQL Developer. Can you please tell me how to save and/or export the results in pipe delimited format? Thanks....

    You just need to right click in the results grid, then chose export and complete the following wizard.
    For pipe delimited files the file format should be delimited and then you will need to change the "delimiter" to a pipe.

  • Execute a VO '4' times and show the result in single table at once.

    Hi,
    I want to execute single a VO query multiple times with different parameters and show the results together in a Table at once
    In Detail
    I have a table to which is associated with a VO.
    The VO contains SQL whose WhereClauseParameters need to be dynamically binded.say headerId and lineId
    Select ... from ....where headerId = :1 AND lineId = :2
    I have to pass these 4 values and show all the results in a single table
    headerId lineid
    H1 ............... L1
    H1 ............... L2
    H2 ............... L1
    H2 ............... L2
    I understand that i need to bind parameters dynamically and exceute the VO.
    As i have 4 different set of parameters, the view object will be executed 4 times.
    I want to show all the results together in a single table.
    How can I do it.
    thanks,
    Gowtam

    Hi Mani,
    Thanks a lot for the patience and detailed solution.I will try it out and tell you the status.
    Meanwhile, I have 2 questions on this solution(just curious)
    I will give you the snapshot of the table
    Table - ModelInfo
    Model......Tube..... Float....Size......Col5.....Col6.......Col7.......
    M1............T1.......... F1. .....1..........C15......C16.....C17.....
    M1............T1...........F1.......2..........C25......C26.....C27.....
    M1............T2......... .F2.......1..........C35......C36.....C37.....
    M1............T2...........F2.......2..........C45......C46.....C47.....
    M2............T1.......... F1. .....1..........
    M2.............T1..........F1.....2.........Cn5.......Cn6........Cn7
    .<continues...>
    .<till>
    .Mn............Tn..........Fn.......n........Cxy.......Cpq.......Crs....
    Question 1:
    if you notice this data,
    The Columns 5 to 7 are dependent on Combination of Model,Tube,Float and Size.
    Hence will this query work properly(without mixing up data from other Pk combination) and will it be efficient?(I Know this is a stupid qst, still double checking..As your solution assumes that each row is unique for Model only..which is not true)
    Select ...From....Where
    Model in(M1,M2,..Mn) AND Tube in(T1,T2..Tn) AND Float in(F1,F2,....Fn) and Size in(1,2...n).
    In short, will C15,C16 and C17 appear only with M1,T1,F1,1..I believe it will.
    Question 2:
    As I told,
    Third party program will return Array of Objects.
    Each object will have a variable called Flow along with
    Model,Tube,Float and Size.
    Flow is not stored in the database(can not be stored due to functional reasons).I want to show this Flow also along with other columns fetched from the DB for all 100+ rows.
    How can I do it?
    I will give u the scenario(with just 2 rows)...please check(Flow is not stored in DB)
    Third Party object : ObjModel
    Model......Tube..... Float....Size......Flow
    M1............T1.......... F1. .....1..........100
    M1............T1...........F2.......2...........200.
    M1............T2.......... F1.......1..........300
    M1............T2...........F2.......2..........400
    My concern is,
    After the VO executes and shows other 6 columns, it should show Flow appropriately.(associated with each object in the array)
    I understand that I need to have a Transient attribute in VO called[b] Flow.But I don't know how to perform the two tasks simultaneously..
    Task1:Your solution on showing table columns
    Task2:Showing Transient data for each object returned from program.
    thanks,
    Gowtam

  • Shouldn't using WITH return the same results as if you'd put the results in a table first?

    First off, here's my version info:
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE 11.1.0.7.0 Production
    TNS for HPUX: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production
    I just reread the documentation again on the subquery factoring clause of SELECT statement, and I didn't see any restrictions that would apply.
    Can someone help me understand why I'm getting different results?  I'd like to be able to use the statement that creates MAT3, but for some reason it doesn't work.  However, when I break it up and store the last TMP subquery in a table (MAT1), I'm able to get the expected results in MAT2.
    Sorry if the example seems a little esoteric.  I was trying to put something together to help illustrate another problem, so it was convenient to use the same statements to illustrate this problem.
    drop table mat1;
    create table mat1 as
    with skus as (
      select level as sku_id
      from dual
      connect by level <= 1000
      tran_dates as (
      select to_date('20130731', 'yyyymmdd') + level as tran_date
      from dual
      connect by level <= 31
      sku_dates as (
      select s.sku_id,
      t.tran_date,
      case when dbms_random.value * 5 < 4
      then 0
      else 1
      end as has_changes,
      round(dbms_random.value * 10000, 2) as unit_cost
      from skus s
      inner join tran_dates t
      on 1 = 1
    select d.sku_id,
      d.tran_date,
      d.unit_cost
      from sku_dates d
      where d.has_changes = 1
    drop table mat2;
    create table mat2 as
    select m.sku_id,
      m.tran_date,
      m.unit_cost,
      min(m.tran_date) over (partition by m.sku_id order by m.tran_date rows between 1 following and 1 following) as next_tran_date
      from mat1 m
    drop table mat3;
    create table mat3 as
    with skus as (
      select level as sku_id
      from dual
      connect by level <= 1000
      tran_dates as (
      select to_date('20130731', 'yyyymmdd') + level as tran_date
      from dual
      connect by level <= 31
      sku_dates as (
      select s.sku_id,
      t.tran_date,
      case when dbms_random.value * 5 < 4
      then 0
      else 1
      end as has_changes,
      round(dbms_random.value * 10000, 2) as unit_cost
      from skus s
      inner join tran_dates t
      on 1 = 1
      tmp as (
      select d.sku_id,
      d.tran_date,
      d.unit_cost
      from sku_dates d
      where d.has_changes = 1
    select m.sku_id,
      m.tran_date,
      m.unit_cost,
      min(m.tran_date) over (partition by m.sku_id order by m.tran_date rows between 1 following and 1 following) as next_tran_date
      from tmp m
    select count(*) from mat2;
    select count(*) from mat3;
      from tmp m
    select count(*) from mat2;
    select count(*) from mat3;
    select count(*) from mat2;
      COUNT(*)
         31000
    Executed in 0.046 seconds
    select count(*) from mat3;
      COUNT(*)
             0
    Executed in 0.031 seconds

    I think there's something else going on.
    I made the change you suggested, with a slight modification to retain the same functionality of flagging ~80% of the rows as not having changes.  I then copied that section of my script - included below - and pasted it into my session twice.  Unfortunately, I got different results each time.  I have had a number of strange problems when using the WITH clause, which is one of the reasons I jumped at posting something here when I encountered it again in this context.
    Can you help me understand why this would happen?
    drop table mat3;
    create table mat3 as
    with skus as (
      select level as sku_id
      from dual
      connect by level <= 1000
      tran_dates as (
      select to_date('20130731', 'yyyymmdd') + level as tran_date
      from dual
      connect by level <= 31
      sku_dates as (
      select s.sku_id,
      t.tran_date,
      case when dbms_random.value(1,100) * 5 < 400
      then 0
      else 1
      end as has_changes,
      round(dbms_random.value * 10000, 2) as unit_cost
      from skus s
      inner join tran_dates t
      on 1 = 1
      tmp as (
      select d.sku_id,
      d.tran_date,
      d.unit_cost
      from sku_dates d
      where d.has_changes = 1
    select m.sku_id,
      m.tran_date,
      m.unit_cost,
      min(m.tran_date) over (partition by m.sku_id order by m.tran_date rows between 1 following and 1 following) as next_tran_date
      from tmp m
    select count(*) from mat2;
    select count(*) from mat3;
    152249 < mattk > drop table mat3;
    Table dropped
    Executed in 0.016 seconds
    152249 < mattk > create table mat3 as
                             2  with skus as (
                             3   select level as sku_id
                             4   from dual
                             5   connect by level <= 1000
                             6   ),
                             7   tran_dates as (
                             8   select to_date('20130731', 'yyyymmdd') + level as tran_date
                             9   from dual
                            10   connect by level <= 31
                            11   ),
                            12   sku_dates as (
                            13   select s.sku_id,
                            14   t.tran_date,
                            15   case when dbms_random.value(1,100) * 5 < 400
                            16   then 0
                            17   else 1
                            18   end as has_changes,
                            19   round(dbms_random.value * 10000, 2) as unit_cost
                            20   from skus s
                            21   inner join tran_dates t
                            22   on 1 = 1
                            23   ),
                            24   tmp as (
                            25   select d.sku_id,
                            26   d.tran_date,
                            27   d.unit_cost
                            28   from sku_dates d
                            29   where d.has_changes = 1
                            30   )
                            31  select m.sku_id,
                            32   m.tran_date,
                            33   m.unit_cost,
                            34   min(m.tran_date) over (partition by m.sku_id order by m.tran_date rows between 1 following and 1 following) as next_tran_date
                            35   from tmp m
                            36  ;
    Table created
    Executed in 0.53 seconds
    152250 < mattk > select count(*) from mat2;
      COUNT(*)
             0
    Executed in 0.047 seconds
    152250 < mattk > select count(*) from mat3;
      COUNT(*)
         31000
    Executed in 0.047 seconds
    152250 < mattk >
    152251 < mattk > drop table mat3;
    Table dropped
    Executed in 0.016 seconds
    152252 < mattk > create table mat3 as
                             2  with skus as (
                             3   select level as sku_id
                             4   from dual
                             5   connect by level <= 1000
                             6   ),
                             7   tran_dates as (
                             8   select to_date('20130731', 'yyyymmdd') + level as tran_date
                             9   from dual
                            10   connect by level <= 31
                            11   ),
                            12   sku_dates as (
                            13   select s.sku_id,
                            14   t.tran_date,
                            15   case when dbms_random.value(1,100) * 5 < 400
                            16   then 0
                            17   else 1
                            18   end as has_changes,
                            19   round(dbms_random.value * 10000, 2) as unit_cost
                            20   from skus s
                            21   inner join tran_dates t
                            22   on 1 = 1
                            23   ),
                            24   tmp as (
                            25   select d.sku_id,
                            26   d.tran_date,
                            27   d.unit_cost
                            28   from sku_dates d
                            29   where d.has_changes = 1
                            30   )
                            31  select m.sku_id,
                            32   m.tran_date,
                            33   m.unit_cost,
                            34   min(m.tran_date) over (partition by m.sku_id order by m.tran_date rows between 1 following and 1 following) as next_tran_date
                            35   from tmp m
                            36  ;
    Table created
    Executed in 0.078 seconds
    152252 < mattk > select count(*) from mat2;
      COUNT(*)
             0
    Executed in 0.031 seconds
    152252 < mattk > select count(*) from mat3;
      COUNT(*)
             0
    Executed in 0.047 seconds

  • Count the results in a Table View

    Hi there,
    I use a API and a table outputForm. And what I want is to show how many entries are in the table. Can somebody tell me the way how this could be done?
    Thanks in Advance
    Marcus

    Hi Marcus,
    do you use RFC ABAP? - If it is so, you can add an export parameter E_number_of_records the you can give the information as output.
    (e.g. for an internal table
    * Using ABAP function
    DESCRIBE TABLE youritab LINES E_number_of_records.
    Best Regards,
    Marcel

  • Can you write vertically in the cell of a table, can you write vertically in the cell of a table

    can you write vertically in the cell of a table, can you write vertical

    If you don't understand that my response was a smiling echo of the stammering question I really can't help you.
    I guess that my 36725 points prove that I may be helpful. It seems that at this time you don't really know what are helpful answers.
    Using spreadsheets since more than twenty years, I know that storing something in an auxiliary object floating upon a cell isn't a serious workaround to the asked question. We may be sure that more or less soon, the object will no longer be were it was supposed to be.
    At this time, if we want to put a vertical text in a cell it's safer to insert a character, a linefeed, a character, a linefeed … which, one more time is echoing the stammering question.
    Yvan KOENIG (VALLAURIS, France) vendredi 29 avril 2011 14:37:08
    Please :
    Search for questions similar to your own before submitting them to the community

  • "Referenced" Table Cells not copying formatting of the source table

    Hi-
    I have one sheet that has a rental inventory table that is quite large.  On another page, I have a "printable" version that has filtering applied to hide certain columns.
    What I did orginally was duplicate the table on the inventory page, cut it, then go to my printable sheet, and paste it.  I now have a duplicate version of the original.  Then I go and select all cells, hit delete and all the contents disappear leaving me with the correct formating.
    At this point I can type in cells and see that the formating is intact (certain cells are in Bold for example).
    I delete the test contents, then reference the first cell (a1) to the source table, then copy the references across that entire printable table.  Once I've done that, all of the contents of the source table now appear in the "printable" table. 
    The problem is, that once I reference the source table, the formatting goes away.  The data shows up correctly:  ie, =Equip List :: B2, but the specific cell formating is gone.
    What am i doing wrong here?
    Thanks
    Matt

    "I delete the test contents, then reference the first cell (a1) to the source table, then copy the references across that entire printable table."
    If you do this by selecting and Copying the first cell containing the formula, that "copy" includes the formatting of the copied cell. If you then Paste, the Paste includes that format setting. You could try Edit > Paste and Match format.
    If that doesn't work, you could try this:
    Enter, then fill the formula as you've done, then set the format of each cell or group of cells to include the attributes you want at that location.
    Regards,
    Barry

  • My timecapsule  does not see the attched HDD, what can be reason, what format of the hdd is needed

    My time capsule does not see my HDD, what format of the hdd is needed

    What format is it?
    The drive should be FAT32 or much better HFS+ which is
    Mac OS Extended (Journaled)
    You should also use GPT (GUID) type partition not MBR as from windows.
    Sometimes the TC will not recognise a drive and you need a powered USB hub.. even though the Disk has its own power.

  • I would like to read a file and display the results in a table containing both strings and numbers?

    Hi,
    I just need a simple way of doing this as at the moment, i read one line at the time containing strings and numbers, whenever i convert this line to an array i loose the strings, if i want to display it, it displays as a group of lines while i would like to display it as a table with column headers. The file is an .xls worksheet.
    Any suggestions?
    Thanks
    Me

    Hi,
    Look at attach vi.
    If this is not what you need please clarify.
    With ActiveX you can Open Excel, interact with it (read and write values to cells...
    But if you can read it this way, I think it's easier.
    Hope this helps,
    Paulo
    Attachments:
    XL.zip ‏24 KB

  • How do I collate the results of multiple tables ...

    into a new row in another table?
    I have 12 monthly expense tables, which each have their columns totaled at their bottom via regular sum formulas. I need to create a row in an additional year end table, which 'gets' all those rows values from the twelve mentioned above.
    Please forgive my spreadsheet ignorance, and thank you. As a producer of 40 years, math just isnt a strong suit.

    I think that the ony way without complicated formulas is to start your equation and click on the cells to add up or average, etc... as you want them. You can select a cell in another table to go inside a function by just clicking on them, and your SUM and AVERAGE functions are able to take multiple ranges of numbers as argument, just separate them with commas.
    If you wnat the harder version, just let us know,
    Jason

  • Hi Experts, the result of a table content in se16n?

    Hi Experts,
    in the ALV output of se16n, some columns are in green, what does this stand for? thanks.
    Kind regards
    Dawson

    Hi Sudhakar,
    Could you please give a detail info for this? becasue I haven't found the path you mentioned, normal display -> utilities -> color legend, where is the path? thanks in advance!
    Kind regards
    Dawson

  • When clicking on a link, the results go to download folder; how do I get the results to display on my monitor?

    When clicking on a link within our Website, the PDF results go to my download folder. To view my PDF results, I am required to go to my Adobe Reader and open that corresponding PDF file. It would be great if I could simply view the PDF on the screen without having to go to Adobe Reader (v. 10.1.4). Thanks for any assistance or guidance on this issue.

    Hello,
    Check your PDF settings at:
    * Tools (or [[Image: New Fx Menu]]) > Options > Applications
    It might be set to "Save", change it to "Preview in Firefox" or any other alternative of your choice.
    Let us know if that solves your issue!

Maybe you are looking for

  • Tolerance Limits at all wbs levels

    Hi In our client process we need Tolerance limits at all  wbs elements for controlling budget process for ex in our process 5 to 10 wbs. wbs XXXX01 tolerance limit =100% wbs XXXX02 tolerance limit =102% wbs XXXX03 tolerance limit =103% Please advise

  • How do I restore "Restart" and uninterrupted program processing on my 3.6 GHz Intel Core i5, running Mac OS 10.6.8?

    Restart gets hung up on a blank screen with a little circle of black spokes that sequentially fade and recover in a spinning wheel effect. Computer turns off after power button is depressed for a few seconds. Computer turns on with a short press of t

  • SAP BW supporting Oracle 10g

    Hello! Does anybody know if SAP BW 3.0b currently supports Oracle 10g? Moreover, does anybody know of any BW version currently supporting this Oracle 10g version? or by when does SAP plans to support it and which BW version(s) they plan? Thank you! R

  • Const not allowed in global variable definitions?

    Can someone tell me why the compiler complains when I do this: const int MY_CONST = 100; char *myStr[MY_CONST]; This is being done outside of a function, as I want myStr to be a global variable. I get an error saying the initializer must be constant.

  • Error Code 61499 after license update (FPGA)

    Hello, I am a fairly experienced FPGA module user.  I have LabVIEW 2009 installed (9.0.0) including the FPGA module on a 32-bit XP system.  Everything was working fine, and I had one particular FPGA project that had been built and run within the last