Oracle Workflow and mapping of input parameters

Hi all
I am trying to create a process in OWB stream which will be able to pass input parameters in each of my correspondence layouts. Each map contains 2 entries, a start time and an end time.
OWB process flow allows it to do this or is there another approach that I take in creating a workflow for these mappings?

I am currently using 11gR 2 (11.2.0.1) and UAS v. 2.6.4.

Thanks in advanced for any help.

Randy

Hi Randy,

Open the workflow process Editor. In the window (menu view-> structure) structure, select the mapping activity and expand it to view its settings. If you select a setting, you can set its value or link to a variable in the Properties window.

In the structure window, you can also add parameters of process flow to the start activity or to define variables of process flow.

Kind regards
Carsten.

Tags: Business Intelligence

Similar Questions

  • Input parameters can be set dynamically?

    Is there a way to fill the UI dynamically entry? Suppose we have a list of fields to which we get input parameters and this list came out a REST command in xml format, can we build a user interface based on that?

    (If not, may we have input parameters that are hidden by default but are made visible from the fields in the xml file)

    Example: In the xml below output, the input field should take a number with the description for the entry in the "number of volumes.

    < field >
    < label > Number of Volumes < / label >
    < name > numberOfVolumes < / name >
    < type > number < / type >
    < initial_value > 1 < / initial_value >
    < lockable > fake < / lockable >
    < min > 1 < / min >
    < omitNone > fake < / omitNone >
    < required > true < / mandatory >
    < select > un < / select >
    < / field >

    'Content' is appropriate, in this case, since it is a POST operation (POST / PUT usually has a body of the request). Check the value of the property 'See the parameter entry' group "Content Input" display in the presentation tab.

    Different parameters (name, size, number, etc.) are not displayed in the interface user because in your case, they are part of the body of the request and the presentation logic in workflow "Call operation REST with dynamic params" only scans the URL parameters, not the body of the URL. In your case, if your REST API was POST/block/volumes / {name} / {size} the current logic could find name and size of the parameters in the URL. Check the "Show parameter input" values and properties "Data binding" parameters of workflow in display group "Input parameters" in the presentation tab.

    So you can extend this workflow, or implement your own version of the workflow, which can retrieve information about parameters not only of URL parameters, but also the body of the request by analyzing the body of the request as XML/JSON document and extract the names of the tags.

    As to what 'Generate new workflow of the operation REMAINS' do-, it generates a workflow that wraps the invocation of an operation given rest. In some cases, it is convenient; for example. you won't need to select REST operation to call every time. Also, you can change the specific workflow (for example. Add logging more, add additional processing, etc.).

  • Input parameters of Report Builder

    I need to create a report using the input parameters and a date range. I called the report in a form that uses the following query and gets his entry to a previous form:

    < cfquery name = "getVisitors" datasource = "zipcodesearch" >
    SELECT company.CompanyID, company.CompanyName, company.phone1, visitors.visitorName, visitors.visitorComp, visitors.createDate, visitors.phone, visitors.email
    The COMPANY INNER JOIN visitors ON company.CompanyID = visitors.companyID
    WHERE visitors.createDate > = #form.startdate # and visitors.createDate < = #form.enddate #.
    ORDER BY company.CompanyName, company.phone1, visitors.createDate
    < / cfquery >

    At this point, I'm not sure if I should use cfreportparam tags or not. The reason is, I'm not using the = operator. I need to specify a range of dates, and I can't find an example ANYWHERE on how to achieve this with the report generator. If I use the cf report param tags, they would present something like that? :

    "< cfreport format ="PDF"template ="visitors.cfr"query =" #getVisitors # "overwrite ="yes">
    < cfreportparam NAME = "startdate" VALUE = "#form.startdate #" >
    < cfreportparam NAME = "enddate" VALUE = "#form.enddate #" >
    < / cfreport >

    Guess my next question is, should I I then specify a query in Report Builder and also use input parameters in report designer environment? the documentation on this type of scenario was virtually nonexistent.

    I'm really stuck on this one, and any help would be appreciated...

    I thought about it and answer my own post in case anyone else runs into the same type of situation...

    The formula of entry consists of two fields: StartDate and EndDate

    The action page consists of a query as follows:


    SELECT company.CompanyID, company.CompanyName, company.phone1, visitors.visitorName, visitors.visitorComp, visitors.createDate, visitors.phone, visitors.email
    The COMPANY INNER JOIN visitors ON company.CompanyID = visitors.companyID
    WHERE visitors.createDate > = #FROMDATE # and visitors.createDate<>
    ORDER BY company.CompanyName, company.phone1, visitors.createDate

    .. .and the code generator of report:

    No record date (s) selected.

    Close the window





    Also, I removed the underlying query in the report generator program and am only using the query on the page of ColdFusion itself. Everything seems to work properly, so I'll put this down as the answer.

  • input parameters for the workflow process in OWB

    Hi all

    My plan is to have the number of years input parameters and the date of the beginning of the year. I have included this map in the process flow. When I execute the process flow its does not have input parameters. Someoen can tell me how this can be achieved.

    Thank you
    Amrit

    Amrit,
    You must add parameters to processflow then [link parameter mapping | http://download.oracle.com/docs/cd/B28359_01/owb.111/b31278/concept_processflows.htm#BIHCIAFB] to corresponding processflow params

    See also [article on parameters processflow | http://blogs.oracle.com/warehousebuilder/2009/01/process_flow_parameters_1.html] the blog of OWB

    Kind regards
    Oleg

  • How to get the value of the predefined list of input parameters of a workflow of another workflow of operation REMAINS (element JSON) output. The pointers or the exisitng resource/code will be of great help

    I have a workflow in which one of the input parameters is a predefined list of element. The predefined list of items must come from another workflow of operation REMAINS to GET type (element JSON) output.

    You just wrap it in an action that has an output which is an array of the same type as input.  Instead of using the plugin of rest, you might be able to use the scriptable Url to take the exit that would work according to the rest interface with which you interact.  Something like this:

    var restOperation = 'yourrestservice.com/resoperation/... '. ' / / whatever your full url is if it requires no authentication

    var myUrl = new URL (restOperation); Create the object URL

    var result = myUrl.getContent (); get the content

    var jsonParsed = JSON.parse (result); assuming that the result is a string that must be converted to an

    treatment jsonParsed and return an array of the appropriate type

    return (myPreDefinedList);

  • How to connect to an Adobe Javascript(Folder Level Script) SAP Web Service and retrieve the response in a table of the Adobe Javascript/AcroJS. Could you please it explain with an example. I have two required input parameters that must be filled.

    How to connect to an Adobe Javascript(Folder Level Script) SAP Web Service and retrieve the response in a table of the Adobe Javascript/AcroJS. Could you please it explain with an example. I have two required input parameters that must be filled.

    I s generic SOAP example/tutorial on my blog: get a serial number in a form using SOAP - KHKonsulting LLC

    The web service uses only a single parameter, but you should be able to adapt the code to two arguments without problems.

  • Duplication of datasets based on input parameters

    I posted this question in the context of the reports of the Oracle, but I think that this is not really a question of relationship Oracle, its more a matter of SQL. I'm on Oracle 9i.

    I need to generate a report based on a maximum of 6 input parameters.
    Three of them belong to the client ID # and 3 belong to the Number of Copies that must be printed on the report.
    Settings on clients: P_CUST_ID1, P_CUST_ID2, P_CUST_ID3
    Parameters for the number of copies: P_N1, P_N2, P_N3

    So, at some point, there could be a maximum of 3 Customer ID passed to the main request. Here is an example of what might look like the input parameters.
    The user has chosen to enter the values for Customer ID 1 and 2 and left blank for 3 client.
    Customer ID1   1001         Number of Copies   2
    Customer ID2   1002         Number of Copies   3
    Customer ID3   ----         Number of Copies   -
    The query that retrieves data looks something like this. The query below is intended to get the client host and addresses of the Office.
    Of course, it is possible that there could be no home or office address or both.
    SELECT    c.cust_no,
              c.saln||c.first_name||' '||c.last_name cust_name,
              a.address_type,
              a.street,
              a.city||' '||a.province||' '||a.postal_code city,
              '('||a.tel_area||') '||a.tel_number telephone
    FROM      customer c, customer_address a
    WHERE     c.cust_no = a.cust_no
    AND       c.cust_no IN (:P_CUST_ID1, :P_CUST_ID2, :P_CUST_ID3);
    Based on my query:
    Customer ID 1001 has 3 addresses (House 2 and 1 office)-> the Total number of records = 3
    Customer ID 1002 a 2 addresses (1 House and 1 office)-> the Total number of records = 2

    The output should be something like that. I put a copy1 copy2, Copy3 label to show
    How the data will appear for readability.
    Cust No Customer Name      Address Type    Address Line 1         Address Line 2        Telephone
    -----------------------------------------------------------------------------------------------------
    Copy1
    1001    Mr Robert Green    H               2100 Picket Fences     Vancouver BC V6E 2C9 (604)726-5555
    1001    Mr Robert Green    H               2300 Happy Valley      Vancouver BC V6G 2N8 (604)308-5555
    1001    Mr Robert Green    O               1200 Davie Street      Vancouver BC V1V 1X1 (604)211-5555
    Copy2
    1001    Mr Robert Green    H               2100 Picket Fences     Vancouver BC V6E 2C9 (604)726-5555
    1001    Mr Robert Green    H               2300 Happy Valley      Vancouver BC V6G 2N8 (604)308-5555
    1001    Mr Robert Green    O               1200 Davie Street      Vancouver BC V1V 1X1 (604)211-5555
     
    Copy1
    1002    Ms Cynthia Brown   H               261 King Street W      Calgary AB M5A 1N1   (416)432-5555
    1002    Ms Cynthia Brown   O               150 Bloor St W         Calgary AB M1W 1S3   (416)321-5555
    Copy2
    1002    Ms Cynthia Brown   H               261 King Street W      Calgary AB M5A 1N1   (416)432-5555
    1002    Ms Cynthia Brown   O               150 Bloor St W         Calgary AB M1W 1S3   (416)321-5555
    Copy3
    1002    Ms Cynthia Brown   H               261 King Street W      Calgary AB M5A 1N1   (416)432-5555
    1002    Ms Cynthia Brown   O               150 Bloor St W         Calgary AB M1W 1S3   (416)321-5555
    Scripts for creating the table and INSERTs
    CREATE TABLE CUSTOMER
      (
        "CUST_NO"    VARCHAR2(4 BYTE) NOT NULL,
        "SALN"       VARCHAR2(4 BYTE),
        "FIRST_NAME" VARCHAR2(20 BYTE),
        "LAST_NAME"  VARCHAR2(20 BYTE),
        CONSTRAINT "CUSTOMER_PK" PRIMARY KEY ("CUST_NO")
      );
     
    Insert into CUSTOMER values ('1001','Mr','Robert','Green');
    Insert into CUSTOMER values ('1002','Ms','Cynthia','Brown');
    Insert into CUSTOMER values ('1003','Dr','David','Taylor');
     
    CREATE TABLE CUSTOMER_ADDRESS
      (
        "CUST_NO"      VARCHAR2(4 BYTE) NOT NULL ENABLE,
        "ADDRESS_TYPE" VARCHAR2(1 BYTE) NOT NULL ENABLE,
        "STREET"       VARCHAR2(20 BYTE),
        "CITY"         VARCHAR2(20 BYTE),
        "PROVINCE"     VARCHAR2(2 BYTE),
        "POSTAL_CODE"  VARCHAR2(10 BYTE),
        "TEL_AREA"     VARCHAR2(3 BYTE),
        "TEL_NUMBER"   VARCHAR2(10 BYTE)
      );
     
    Insert into CUSTOMER_ADDRESS values ('1001','H','2100 Picket Fences','Vancouver','BC','V6E 2C9','604','726-5555');
    Insert into CUSTOMER_ADDRESS values ('1001','H','2300 Happy Valley','Vancouver','BC','V6G 2N8','604','308-5555');
    Insert into CUSTOMER_ADDRESS values ('1001','O','1200 Davie Street','Vancouver','BC','V1V 1X1','604','211-5555');
    Insert into CUSTOMER_ADDRESS values ('1002','H','261 King Street W','Calgary','AB','M5A 1N1','416','432-5555');
    Insert into CUSTOMER_ADDRESS values ('1002','O','150 Bloor St W','Calgary','AB','M1W 1S3','416','321-5555');
    Insert into CUSTOMER_ADDRESS values ('1003','O','435 Richmond Street','Calgary','AB','M5A 4T6','416','453-5555');
    Any help or pointers in this regard would be great.
    I could have adopted a procedure for use of temporary tables , but I really prefer not to go in that direction that there could a few reports which must be generated in this way.

    Thanks and a great weekend.

    Hello

    Roxyrollers wrote:
    I tried to replace the Clause WITH with views online, but have hit a wall. Of course, it is said Table or view does not exist because it cannot find the report_parameters table. Also, I realize that I can't really get the view online at the same level.

    No, report_parameters is used in two places in the solution I posted Saturday. You could code 2 copies of the report_parameters (one inside the cntr, the other to join it), but it should really be. CNTR can rely on two instead, like this:

    SELECT    c.cust_no,
              c.saln ||c.first_name||' '||c.last_name cust_name,
              a.address_type,
              a.street,
              a.city||' '||a.province||' '||a.postal_code city,
              '('||a.tel_area||') '||a.tel_number telephone
    ,       t.n                -- If wanted
    FROM      customer           c
    ,        customer_address   a
    ,       (               -- Begin in-line view report_parameters
                SELECT  :p_cust_no_1 AS cust_no, :p_no_copies_1 AS no_copies  FROM dual  UNION ALL
              SELECT  :p_cust_no_2 AS cust_no, :p_no_copies_2 AS no_copies  FROM dual  UNION ALL
              SELECT  :p_cust_no_3 AS cust_no, :p_no_copies_3 AS no_copies  FROM dual
           )  p               -- End in-line view report_parameters
    ,       (               -- Begin in-linve view cntr
                 SELECT     LEVEL     AS n
                 FROM     dual
                 CONNECT BY     LEVEL     <= GREATEST (:p_no_copies_1, :p_no_copies_2, :p_no_copies_3)
           ) t                    -- End in-line view cntr
    WHERE     c.cust_no           = a.cust_no
    AND       c.cust_no           = p.cust_no
    AND       p.no_copies          >= t.n
    ORDER BY  c.cust_no
    ,       t.n
    ,            a.address_type
    ;
    

    Ensure that: p_no_copies_1,: p_no_copies_2 and: p_no_copies_3 are not NULL; otherwise, GREATEST return the NULL value. Check the settings, you do need lower or equal to 0, or use NVL inside the GREATER expression.

  • a program with input parameters

    Hi all

    I need assistance with my Planner. Can U help me?

    My stored procedure has two input parameters of type date.
    For example
    create package my_pck is
    Start
    Create procedure my_proc (begin_dt date, end_dt date) is
    Start
    null;
    end;
    end;

    now I tried to do a job with a program and a schedule like this:

    () DBMS_SCHEDULER.create_program
    program name = > "STORED_PROCEDURE_PROG"
    program_type = > 'procedure_stockee ',.
    program_action = > 'my_pck.my_proc ',.
    number_of_arguments = > 2,
    activated = > FALSE,
    Comments = > ' om program kwartaaloverzichten you h en die you Mélisande mbv een PL/SQL block. ");

    () dbms_scheduler.define_program_argument
    program name = > "STORED_PROCEDURE_PROG"
    argument_position = > 1,
    argument_type = > 'DATE');

    () dbms_scheduler.define_program_argument
    program name = > "PROCEDURE_PROG"
    argument_position = > 2,
    argument_type = > 'DATE');

    dbms_scheduler. Enable(STORED_PROCEDURE_PROG');

    () DBMS_SCHEDULER.create_schedule
    schedule_name = > "MAAND_KWARTAAL_SCHEDULE"
    repeat_interval = > ' FREQ = YEAR; BYMONTH = 1, 4, 7, 10; ") ;

    () DBMS_SCHEDULER.create_job
    job_name = > 'my_JOB. "
    program name = > "my_pck.my_proc"
    schedule_name = > "MAAND_KWARTAAL_SCHEDULE"
    activated = > FALSE,
    Comments = > ' om kwartaaloverzichten job you h en die you melisande. ');

    dbms_scheduler.set_job_argument_value ('my_pck.my_proc', 1, "trunc (add_months (sysdate,-4), 'MM')");

    dbms_scheduler.set_job_argument_value ('my_pck.my_proc', 2, ' trunc(sysdate, 'MM')-1' ");

    dbms_scheduler. Enable ('my_pck.my_proc');

    Then, I get this error:
    PLS-00103: encountered the symbol "MM" when expecting one of the following values:...

    When I tried this: "trunc (add_months (sysdate,-4), 'MM')"

    I get this error:
    PLS-00103: encountered the symbol "TRUNCATES" when expecting one of the following values:...

    I can't do it.

    My specs:
    OS: windows xp
    Database: Oracle 10 G XE

    The error has nothing to do with the Oracle Scheduler. This is how you should cite the quoted strings:

    SQL> SELECT 'trunc(add_months(sysdate, -4), ''MM'')' FROM DUAL;
    'TRUNC(ADD_MONTHS(SYSDATE,-4),''MM''
    ------------------------------------
    trunc(add_months(sysdate, -4), 'MM')
    
  • problem with pipe separated from the input parameters to call

    Hi all

    I have a requirment as...

    I have a Sp 10 which have 3 SETTINGS and 3 settings as shown below...


    PROCEDURE sample_sp1 (p_start_dt IN VARCHAR2,
    p_end_dt IN VARCHAR2,
    p_shift IN varchar2,
    p_out1 OUT t_bpd_nm, - array type
    p_out2 OUT t_target, - array type
    p_out3 to t_drr); -type of array



    PROCEDURE sample_sp2 (p_start_dt IN VARCHAR2,
    p_end_dt IN VARCHAR2,
    p_shift IN varchar2,
    p_out1 OUT t_bpd_nm, - array type
    p_out2 OUT t_target, - array type
    p_out3 to t_drr); -type of array



    .........


    ..........


    PROCEDURE sample_sp10 (p_start_dt IN VARCHAR2,
    p_end_dt IN VARCHAR2,
    p_shift IN varchar2,
    p_out1 OUT t_bpd_nm, - array type
    p_out2 OUT t_target, - array type
    p_out3 to t_drr); -type of array






    Now, I have to create a new SP. This SP, I have to call one of the top 10 SP and have to come back as a REF CURSOR.


    the entries to the new MS are 3 as... (shown below).


    create or replace new_sp (p_report_name IN varchar2,
    p_report_inputs IN varchar2,
    p_report_as_ref to ref_cur_type) is


    ..............

    where p_report_name is a name of sp
    p_report_inputs is the input to SP parameters with "|" separated pipes (ex: ' 23/04/2010 | 20/05/2010 | 2 ')
    p_report_as_ref is setting to return as an OUT refcursor.


    I'm unable to manage the setting shild (with tickets). How to separate input parameters and how can I call existing SP
    with these settings?


    friends... can someone help me please...


    Thanks in advance...

    What of it?

    with t as
    (select replace('500 Oracle Parkway| Redwood Shores| CA','|',',') str from dual)
    SELECT
      replace(REGEXP_SUBSTR(str,'[^,]+,'),',') first,
      replace(REGEXP_SUBSTR(str,',[^,]+',1,1),',') second,
      replace(REGEXP_SUBSTR(str,',[^,]+',1,2),',') third
      FROM t;
    
    ----
    500 Oracle Parkway      Redwood Shores      CA
    
  • What Oracle Workflow required to run hourly OWB?

    Hello

    I want to build and deploy a calendar in OWB 10 g 2 to automatically run my process OWB flow every week. I would like to know

    (1) the question of if I need to install Oracle workflow also in order to run the process flow according to the schedule created?
    (2) otherwise, how does the OWB Scheduler?
    (3) in addition, if the regular flow process stops due to an error, how I take the run from the endpoint after correcting the error?

    Thank you

    Amit

    Hi Amit,

    (1) the question of if I need to install Oracle workflow also in order to run the process flow according to the schedule created?

    Of course, you need Oracle workflow for execution of processflow. OWF is a processflow engine and scheduler is a tool to indicate when start processflow/mapping.

    (2) otherwise, how does the OWB Scheduler?

    It depends on the target database version. For the database from 10 gR 1 OWB uses Scheduler (DBMS_SCHEDULER of PL/SQL package) of the database.

    (3) in addition, if the regular flow process stops due to an error, how I take the run from the endpoint after correcting the error?

    There is no standard feature of OWB to resume processflows failed. But there are several building method processflow providing resume functionality.
    For example look at this discussion

    Conduct of operations and process flows
    What are the best approaches to mapping restart in OWB?

    Kind regards
    Oleg

  • ORACLE WORKFLOW - HIDE ACTION HISTORICAL REGION

    Hello

    I have a requirement of the company, that I've created a workflow custom via Oracle Workflow Builder.

    I want to hide action historical region.

    I go through the Oracle Doc:

    https://docs.Oracle.com/CD/B14099_19/integrate.1012/b12161/defcom35.htm

    To remove the history of the action for a notification, set the attribute #HISTORY with a null value.


    I did this step. But historical Action area is still there.


    Kindly help me on this issue.


    Kind regards

    Waqas

    Hide this region by setting an empty attribute to message #HISTORY and adding & #HISTORY in the body of the message:

    Option "force" download the workflow to DB and repeat the test."

    Please close the thread by marking as replied with correct/good, if its response.

    Kind regards

    Ajith

  • Hi I am new to Oracle forms and reports I want to know the differences between the Enter query mode and Normal mode?

    Hi I am new to Oracle forms and reports I want to know the differences between the Enter query mode and Normal mode?

    Welcome to Oracle Forms!  Out of curiosity, what do you mean by 'new '?  You are a student or new to an organization that uses Oracle Forms?  Or just play with Oracle Forms to learn something new?

    Let me start by saying that many of your questions designtime can answer by searching in the help of the constructor of the form library.  It's accessible, like most of the other products in the Builder menu > help.

    Regarding your question, ENTER QUERY mode, as the term implies, is when it is in a State where it is accept input for the execution of a query.  When in this mode, there are various restrictions.  Yet once, it will find more details in the Builder Help.  In this case, search help for these two subjects, "SYSTEM." MODE'and "built-ins comments that are not allowed in the input query Mode".  There are many other pages that contain information about the ENTER_QUERY method, but these two should help you get started.

    Normal mode, as its name implies, is when it is in a State of 'normal '.  Basically to do nothing in particular, but also not in ENTER QUERY mode.  In this State, you can move the shape, INSERT, UPDATE, DELETE, documents, etc..

    You will find additional information, as well as a lot of documentation on the product page of forms of OTN:

    http://www.Oracle.com/technetwork/developer-tools/forms

  • Oracle workflow

    Hi experts,
    I am a fresher dba, I studied the components of the oracle memory architecture which includes Sessions, SGA, PGA, process, data files and their characteristics. But I want to know how the workflow goes in oracle. for ex: If the sql statements are issued, that happens to start at the end, etc, I googled ve, but I didn't have the document you are looking for (don't know how google it). So can someone refer me some docs describing the oracle workflow in different cases?

    Published by: 1001518 on May 6, 2013 02:24

    Hello

    Here are some links that may be useful.

    http://www.DBA-Oracle.com/t_sql_exeution_steps.htm
    http://www.oraclebin.com/2012/12/SQL-query-execution-steps-in-Oracle.html

  • Difference between Oracle user and security

    Hi all

    Can someone give me the difference between--> Oracle--> user and security-> system oracle apps R12 resp. administrator user.


    Thank you
    Mahesh.

    Published by: 991854 on March 12, 2013 01:49

    Can someone give me the difference between--> Oracle--> user and security-> oracle apps R12 resp. system administrator user.

    Security > Oracle > register:

    Use this window to register a username with Oracle E-Business Suite ORACLE. An ORACLE user name grants privileges to access the ORACLE database
    http://docs.Oracle.com/CD/E18727_01/doc.121/e12893/T174296T174305.htm

    Security > Oracle > DataSet:

    A data group defines the mapping between the products Oracle E-Business Suite and ORACLE database ID. A data group determines which accounts of liability forms, concurrent programs and reports Oracle database to connect to. see: Definition of data groups, the Oracle eBusiness Suite system administrator Guide - Configuration.
    http://docs.Oracle.com/CD/E18727_01/doc.121/e12843/T156458T156461.htm

    Security > user > define:

    This window allows to set user Oracle E-Business Suite. This user is an authorized user of Oracle E-Business Suite and is identified by a user name.
    http://docs.Oracle.com/CD/E18727_01/doc.121/e12843/T156458T156461.htm

    Thank you
    Hussein

  • Date range per week based on input parameters

    Afternoon people - I need to produce a report that will appear in coming weeks.

    There are two input parameters: P_FROM_DATE and P_TO_DATE

    I need to find the beaches of dates in weeks starting THURSDAY and ending WEDNESDAY. For example, if my P_FROM_DATE is August 1, 2012 and P_TO_DATE 11-SEP-2012, I need to show the weeks following this way:
    02-AUG-2012 - 08-AUG-2012
    09-AUG-2012 - 15-AUG-2012
    16-AUG-2012 - 22-AUG-2012
    23-AUG-2012 - 29-AUG-2012
    30-AUG-2012 - 05-SEP-2012
    06-SEP-2012 - 12-SEP-2012
    So, the idea is to begin the first THURSDAY after the P_FROM_DATE and at the end the Wednesday preceding the P_END_DATE...

    Thank you!

    Hello

    Here's one way:

    WITH     params          AS
    (
         SELECT  DATE '2012-08-01'     AS p_from_date
         ,     DATE '2012-09-19'     AS p_to_date
         FROM     dual
    )
    ,     end_points     AS
    (
         SELECT     TRUNC ( p_from_date + 4
                    , 'IW'
                    ) + 3          AS first_thursday
         ,     TRUNC ( p_to_date + 4
                    , 'IW'
                    ) - 5          AS last_wednesday
         FROM    params
    )
    SELECT     first_thursday + (7 * (LEVEL - 1))     AS week_start_date
    ,     first_thursday + (7 * LEVEL) - 1     AS week_end_date
    FROM     end_points
    CONNECT BY     LEVEL     <= ( last_wednesday
                      + 1
                      - first_thursday
                      ) / 7
    ;
    

    TRUNC (dt) is the beginning of the ISO week containing DATE dt.
    The 'magic number' 4 is used because the ISO week starts on Monday, 4 days later your week begins, so

    TRUNC ( dt + 4
          , 'IW'
          )
    

    is set for Monday in the same week from Thursday to Wednesday as dt.

Maybe you are looking for

  • can notdownload new version

    I tried to download the new version and the computer asks me to save only instead of run, it

  • How recover my S50-B-11J Satellite?

    Hi members,When I start to partition my hard drive into 3 parts, he was hanged. When I restart it, it says that the windows\system32\winload.efi file has been damaged (error 0xc0000225) .after that I can't access recovery partition when I press f12 a

  • A formula allows the last number in a column?

    Is it possible to have a work formula with the last number in a column or line automatically? For example: Col Col B Jan                    20 21 Feb Mar                    18 Apr                    16 May Jun Jul I would like to be able to have a us

  • Time real 8.6 and PDM

    Hi all Using a CRIO-9012 with time real Labview 8.6 and labview 8.6 and now that TDMS is supported and I am wanting to use it on my cRIO. Be a problem if... in addition to open or close tdms files still do not work on my CRIO even if time real 8.6 is

  • Portable printer HP Officejet 6700: 6700 Premium printer

    This printer is the worst I've ever bought in my life. I stronlgy recommend buying shit of Hewlett-Packard products. I should have known that it was made in China junk. It feeds ink at a ridiculous rate, even if I do not use any. HP sucks big and I'l