Send the result of a query by email

Hi,
I want to execute a query in a procedure and send the result in an email using the utl_smtp package. I have send a one line messages based on the result received based on a query. But I'm not sure how to send the entire result of the query as a message body. Any help is appreciated. Thanks,

Doesn't it depend on what you want to send, do you want the results as just text in the e-mail or an attachment? Do you want csv, xls, xml? Once we know what you want to send we can probably give you some guidance on how you might best create the result you want. If you're already sending an e-mail you can easily add an attachment to the e-mail which would probably be your best bet as you don't know the size of the result set (?). I reckon this will be more of an issue around how you turn your results into a format that you can send rather than how you send it.
Richard

Similar Messages

  • Adding  prompts dynamically and then send the results to users via email

    Hi,
    We have to schedule the reports for auto delivery to users at a specific time period. Please, tell me the mechanism to schedule them and how to assign prompt values to them. Currently, the reports are run by users by selecting prompts from the dashboard. If we schedule them, we will have to add some of these prompts dynamically and then send the results to users via email.
    Thanks in advance!

    Hi,
    I haven't tested it myself...but may be the following steps can help you.
    Fill some session variables depending on the the name of the user who logs in (this can be done easily be creating different session variables and put some executing order in it)
    Then you use these session variables as default values for your prompts. So the report will be executed making use of this default values.
    And by scheduling your ibot..you can send it by mail.
    I don't know if it's this what you're looking for...probably you have to base your prompt values depending on the users that are selected in your ibot?
    Hope it can help y ou in some way or another...
    KR,
    A

  • Ability to send the results of a report query to a table in the database

    Hi Guys
    Is it possible to send the results of a report query to a table in the database ?
    Thanks

    Yes.
    For this purpose, you can use :
    * the delivers advanced option
    http://gerardnico.com/wiki/dat/obiee/bi_scheduler/advanced_publication_delivers
    * the SOA API
    http://gerardnico.com/wiki/dat/obiee/obiee_soap_eclipse
    This two solutions need some development skills.

  • How do you use BOBJ SDK to retrieve the results of a query in XML

    I am trying to programatically get the results of a query given the query id
    My old code used BusinessObjects Enterprise Web Services API to  Retrieve a document's contents
    DocumentInformation biDocInfo;
    RetrieveData retBOData = RetrieveData.Factory.newInstance();
    Action[] actions = new Action[1];
    retBOData.setRetrieveView(xmlView);
    biDocInfo = rEngine.getDocumentInformation(queryId, null, actions, null, retBOData);
    (XMLView) biDocInfo.getView();
    Is there an equivalent way to retrieve the results of the query using SAP BusinessObjects BI 3.x Developer SDK Library ?
    Thanks for any information

    Hello.
    Are you wanting to use the BusinessObjects Enterprise SDK along with the Report Engine SDK as opposed to using the Web Services SDK that you were using previously?
    Also, what part of a webi document are you trying to get the XML format of?
    - Whole document
    - Single report within a document
    - Report page of a report
    - Report part within a report
    - All data providers
    - Single data provider
    If you are trying to use Business Objects Enterprise along with the Report Engine SDK, there are numerous samples for the various parts of the webi document that I mentioned above available at the following link:
    http://wiki.sdn.sap.com/wiki/display/BOBJ/JavaReportEngineSDKSamples
    I hope that this information helps.
    Regards.
    - Robert

  • How to execute a procedure depending on the result of a query?

    Hello, I'm new in ODI.
    I want to execute a procedure depending on the result of a query Oracle table.
    We have a Oracle Table whit a column that contains two possibles values.
    I want read the table, row by row, and depending on this value, execute a Procedure or execute another.
    How can i do?

    what you need to do is
    1. create a variable which "new_var2" which has the count of the number of rows you want to process. must be data type numeric.
    2. copy "new_var2" to the package screen.
    3. duplicate the "new_var2" on the package screen and evaluate the variable and test for "> 0" zero, call it "new_var2_E"
    3. create a new odi variable "new_var1" with a refresh of "select field1 fom (select field1,rownum as rownumber from tablex) where rownumber = #new_var2" in the relevant schema and technology.
    4. copy "new_var1" into your package (some where in the flow)
    5. right click the "new_var1" variable in you package screen and you should get the option duplicate step (click on that)
    6. select the the duplicate "new_var1" on the package screen and correct the the name to something meaning full to you "new_var1_E", also change the "type" to "evaluate variable" then you should see a "value" box. enter one of the values you want to test in the box (remember do not put in quotes ' )
    7. now back on the package screen join the "new_var1" to the "new_var1_E" with an OK line
    8 you now join "new_var2" to "new_var2_E" with OK
    9 you join "new_var2_E" to "new_var1"
    10. you then join the "new_var1_E" with an OK or a KO line to the relevant procedure.
    12. you need to duplicate "new_var2" in the package screen one more time this time and call it "new_var2_D" set the type to evaluate and then select the increment of -1
    13. the relevant procedure to "new_var2_D" with an OK
    14. join the "new_var2_D" to the "new_var2_E" with an OK
    15. this should close off the loop now the exit point is "new_var2_E" with a KO line to the next part of your process....
    Basically you should end up with a loop on new_var2 decementing, and it is used to get a specific next record row from your table.
    Hope this helps, sorry it is a little long winded..
    Edited by: DavidGD on Feb 8, 2009 3:29 PM

  • Sending the result of report to printer

    hi friends,
    i written code for my report  and actually my requirement is to send the result of this report  directly to the printer  without displaying the list.
    could u plz guide me how to go for this task.
    regards,
    malli.

    Check this ... yo will find an answer as this is a similar question thread
    Printing report directly from printer;
    Regards,
    Santosh

  • How do I scan a photo to a file and then send the file as an attachment via email.

    How do I scan a photo to a file and then send the file as an attachment  via email.

    All of this depends largely on what printer /software you have, which Email client you use and to some extent which OS you are running.
    Most HP printers have HP Solution Center which is used to set up scanning,choosing where to save,etc. Once a file/photo is scanned and saved to the folder, open the folder.Select the file and at the top of the window should be the option to 'Email'.
    ******Clicking the Thumbs-Up button is a way to say -Thanks!.******
    **Click Accept as Solution on a Reply that solves your issue to help others**

  • Using the results of one Query in a workbook as a filter in another query

    Hello!
    I'd like to have one workbook which my users can execute and the result from one Query (e,g, Customer Account Number) will then be used as a filter in a second query (which would be from a different cube).
    Can this be done?
    Cheers.

    Hi,
    As far as I understand your requirement, you want to pass the result of one query to another query as a filter.
    Well you can do this, by Using Replacement Path Variable.
    For e.g. you want to pass Values of Custmomer Account Number to another query. In the second query, create one variable on Customer Account Number with type Replacment Path. Here it will ask you to enter the name of the query from which you would like to take the values of Customer Account Number.
    When you will run the second query , it will execute the first query from which you want to read the customer accoutn number in the back-end. And it willl display the output the second query as per the valeus of customer account number.
    This will help.
    - Jaimin

  • I need return the result of a query on a stored procedure

    I need return the result of a query on a stored procedure, I mean when I execute a stored procedure it returns a result set as a select query.
    Best regards...

    If you want some pl/sql code that can be used in a query as it were a table you may be interested in table functions:
    SQL> create or replace type
      2  t_emp is object (
      3  name            varchar2(30),
      4  hire_date date,
      5  salary       number);
      6  /
    Tipo creato.
    SQL> create or replace type
      2  t_emptab is table of t_emp;
      3  /
    Tipo creato.
    SQL> create or replace function tab_fun(p_dept in number)
      2  return t_emptab is
      3  e t_emptab;
      4  begin
      5    select t_emp(ename,hiredate,sal)
      6      bulk collect into e
      7      from emp
      8     where deptno=p_dept;
      9
    10    return dip;
    11  end;
    12  /
    Funzione creata.
    SQL> select *
      2  from table(tab_fun(20));
    NAME                           HIRE_DATE  SALARY
    SMITH                          17-DIC-80        800
    JONES                          02-APR-81       2975
    SCOTT                          09-DIC-82       3000
    ADAMS                          12-GEN-83       1100
    FORD                           03-DIC-81       3000A procedure cannot be used in a select statement.
    Max
    http://oracleitalia.wordpress.com

  • Extracting the result of a query into a internal table

    Hi,
    Does anyone knows or have an idea how to extract the result of a query into a internal table, is there a function module or BAPI?
    Thanks in advance,
    CK

    So then normally I would use a statment like:
    IFunctionTemplate ftemplate = repository.getFunctionTemplate("<b>BAPI_SALESORDER_GETLIST</b>");
    to call a particluar function, but I tried using
    IFunctionTemplate ftemplate = repository.getFunctionTemplate("<b>BAPI_MDDATAPROVIDERBW_GETCATALOGS</b>");
    and it did not seem to work. I also tried -
    IFunctionTemplate ftemplate = repository.getFunctionTemplate("<b>MDDataProviderBW.GetCatalogs</b>");
    How do I format the function?
    Thanks
    Paul

  • Getting the actual size of the result of a query

    Hi,
    I would like to ask if someone knows on how to get an estimate size of the result of a query on a table. To make it more specific, here is an example.
    Let us say I have this table called EMP and it has a column called DATE. I have issued a query like this:
    select * from EMP where DATE < to_date('01-AUG-08');
    I want to get the actual size of the result of the query in bytes or MB. How would i achieve this without creating another table and transferring the data on it.

    You can use SQL*Plus Autotrace to have the data size sent between client and database session:
    SQL> set autotrace traceonly statistics;
    SQL> select * from employees where hire_date < to_date('01/08/08');
    107 rows selected.
    Statistics
            430  recursive calls
              0  db block gets
            123  consistent gets
             11  physical reads
              0  redo size
           9405  bytes sent via SQL*Net to client
            457  bytes received via SQL*Net from client
              9  SQL*Net roundtrips to/from client
              3  sorts (memory)
              0  sorts (disk)
            107  rows processed
    SQL>Edited by: P. Forstmann on 25 janv. 2011 18:55

  • How to show only the result of a query

    Hi experts,
    i need to show only the result of a query (hiding all the rows)
    according to mathematical functions like sum, average, count ets. i need the result to be shown widhwise the query (Horizontal)
    thanks a lot
    Nir

    Hi
    I did get exactly.....but if i m right then you can do this by selecting the keyfigure goto the calculation tab select calculate result as sum or whatever you want to use.
    Regards
    Lalit k Tyagi

  • Display the result of a query in descending order.

    Hello Experts,
    How can I display the result of a query in descending order?
    Thanks much in anticipation.
    Regards.

    Hi Kumar,
    If you want to display char in descending order, in the query designer set the sorting setting as desceing for that particular characteristics, or if you want to see the KF in descending order, create a condition on that KF and set as TOP N and set N as 999999, that would display your KF in descending order.
    - Danny.

  • My privacy questions are wrong and the email it wants to send the answers too is not my email how can I change that

    How can I change my privacy questions if the email it sends the answers too is not my email?

    Call AppleCare and talk to someone in account security. Sounds like someone has managed to hijack your account.

  • How to Send the result of a report to a user through email.

    Hi,
    We have a report. It creates quotation. It automatically sends the report to the printer.
    in nace transction - for the particular quotation type - the output types are defined. The output types for printer, Fax, External Send and Edi is defined.For printer, the processing routine is zprogram.
    I want to send this report to the user through email. What i have to do? Whether i have to modify the zprogram or i have to define seperately output types for email also, without modifying the program?
    Pl try to give me replies as early as possible.
    Thanks
    Mallik.

    Hi,
    Check this link.
    function to send e-mail
    Reward points if useful.
    Cheers,
    Swamy Kunche

Maybe you are looking for

  • Firewire device not showing up in finder, even though connected

    I have a device (Tascam hd-p2) connected to my firewire 800 port on my macbook pro.  It has information on a cf card that I would like to access.   The device shows up in the bus on system profiler, but it doesn't show up in my sidebar in finder, on

  • Steps to create a custom UI control in mobile 7.1 ?

    Hello Arvind , What exactly you mean by signature pad here? I understood that you want many custom controls in your view. For this , to start off ,  you need to create one custom control dc first. And then you can re use the same for any number of cu

  • Brush Shape Dynamics CS5

    Is there a way to turn of shape dynamics in the brush dialog in CS5? I used to be able to uncheck if in previous version of CS, and it would stay unchecked. Now it will not stay unchecked.

  • Automate import applications(app-v) in sccm 2012

    Hi, I wonder it there are some ready made tools to import applications, specifically app-v in SCCM 2012. F.e. an excel-sheet/csv that is filled in with predefined fields and then can import applications. Pls advise. J. Jan Hoedt

  • Getting rid of audio buzz

    I know everyone at one time or another has had a little buzz from a soundboard that they have recorded from is there any easy filter without it sounding like your under water to use to get rid of this, I have tried Soundtrack pro but it there any fil