Need to Generate sequence of dates

Hi,
Given a Date as sysdate and any number like 10 and we need to generate a sequence of days with an interval on one month.
we can consider sysdate '25-may-2012' and 10 as inputs to the function and the output need to be something like this.
else a single select statement shall also work
'25-may-2012'
'25-jun-2012'
'25-jul-2012'
'25-aug-2012'
'25-sep-2012'
'25-oct-2012'
'25-nov-2012'
'25-dec-2012'
'25-jan-2013'
'25-feb-2013'Please advise.
Regards

Just a hint:
iteration_number starts with 0
select dt,iter
from dual
model
dimension by (1 as x)
measures (to_date('25-may-2012', 'dd-mon-yyyy', 'NLS_DATE_LANGUAGE = ENGLISH') as dt, 0 iter)
rules iterate (10)
dt[iteration_number] = add_months(dt[1], iteration_number - 1)
,iter[iteration_number]=iteration_number
DT     ITER
05/25/2012     1
04/25/2012     0
06/25/2012     2
07/25/2012     3
08/25/2012     4
09/25/2012     5
10/25/2012     6
11/25/2012     7
12/25/2012     8
01/25/2013     9no need for -1 therefor ;-)

Similar Messages

  • Reg : I need to generate a file name sequence number.

    Dear All,
    I need to generate file name in sequence number. Now i have generated file in specific folder. In that folder file i am reading one by one and generating. Problem is folder file some names having special characte those names are not generating while reading 'Cat' Caommand in shell script. Instad of that i want to generate files in 1.ldt,2.ldt to etc..
    Please guide me how to generate in specific folder.
    Thanks in advance.
    Best Regards,
    Velu.

    First, LabVIEW 7 allows you to pass string and path data types directly into the Matlab script node. Otherwise, in LV <= 6.1 you can do the following:
    In LabVIEW, convert the string to an array of U8s using the String to Byte Array function. Then pass the U8 array into the Matlab script node as a Real Vector type. Finally, in Matlab, convert the Real Vector to a string using the char() function. For example:
    stringAsString = char(stringAsRealVector)
    Attached is an image that shows how to do this.
    Good luck,
    -Jim
    Attachments:
    Matlab_Script_Node_String_Input.GIF ‏6 KB

  • Regarding getting data from excel file and need to generate  inbound idoc

    Hi guys,
    Please can u give some example how to get excel file data and need to generate the inbound idoc my questation ? Is it possible to generate inbound idoc with the same logical system ( it seems to be not possible using same logic to generate idoc ) can u suggest me any posssibule way to generate idoc.) if possible give me some example.
    Regardng
    anil
    Edited by: anil kumar on Aug 8, 2008 1:35 PM

    If you want someone to do your work, please have the courtesy to provide payment.
    http://www.rentacoder.com

  • Need Help: Generate Customer Data from Prod Database

    Hi All,
    My company have an Oracle Financial System, with and old version Oracle Application 11.0.3 and Oracle Database 8.0.5. The database name PROD. This system has been use for more than 7 years and in between there were many stuff resigned without handover and therefore many records and supporting steps cannot be trace back. However the system is still keep running and updated daily.
    Recently we have a user request to generate out a list of customer company name, and their related products purchase from the database, this is because they does not have any methods to print out the list from application. Unfortunately, we do not know which tables or index is actualy storing the name of the customer and products. We have the list of below users accounts that able to log in to the database.
    PA/PA
    APPLSYS/APPS
    APPS/APPS
    ALR/ALR
    AX/AX
    AK/AK
    GL/GLRG/RG
    FA/FAHR/HR
    SSP/SSP
    HXT/HXT
    OTA/OTA
    RLA/RLA
    VEH/VEH
    QA/QA
    ICX/ICX
    AZ/AZ
    AP/AP
    AR/AR
    OE/OE
    OSM/OSM
    NSM/NSM2020
    CN/CN
    MFG/MFG
    INV/INV
    PO/PO
    BOM/BOM
    ENG/ENG
    MRP/MRP
    CRP/CRP
    WIP/WIP
    CZ/CZ
    PJM/PJM
    FLM/FLM
    MSC/MSC
    CS/CS
    CE/CE
    EC/EC
    JG/JG
    APPS/APPS
    All the reference documents is no longer exist. I am able to use SQL Plus to generate the list of tables with the command : select table_name from user_tables. Each user accounts will return different kind of table names. But still I cant locate which table that actually storing the name of the customers and products.
    Is that anybody got hands on this case before? Urgent

    We have this table: And need to unload this table data in flat file format.
    Need help with unload SQL file with these two columns:
    AMT_PAID_ORIG, AMT_PAID_ADJ
    SQL> desc flconv.claim_adj_less
    Name Null? Type
    SAK_CLAIM_ADJ_LESS NUMBER(10)
    SAK_CLAIM_ADJ NUMBER(10)
    ADJ_CLAIM_ICN NUMBER(13)
    ORIGINAL_CLAIM_ICN NUMBER(13)
    DATE_PAID_ORIG NUMBER(8)
    DATE_PAID_ADJ NUMBER(8)
    AMT_PAID_ORIG NUMBER(10,2)
    AMT_PAID_ADJ NUMBER(10,2)
    SAK_PROV_LOC NUMBER(9)
    SAK_FUND_CODE NUMBER(9)
    CHECK_SAK NUMBER(9)
    SAK_PUB_HLTH NUMBER(9)

  • Need to generate XML based on Data template

    Hi,
    I'm unable to submit (the second submit) my request using the demo links (XDO 5.6.3 or XDO 5.7) provided in http://bipublisher.us.oracle.com/?tab=samples&header=dataTemplate to generate the XML based on the data template.
    Heard that these links are available for Oracle EBS internal use. I work with EBS-CRM. I need to generate XML based on a data template and use the XML in the template. Data template has two queries for a template.
    Pls help.
    Thanks,
    Impha

    Impha
    Please use the internal mailing list for your questions the forum is meant for external customers. If you do not know the ML name - drop me a mail
    Tim

  • Lookout OPC Client – Asynchronous I/O and Update Rate serious problems (Sequence of data)

    I am using the Lookout OPCClient driver to connect to AB PLCs (EtherNet/IP protocol) and power measurement equipment (Modbus TCP protocol). The OPC server is the NI OPC Servers. The data that are read out from PLCs and PMs are energy meter readings, energy counters, power, voltage, current, frequency, power factor and el. energy quality measurements (THD). That energy meter readings are being stored in SQL database.
    I am experiencing a serious problem regarding the accuracy of the meter readings. Several times per day, randomly, meter readings are losing the time sequence. For example, sequence is: 167, after few seconds 165, 166.  In other words, present value followed by two previous old values. That generates a serious problem in our application that is expecting a naturally rising sequence of counter values.
    Analyzing further, I isolated the problem to the connection between Lookout OPCClient and OPC Server. I made a simple application in Lookout 6.7 (opcproc.lkp, attached) with OPCClient parameters: NIOPCServers, OPC2, Asynchronus I/O, Update rate: 10000, Deadband: 0.0, that is reading just one tag from NI OPC Servers demo application (simdemo.opf).
    By using OPC diagnostic tool from NI OPC Servers I record the sequence of OPC requests and responses.  I found out that OPCClient sends every 2.5 sec “IOPCAsyncIO2::Refresh2()” call that is request for refreshing of all items in one OPC group. Few milliseconds later OPC Sever responds with callback function “IOPCDataCallback:: OnDataChange()(Device Refresh)” that actually refresh the data.
    This periodic sequence is intrinsic to the OPCClient and cannot be disabled or changed (by my knowledge).  This sequence is periodically interrupted by “IOPCDataCallback:: OnDataChange()” caused by update rate parameter of OPCClient (client is subscribed to server for periodic update of changed items).
    In the case of demo application on every 4 refresh callbacks caused by refresh requests (2.5 sec) there is one update subscription callback determined by Update rate (10 sec).
    QUESTION 1:
    What is the purpose of update sequence and update rate when we have every 2.5 sec fresh values?
    PROBLEM
    The problem arises when we have a large number of items in OPC group. In that case the OPC Server starts to queue refresh requests because they cannot be fulfilled in 2.5 sec time because of large number of I/O points that must be scanned. At the same time update subscription callbacks are running at the period determined by Update rate. I observed in my production system that regular update callbacks has higher priority than refresh callbacks from the queue. That causes the loosing of timed sequence of data. After the update callback with fresh data, sometimes follow one or two refresh callbacks from queue with old (invalid) data. By adjusting Update rate parameter (1 hour, 2hours …) I can postpone the collision of data refreshes but I cannot eliminate it. Furthermore, the 2.5 sec automatic refresh are large burden for systems with many I/O points.
    QUESTION 2:
    Is there a way to disable automatic refresh request every 2.5 sec and just use update requests determined by Update rate?
    QUESTION 3:
    Is there a way (or parameter) to change the period of automatic refresh (2.5 sec)?
    This problem is discovered for Lookout 6.5, 6.6 and 6.7 so I could say it is intrinsic to OPCClient. If I use synchronous I/O requests there is not an automatic refresh, but that is not an option for large systems.
    Thanks!
    Alan Vrana
    System engineer
    SCADA Projekt d.o.o.
    Picmanova 2
    10000 ZAGREB
    CROATIA
    T +385 1 6622230
    F +385 1 6683463
    e-mail [email protected]
    Alan Vrana
    SCADA Projekt d.o.o.
    ZAGREB, Croatia
    Attachments:
    opcproc.zip ‏4 KB

    The physical connection from LV to the switch is (I believe) copper crossover to fiber converter into a switch.  Then, fiber from the switch to the end device (relay).  The relay has all of the typical modbus registries and has been verified by inducing signals in to the system and measured/polled in LabVIEW and observed Variable Monitor.  I am working with LV 8.2 and 8.5. 
    An OPC server would only add an additional translation of addressing within the configuration.  The only real draw back would be the network overhead required to do this processing and not being representative of the end design configuration.
    I will reiterated my question in another way:
    I must answer the question to management that relates to data collection, test results and analysis; how often are you polling the client in relation to the outcomes measured?  At this time I can not point at any configuration in the set up and execution that directs the data framing rate.  I only measure the traffic and work with results.  This needs to be clearly identified based on the relay modbus/tcp design capability of supporting an fixed number of client requests per second. 
    For testing purposes, I would like to be able to stress the system to failure and have prove capabilities with measured data.  The present problem is that I have no basis to establish varying polling rates that effect the measured data transmission. 
    This raises another question.  What handles the Variable Monitor data requests and how is this rate determined?
    Thanks for your interest in my efforts.
    Steve

  • Need to Generate a eText File for Payments

    Hi,
    I have a requirement to generate a eText Outbound file using Payment Process profile. I have understand the basic steps and template we need to use to generate the eTEXT output.
    Q1. But here is my question is that the XML tags will be repeated for more than one invoice then the below tags will repeat like this. For this case how to read the two blocks.
    Normal rtf we will use the loop condition but here how to use this in eTEXT file format. Please provide some example.
    Q2. And also if the multiple blocks will contains different data but here I need to print all the data in a single line up to a fixed length then again I go for second line if the fixed length
    reaches the maximum limit.
    <DocumentPayable>
    <DocumentNumber>
    <DocumentInternalIDSegment1>30076</DocumentInternalIDSegment1>
    <DocumentInternalIDSegment2>83026</DocumentInternalIDSegment2>
    </DocumentPayable>
    </DocumentNumber>
    <DocumentPayable>
    <DocumentNumber>
    <DocumentInternalIDSegment1>100100</DocumentInternalIDSegment1>
    <DocumentInternalIDSegment2>123456</DocumentInternalIDSegment2>
    </DocumentPayable>
    </DocumentNumber>

    Hi Prasana,
    Here is the dll compile in CVI. You should be able to use the file import the driver.
    The best thing would be for you to be able to compile the driver in case you want to modify something. You will also need to install the CVI run-time engine:
    CVI Run-time Engine
    With a little work you could compile the driver with MSVC++. You just need to replace some functions. At a glance, this are some of the functions that need to be changed.
    The first thing would be to use the NI-488.2 driver interface for MSVC++. You would only need to replace the header file with the ni488.h file. It would be a good idea to replace the OpenDev a
    nd CloseDev functions with the ibdev and ibonl functions. Make sure you include the object file in your project settings.
    The other function, which might require more work is the Fmt function. This is a CVI specific function to perform string formatting. You could replace with one of the standard library C functions, such as sprintf, to do the formating. Or you could redefine the Fmt using these standard functions.
    Hope this helps.
    DiegoF
    National Instruments.
    Attachments:
    hp8165.dll ‏50 KB

  • Need to generate the excel file with diffrent sheets using utl_file package

    Hi,
    Sorry for previous message in which I had missed the usage of " UTL_FILE " package
    I need to generate the excel file with diffrent sheets . Currently I am generating the data in three diffrent excel files using
    " UTL_File " package and my requirement is to generate this in a single excel file with diffrent sheets.
    Please help on this
    Thanks & Regards,
    Krishna Vyavahare

    Hello 10866107,
    at Re: How to save a query result and export it to, say excell? you can find links to different solutions. At least the packages behind second and fourth link support more than one worksheet.
    Regards
    Marcus

  • Need to generate excel file with different sheets

    Hi,
    I need to generate the excel file with diffrent sheets . Currently I am generating the data in three diffrent excel files
    and my requirement is to generate this in a single excel file with diffrent sheets.
    Please help on this
    Thanks & Regards,
    Krishna Vyavahare

    I'm not able to realize how Oracle will help in the problem. You may probably want to look at some [.net forums|http://www.google.com.sg/search?source=ig&hl=en&rlz=1G1GGLQ_ENUS280&q=.net+forums&btnG=Google+Search&meta=lr%3D] about this.
    Cheers
    Sarma.

  • How to generate sequence of pulse trains with DAQmx?

    I need to generate a sequence of pulse trains with DAQmx (the card I have is a PXI-6229 card). As an example:
    - 10'000 pulses at 20kHz every 5 seconds with an initial offset of 2 seconds (let's say 10 pulse trains in total).
    If I use the CreateVirtualChannel.vi in "CO pulse ticks" mode, I can only specificy offset, high ticks and low ticks, but not that the sequence of pulses should be repeated after some time. 
    Now I thought that I could solve this problem if it were possible to multiply two counter outputs: the first counter would generate the pulses (continuously) whereas the second one would switch between low and high on a slower timescale in order to gate the first counter, thereby providing an initial offset and the "off" phases between the pulse trains.
    Is it somehow possible to multiply two outputs with DAQmx and the card I have? Or is there another solution to the problem?
    Thanks a lot in advance for any hints!

    Hi dlanger,
    what you want to do requires a little bit more work. 
    First look at the example "Gen Dig Pulse Train-Continuous.vi" from the LV example finder.
    This example generates a continuous* pulse train. As you see, you need a sample clock VI for setting the sample mode. 
    * NOTE: Generating a finite pulse train with a M-series card requires 2 counter.
    With a pause trigger (DAQmx trigger property node) you can gate the output of that counter.
    Now you have to generate a gate-signal with the the 2nd counter. That means, only if  Ctr1-out is high Ctr0-out outputs the 20 kHz-signal. 
    Maybe you have to adjust the times in my example a bit. 
    Unfortunately there is just one "small" problem: "let's say 10 pulse trains in total" 
    This is not possible, because a 3rd counter would be necessary (*). 
    As a workaround you can modify the while-loop that both tasks are cleared after 50s. This is not brilliant, but should work fine for you. 
    A more sophisticated way is to perform a correlated DIO. So you can generate custom pattern for multiple outputs. 
    A good example can you find here: 
    Retrigger and Repeat Finite Digital Pulse Train in LabVIEW
    http://decibel.ni.com/content/docs/DOC-8473 
    or here:  
    Generating More Than 2 Pulse Trains Using CompactDAQ
    http://decibel.ni.com/content/docs/DOC-2167 
    Hope this helps.
    With best wishes,
    Ralf N. 
    Attachments:
    Gen Gated Dig Pulse Train-Continuous.vi ‏38 KB

  • EBS-R12 Generate XML (with data) from Embedded Data Definition

    Hi
    I'm new to running XMLP/BIP in EBS.
    I have found the extensive set of data definitions and templates in EBS and they work great out of the box.
    I, however, need to make template modifications.
    To this end, a correctly structured XML data template - containing all the data fields - is needed for loading into the template-builder in Word.
    If for example I take the embedded R12 data definition - XLAJELINESRPT.xml - for Posted Payable Invoices, and load it into the template builder, it provides the structure of the data template and not the structure of the output XML data.
    I have tried several ways to run the Data definition through XMLP using the concurrent manager attempting to intercept the generated XML (with data) but it either completes the process and uses the linked output template - producing the PDF - or other output - or if I remove the (output template altogether) it fails with an error.
    Maybe I'm missing an obvious step, but there has to be a way of taking the very comprehensive Data Definitions embedded in R12 EBS and using them in custom report templates.
    If I've totally missed the point, please give me the steps to follow.
    Many thaks in anticipation.
    Mike MacMurray

    HI Mike,
    You cannot load your Data Template into the MS Word Template Builder plugin, as it cannot be run to generate XML this way.
    You have two options to get the data from an XML Publisher Report run as a concurrent program in EBS.
    1) Using the XML Publisher Administrator responsibility, set an end date for both the Data Defintion and Template Definitions associated with the XLAJELINESRPT report.
    2) Leave the concurrent program, Data Defintions and Template Definitions exactly as they are and run the report. Once the report has completed, select the Concurrent Request, click "Diagnostics" then click "View XML". This will open the XML in a new browser window. You can then right click, View Source and then save this document locally.
    You can then load this XML into the MS Word Template Builder and start building your template.
    I hope this helps.
    Regards,
    Cj

  • Generate sequence nuumber for line items.

    Hi,
    Am using jdeveloper 11.1.1.6.0
    I have generated a form using master detail. po_header as master and po_line as child in po_line i need to generate the sequence number.
    The problem am facing is
    If i generate using create sequence in my DB. Its working fine.
    consider
    I have po_number 1234 for this po_line while i click the add button the sequence number is added. for eg: form 1 to 10 i have the po_line against po_number.
    If am created another po_number 12345 for this while i click the add button the sequence number starts from 11...., But it need to be started from 1 since its a different po.
    Could anyone help me how to acheive this?
    Regards,
    Prasad K T,

    Hi,
    in addition, have a look how you would model the line items in a database schema. Here you would have purchase orders and line items in separate tables that are linked with a foreign key. To uniquely address line items you would have a unique sequence in the line items table. What you are looking for is a combined key (purchase order AND line item ID) to have line items numbered 1 .. 10 (this however, from a database design aspect makes no sense).
    Frank

  • To Generate Payroll posting data to FI in XSD format in a server location

    Hi Experts,
                     I have a requirement where i need to generate the payroll posting data in XSD format. The sender system is using ECC5.0 and receiver system is using ECC6.0 . I thought of using the ALE scenario and i have know idea how to create an XSD file in a ALE IDOC scenario. your help is much appreciated.
    Thanks
    Vishnu.

    Hi Karan,
    I got the error message "Run PP 0000000123 cannot be deleted" when I was trying to delete posted Run number.
    Is it any way to delete those posted Run numbers (payroll posting numbers) in table PCALAC? The data was copied to development server last time.
    Thanks.

  • Need to generate 2 idoc"mapping issue"

    Hi Experts,
    When the Purchase_order_type is coming like HIGH,REGULAR,NEW,BOUNCED. In this case i need to generate 2 idoc, based on HIGH is one and Other than HIGH is one, even though if it's REGULAR,NEW,BOUNCED.
    I can't generate. pl suggest
    rgds
    selvam

    Hi,
    Please make sure you will sort the data in your select query.
    Now, you need to have two idocs in mapping. Click on Duplicate Subtree to have second IDOC. Now lets assume, your first IDOC represents mapping when ORDER TYPE is HIGH and your second IDOC represents mapping when your ORDER TYPE is not equal to HIGH that is NEW, BOUNCED, REGULAR etc.
    I have defined Source and Target data type as follows.
    Source Data Type:
    SDN
       <Row>
          <CQ_NO/>
          <ORDER_TYPE/>
          <LINE_NO/>
       </Row>
    Target Data Type:
    SDNTarget
       <IDOC>
          <Node>
             <CQ_NO/>
             <ORDER_TYPE/>
             <ItemNode>
                <LINENO/>
             </ItemNode>
          </Node>
       </IDOC>
    Mapping for IDOC 1:
    IDOC:
    Order Type -->Fix Values --> remove context
    Fix Values (This should have default u201Cfalseu201D and HIGH = true)
    Concatenate Output of point 1 with CQ_NO (Context of CQ_NO should be at SDN)
    Output of point 3 --> Split by value (value changed) -->collapse context
    Output of point 4 will be first input to u201CStart withu201D function and second input will be constant u201Ctrueu201D
    Output of Point 5 --> create if --> IDOC
    Node:
    Map with constant
    CQ_NO:
    Order Type --> Fix Values --> remove context
    Fix Values (This should have default u201Cfalseu201D and HIGH = true)
    Concatenate Output of point 1 with CQ_NO (Context of CQ_NO should be at SDN)
    Output of point 3 --> Split by value (value changed)
    User Format By example. Pass CQ_NO (Context of CQ_NO should be at Row) as first input and second input should be output of point 4.
    Pass Output of format by example that is point no 5, to collapse context --> Split by value (Each Value) --> CQ_NO
    ORDER_TYPE
    Order Type --> Fix Values --> remove context
    Fix Values (This should have default u201Cfalseu201D and HIGH = true)
    Concatenate Output of point 1 with CQ_NO (Context of CQ_NO should be at SDN)
    Output of point 3 --> Split by value (value changed)
    User Format By example. Pass ORDER_TYPE (Context of CQ_NO should be at Row) as first input and second input should be output of point 4.
    Item Node:
    Order Type --> Fix Values --> remove context
    Fix Values (This should have default u201Cfalseu201D and HIGH = true)
    Concatenate Output of point 1 with CQ_NO (Context of CQ_NO should be at SDN)
    Output of point 3 --> Split by value (value changed)
    Output of point 4 will be first input to u201CStart withu201D function and second input will be constant u201Ctrueu201D
    Output of Point 5 --> create if --> IDOC

  • Need to average real time data

    I have a sensor that sends 1000 samples per second, The signal is very noisey. I would like a Vi that can read these samples from DAQ6009 and average them out (probably take 10 samples then average, then take next 10 and average and so on). I need to graph the averages and also I need to generate an on/off signal through the DAQ based on the results.

    Hello,
    I would advise starting off with the "Cont Acq&Graph Voltage-Int Clk.vi" example which can be found in the example finder under Hardware Input and Output > DAQmx > Analog Measurements > Voltage. Here you can experiment with acquiring your sensor data and graphing it. Once you are successfully acquiring this in the manner which you desire, you can begin to look at the post processing stage and subsequent output signals.
    Kind Regards,
    Paul
    http://www.paulharris.engineering

Maybe you are looking for