Sequence: possible to use sequence in "Data" tab

Hello,
I have one question concerning the "Data" tab in Developer which makes it possible to enter rows like in an excel sheet.
Is it possible to use a sequence in a direct way here? Entering "<sequence_name>".nextval or ""<sequence_name>".currval" just puts the string like "s.nextval" or "s.currval" in a varchar2-field.
Trying to put "s.nextval" in a number-field results in ORA-01722 which means invalid number.
Would be very helpful when there is a way to do this?
Thanks a lot in advance for answers how I can achieve this.
Regards
Firefighter

SQL Developer has a small utility that does what Jim describes. Select Tables, right -click to invoke the context menu, then select Trigger -> Create (PK from SEQUENCE). The context menu title is misleading in a sense that you might want to populate any column and you can, but in general this can be used to populate the PK with the next value in a sequence. (Assuming you have created the sequence)
Sue

Similar Messages

  • Is it possible to use an XML Data Template to create a report in APEX?

    Hi,
    I have created an XML Data Template in BI Publisher passing one parameter and running two queries, then created an RTF Document Template to present the data.
    I can create a nice report in BI Publisher using the two elements. I have used RTF Document Templates to publish reports in APEX but the data comes from a Report region running a single query.
    I would like to run a report based in this kind of XML Data Template, in order to use several children queries related to a parent query. Is it possible to do it in APEX, or you have to use BI Publisher?
    Francisco
    ===========================
    Below is a simple data template definition:
    <dataTemplate name="cotizacion_template" description="Prueba de data template para cotizaciones" dataSourceRef="dbxprts">
         <parameters>
              <parameter name="p_id_cotizacion" dataType="character" defaultValue="1009" include_in_output="true"/>
         </parameters>
         <dataQuery>
              <sqlStatement name="header_query">
                   <![CDATA[select id_cotizacion, fecha_cotizacion, id_clipro from f_cotizaciones where id_cotizacion = :p_id_cotizacion]]>
              </sqlStatement>
              <sqlStatement name="detail_query">
                   <![CDATA[select id_cotizacion as id_cot_child, id_detalle_cotizacion, partida, cantidad, id_producto from f_detalle_cotizaciones where id_cotizacion = :id_cotizacion]]>
              </sqlStatement>
         </dataQuery>
         <dataStructure>
              <group name="F_COTIZACIONES" source="header_query">
                   <element name="ID_COTIZACION" value="ID_COTIZACION"/>
                   <element name="ID_CLIPRO" value="ID_CLIPRO"/>
                   <element name="SUMA_CANTIDAD" value="F_DETALLE_COTIZACIONES.CANTIDAD" function="SUM()"/>
                   <group name="F_DETALLE_COTIZACIONES" source="detail_query">
                        <element name="PARTIDA" value="PARTIDA"/>
                        <element name="CANTIDAD" value="CANTIDAD"/>
                        <element name="ID_PRODUCTO" value="ID_PRODUCTO"/>
                   </group>
              </group>
         </dataStructure>
    </dataTemplate>

    Hi,
    I have the similar question. I used data templates in BI Publisher but now I want to use the same data template in Apex to print some reports.
    I tried to some examples but these were only using report queries. I also tried with the Web Service but this didn't work for me either maybe because I didn't
    used it in the right way. When I used the WS I received the binary of the report so the WS worked it was just the how and where to use it that didn't work for me.
    Now this older entry is BUMPED maybe we find a solution for our problem this way.
    regards,
    Steven

  • Possible to use Ms Excel data as a dataprovider in Flashbuilder for charting

    My dept has an excel spreadsheet with sales data. I'd like to know if anyone has used Excel data for charting in Flashbuilder? Does anyone know of any resources or samples?
    Thanks in advance.

    Looks like I found my own answer. 
    Seems that all I need to do was convert my Header data into a 2D array. 
    Don't know why that one was so tricky to figure out.  But it's working now.   
    Patrick Allen

  • Using a SQL data source and XML data source in the same template

    I am trying to develop a template for the Request for Quote report generated in Apps 11.5.10. I have loaded the data from the XML output into the template, but I am missing one field - I need the org_id from the po_headers table. Is it possible to use a sql data source (i.e., "select org_id from po_headers_all where po_header_id = [insert header_id from xml data]...") in addition to the xml data source to populate the template at runtime? When you use the Insert > SQL functionality is it static at the time the template is created, or does it call to the database at runtime? I've looked through all the docs I could find, but this isn't clear.
    Thanks for any help or suggestions you may have.
    Rhonda

    Hi Pablo
    Thats a tough one ... if you go custom with a data template you will at least get support on the data template functionality ie you have a problem when you try and build one. You will not get support on the query inside the data template as you might have gotten with the Oracle Report, well you could at least log a bug against development for a bad query.
    Eventually that Oracle Report will be converted by development anyway, theres an R12 project going on right now to switch the shipped OReports to data templates. AT this point you'll be fully supported again but:
    1. You have to have R12 and
    2. You'll need to wait for the patch
    On reflection, if you are confident enough in the query then Oracle will support you on its implementation within a data template. Going forward you may be able to swap out your DT and out in the Oracle one without too much effort.
    Regards, Tim

  • How can I be using so much data on my iPhone 5

    How can I possibly be using so much data on my iPhone. I usually listen to Pandora for about an Hour each day I drive to work. So far (the first 8 days of my billing cycle I have used about 1 GB of data. According to Verizon's calculations I based on this usage I should be using a total of about 1.5 GB of data/month. I called both Verizon and Apple and received no resolution. Apple confirmed that the Phone's wifi shuts off WIFI when the phone is asleep. Resulting in the phone switching to LTE. Apple also indicated that apps that are in the background tend to use data as well. This still doesn't make sense. I had the same data usage pattern (Pandora) with my old 3GS and only used about 1GB/ month. There has got to be another solution. I refuse to believe that just using Pandora for about an hour/day for 5/days a week results in a GB of data usage. Any suggestions?

    So, I thought itunes match (like Pandora) streams music from the cloud. I didn't think that the phone 'syncs' several times a day. I did notice a pattern between 11am-1pm data being used in the order of 29 mb yesterday, 42 mb the day before, and 43 mb the day before that. This is at a time when I know I am not using any significant data on my phone. Yesterday I even closed all my apps w/the exception of Pandora which I made sure wasn't running during the day. This additional usage can easily add up to the 100 mb/day i'm averaging.

  • Deadline data tab in workflow

    Hello Everyone,
    i have doubt in deadline monitoring.can anyone of you tell me please what is the use of deadline data tab situated before outcome tab in test workflow window?

    Yes you are right but, I assume this might be the reaosn as follows.
    1. IN the testing envorinment let us assume that already the workflow template is developed and you hvae not defined any deadline monitoring for the workflow tempalet or the task for which you are testing from the txn SWUS then at that directly before the execution time you can specify for testing purpose whetehr the deadline monitoring is work fine or not.
    If you execute a Workflow template then the deadline tab data belongs to WRofklow template. if you try to execute a task from the txn SWUS then what ever the data that you mention in this tab then it belongs to only tha TAsk TS

  • Using REST-based data in SolMan

    Hi,
    In the [Apache Project ESME|http://incubator.apache.org/esme], we have made JMX-based data available via a REST interface. This is partially related to restrictions that are present in many cloud-based environments.  We are looking to see how existing enterprise monitoring systems might be able to use this data.
    Does anyone know if it is possible to use REST-based data in SolutionManager?
    Thanks.
    D.

    Hi Alfred
    I tried to use nested tables and varrays in forms several times but also wasn't able to do so. The problem is that on the client side there are not all the PL/SQL 8 features implemented. Look what the manual says:
    "Not all Oracle8 features are currently supported across this release.
    The major unsupported features are:
    - Collection types (nested tables and
    varying arrays, or varrays)
    - Stored procedures that return object
    values
    - Scalar datatypes NCHAR and NVARCHAR2
    You should also be aware that, although this release does support PL/SQL 8, client-side PL/SQL 8 does not yet fully support all the features in the Oracle8 Server. (Server-side PL/SQL 8 support is complete.)"
    So you'll have to wait for the next release or a patch I guess. Please correct me if I am mistake.
    Hope this was kind of useful
    Nik
    null

  • Can I use RunState.ProcessModelClient.Data.Seq[0].Locals.MyVariable in batch model to set variables in a client sequence?

    I have used RunState.ProcessModelClient.Data.Seq["MainSequence"].Locals.MyVariable to set Locals variables in client sequences running in a sequential model but it doesn't seem to work with the batch model. Using a breakpoint I found that RunState.ProcessModelClient.Data.Seq is a container listing all of the sequences in the client sequence with the Main Sequence being index 0.
    I tried using RunState.ProcessModelClient.Data.Seq[0].Locals.MyVariable to set the variables in my client sequence and it worked fine.
    My question: is this method reliable or am I doing something that might cause problems down the road?
    Thanks,
    Steve

    A few issues from doing it this way-
    1- You should try an make your process model such that it can handle almost any sequence file thrown at it.  MainSequence may not a) contain that local variable and b) be at array element 0.  Unless you do some serious error checking then using your process model elsewhere will be a problem because it will throw errors.
    2- It all depends on where you are changing that variable at.  Remember with the Batch Model that you are dealing with multiple copies of your client sequence.  If you change a Locals in the process model which threads does it actually affect?
    3- Locals is to be used for the sole purpose of the sequence it resides in.  Just like in text based programming where you have a function call:
    MyFunc(int x, int y){
    string foo;
    foo is local and really shouldn't be changed outside of MyFunc.  x and y are parameters and should be how data is shared among different sequences in TestStand.  There are variables for bigger scopes as well (i.e. StationGlobals, FileGlobals). 
    I recommend using either a StationGlobal or passing the data as a parameter. 
    In the end you are the engineer and the flexibility that TestStand gives you makes it so you can do things however you want. 
    My 2 Cents,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Want to use sequence object of oracle when loading data in sql loader

    Hi,
    I want to use sequence when loading data in sqll loader, but the problem is i could not use sequence object of oracle to load the data by sql loader, i can use sequence of sql loader.
    I want to use sequence object because in later entries this sequence object will be used.If i use sequence of sql loader how can i use oracle sequence object
    Is there any other option

    I have a simillar problem, I also want to use a sequence when loading data by the SQL Loader.
    My control file is:
    load data
    infile '0testdata.txt'
    into table robertl.tbltest
    fields terminated by X'09'
    trailing nullcols
    (redbrojunos,
    broj,
    dolazak,
    odlazak nullif odlazak=blanks,
    komentar nullif komentar=blanks)
    And the datafile is:
    robertl.brojilo.nextval     1368     17.06.2003 08:02:46     17.06.2003 16:17:18     
    robertl.brojilo.nextval     2363     17.06.2003 08:18:18     17.06.2003 16:21:52     
    robertl.brojilo.nextval     7821     17.06.2003 08:29:22     17.06.2003 16:21:59     
    robertl.brojilo.nextval     0408     17.06.2003 11:20:27     17.06.2003 18:33:00     ispit
    robertl.brojilo.nextval     1111     17.06.2003 11:30:58     17.06.2003 16:09:34     Odlazak na ispit
    robertl.brojilo.nextval     6129     17.06.2003 14:02:42     17.06.2003 16:23:23     seminar
    But all records were rejected by the Loader, for every record I get the error:
    Record 1: Rejected - Error on table ROBERTL.TBLTEST, column REDBROJUNOS.
    ORA-01722: invalid number

  • Using Sequence with Data Warehouse Table

    I am working on a Uni exercise on data warehousing and am trying to create and populate a table with a sequence on one database with data located on another database.
    For this particular table, I have to reset the primary key (primary keys on operational table start from 4000). In my notes, I have been told to create a sequence first and use yoursequence.nextval in the sub query. I am not very experienced with using sequences and am not sure what a subquery is in relation to them.
    I tried the following but it didn't work. Hopefully it will give you an idea as to what I am trying to achieve:
    create table Region as select region_id_seq, Region_Name, Management_area, Country from dw_op.Sales_Region@q_link;
    Any help with this would be great.

    Thanks again, Justin.
    My instructions tell me to use the schema name along with the db link and it created the table correctly so I'll just have to keep my eye on it.
    Do oyu know how I could use the function initcap to ensure all data is of the same format? I did a bit of research and found that I should be using column aliases which I duly tried but I received an error saying the following line needs a column alias:
    initcap(s.region_name),
    Just thought you may know how this can be done.
    Thanks.

  • Is it possible to use markers in a Premiere Pro sequence such as Chapter / Comment / Segmentation and export the XMP metadata for a database so that when the video is used as a Video On-Demand resource, a viewer can do a keyword search and jump to a relat

    Is it possible to use markers in a Premiere Pro sequence such as Chapter / Comment / Segmentation and export the XMP metadata for a database so that when the video is used as a Video On-Demand resource, a viewer can do a keyword search and jump to a related point in the video?

    take have to take turns
    and you have to disable one and enable the other manually

  • How to increment the date using sequence?

    how to increment the date using sequence?
    01-jan-10
    02-jan-10
    30-jan-10

    794244 wrote:
    how to increment the date using sequence?
    01-jan-10
    02-jan-10
    30-jan-10This doesn't look like a task where a sequence is usefull.
    A sequence is a number generator that guarantees that multiple sessions will all get a different number.
    Even if the sequence is fetched for differnent users (=sessions) that the same time.
    This in turn means that the value returned by the sequence will depend on actions done in other sessions.
    Typical task: create a new unique primary key number. The number MUST be different in all sessions.
    In your case I guess that the same logic should work regardless of the session that executes it. So you need a "number generator" that works indepented from other session values. There are several ways to create such a numbered list.
    The basic idea is to create a select statement that simply returns as many rows as you need. And then use ROWNUM as the number generator. Examples how to do this have already been given. LEVEL works also in hierarchical queries.
    if my interpretation of your requirement is right, then all answers that really used a sequence seem to be wrong. Even if the output looks ok. At best they are just slow. To create new sequence values is a complex task and the database needs a little time for all the synchonization issues that come with it. At worst it will have gaps in the sequence because other sessions used the same value while the numbers were created.
    Edited by: Sven W. on Sep 20, 2010 2:08 PM

  • MAX(SummaryNum) +1 bad idea, but how to use sequence part composite column

    Hi,
    My relational mode is as follows
    Policy (policynum PK) has 1:M with Summary (policynum FK, SummaryNum part of PK, other columns part of PK)
    Basically for each policy users can enter notes with SummaryNum 1, 2, 3, 4.... These numbers are shown to the user for tracking purpose. I need to make sure summary notes for EACH policy start with 1 (cannot really use sequence in the table in the strictest sense) and are incremented by 1. The current Oracle form basically creates the next highest possible value of SummaryNum by adding one to the currently available highest value. In brief, it is like a sequence number for summaries of a particular policy in the summary table.
    PRE-INSERT
    SELECT MAX(SummaryNum ) + 1
    FROM Summary
    I am trying to replicate this in ADF BC (using 11g) and know that not using sequencing and adding one to get the next number is a very bad idea due to concurrency challenges (transactional ACID properties). The reasons are as follows.
    •     Using MAX(policy_memo_seq_num) + 1 is not scalable,
    •     It will lead to duplicates in a multi-user environment, whether ADF BC, Oracle Forms, or any other technology
    I also know how to use create a sequence in db, a related trigger, and then set the attribute in EO properties as DBSequence. My challenge is that since SummaryNum is not a primary key, and instead is part of a composite key in my case, how do I make sure that summary notes for EACH policy start with 1 in the Summary Table.
    I appears that i cannot really use sequence in the table in the strictest sense as this will mean that for policies the summaryNum will start from the next available sequence number, but what i really want is to have it start by one for all policies.*
    I would appreciate any help.
    Thanks,

    Not sure if there is a better way, but here is one way. Let's say your table was like this:
        SQL> desc versioned_item
         Name         Null?    Type
         ID           NOT NULL NUMBER
         VERSION      NOT NULL NUMBER
         DESCRIPTION           VARCHAR2(20)and lets say your data looked like this:
        SQL> select * from versioned_item order by id, version
                ID    VERSION DESCRIPTION
              1001          1 Item 1001
              1001          2 Item 1001
              1001          3 Item 1001
              1002          1 Item 1002
              1002          2 Item 1002
              1003          1 Item 1003To select only the rows for the max-version-id, you could do this:
        select id, version,description
        from versioned_item
        where (id,version) in (select id,max(version) from versioned_item group by id)
        order by id
                ID    VERSION DESCRIPTION
              1001          3 Item 1001
              1002          2 Item 1002
              1003          1 Item 1003To capture this as a view object, you'd only just need to paste in the WHERE clause above into the Where clause box of the view object. No need to use expert-mode since you're not changing the select list or from clause.

  • How to use Sequence in Forms

    Hi,
    I have an Empno Column, At the time of Opening a Form The Empno Will be displayed by using Sequence.
    If the User doesn't save the Form Then the Empno Generated number will be changed.
    How to write the code to get sequence numbers at Empno columns by using Sequence?
    Thanks & Regards,
    Hari Babu

    Ok, I understand now your question. Since the oracle sequence is commited in a separate transaction, it is not possible to get the no-gap sequence, considering your example. In the other hand, if you don't commit immediately, than two concurrently opened forms could use the same sequence number, so you'll get the duplicate key!
    If you're sure that this couldn't happen, you can manage your own sequencing, storing them in another table. Let's say you reached seq 999: entering the form, you'll read from your sequence table 1000, increment to 1001, and assign it to empno, but without commiting. Next time, you'll get the same number, until you commit form, and at the same time, change in seq table. So another will get 1001.
    Downside of this approach are, as mentioned before, concurrent sessions, which will get the same sequence.

  • Problem in Procedure for using sequence...

    Hi,
    I created a procedure for generating sequence in target using below query
    SELECT EMP.EMP_SEQ.NEXTVAL FROM DUAL
    but its working on one system in other system its giving below error...
    ODI-1228: Task EMP_LOAD_EMP_SEQ_PROC (Procedure) fails on the target ORACLE connection EMP_LOAD.
    Caused By: java.sql.SQLException: SQL string is not a DML Statement at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1393)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3887)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1508)
    at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java:665)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.executeUpdate(SnpSessTaskSql.java:3218)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java:1785)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java:2805)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2515)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:534)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:449)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1954)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1818)
    at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor$2.doAction(StartScenRequestProcessor.java:559)
    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:224)
    at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor.doProcessStartScenTask(StartScenRequestProcessor.java:481)
    at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor$StartScenTask.doExecute(StartScenRequestProcessor.java:1040)
    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:114)
    at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
    at java.lang.Thread.run(Thread.java:619)
    Please help me regarding this issue..
    Thanks in Advance...

    Odi Procedures are mainly meant for DML execution..A SELECT query there holds little or no value in my opinion..
    Select queries are only usable in Command on Source and there the general application of that is to use those values returned by the SELECT query on Command Source as a input to the Command/Query/Statement/Java or Jython block at the Command on Target Tab in a one by one iterative manner.
    Lets say your command on source returns 5 rows..So your command on target is executed 5 times and you can use the attributes of these rows as inputs to your command on target in each iteration .. It works like an Internal Cursor

Maybe you are looking for

  • Can't login to Apex (3.0.1.00.12.) - TNS-12519: TNS:no appropriate service

    Hello Everyone, I have installed Oracle Applications Release 12.1.1 (RDBMS: 11.1.0.7.0) on Oracle Enterprise Linux (2.6.18-128.el5PAE). I have configured Apex (3.0.1.00.12.) & EPG successful by this guide (+ metalink note). http://www.oracle.com/tech

  • Cash Inflows and Outflows- company code wise, project wise etc.

    Hi Gurus, Client's requirement says they need cash inflows and cash outflows related to a company code, project wise etc. for a specified period. What needs to be done for this requirement? Do we have to implement Cash Management and liquidity foreca

  • Generate script for filling table

    Hi all, I've got table at test Oracle server table1 with columns ID, BTYPE, MYDESCRIPTION. Rows of this table have been inserted manually. Now my need is to write script for creating table (structure + data). I think about writing something like CREA

  • How to enable Intel VT-x in Windows 8 ?

    In VMware, I am getting error message about enabling Intel VT-x setting in bios ? I have no idea how to go to BIOS in windows 8 and how to enable it ? Could you please guide me how to enable VT-x in windows 8 ?

  • Editable SALV Dropdown issue

    Hi Gurus, in WebDynpro for ABAP, I have a SALV based editable table in which lot of columns have dropdowns (Drop down by Index) and by default system is creating a roundtrip to the server whenever I make a selection in the drop down. Whenever data to