Passing sequence number to queue table

Hi anyone,
I am very new to the advance queue. Have a user_info table. I would like to pass the userid sequence to the queuence table up on insert or update on to the usere_info table.. Here is the step I did so far.
create type user_id as object(userid number, login varchar2(100));
execute dbms_aqadm.create_queue_table(queue_tale => 'user_fque_tab', queue_payload_type => 'user_id');
execute dbms_aqadm.create_queue(queue_name => 'user_que', queue_table => 'user_que');
execute dbms_aqadm.start_queue(queue_nama => 'user_que');
Now I am trying to create the trigger on the user_info table to pass the next sequence id to the queue table but not sure what to do.
so far I created on the trigger
create or replace trigger user_infor_queue after insert on user_info
for each row
declare
p_userid number;
enqueue_options dbms_aq.enquue_options_t;
message_properties dbms_aq.message_properties_t;
login varchar2(100);
v_message userdata.user_id;
begin
v_message:= userdata.user_id( p_userid =>new.id, login =>:new.login)
Please help on the creating the trigger...
thanks

Hi Bob,
In TestStand 3.0 and later you can pass the sequence context as a CAObjHandle in CVI. The easiest way to get an example of this is to create a blank sequence and insert an Action step. Right-click on the step and select specify module. On the module tab specify a name for the function. Next on the Source Code tab click Create Code... This will prompt you for a location and name for a project file and a c file. It will then create code for you that demonstrates how to pass the sequence context and use it.
If you're using an older version of TestStand then the parameters you can pass are fixed. I would suggest looking at one of the shipping examples. The Register step in the following example demonstates how to pass the sequence context and use it: C:
\Program Files\National Instruments\TestStand 3.1\Examples\Demo\C\cpu.seq
(This path will be different depending on your version of TestStand.)
I hope this helps!!
Regards,
Sarah Miracle
National Instruments

Similar Messages

  • Update sequence number in PLAF table.

    Hi
    There is a requirement where I have to update sequence number for Planned Order in ECC.
    Sequence Data is stored in PLAF-SEQNR field [Seq. number order].
    BAPI_PLANNEDORDER_CHANGE did not work for me. There are only 27 field which i think we can edit (ie field in import parameters BAPIPLAF_I2).
    So can someone help me to find a way to update PLAF-SEQNR.
    Thanks
    Bhavesh

    Use an Enhancement Spot

  • Sequence number the internal table

    How can i get my internal table numbered sequentially.

    Hi khan,
    <b>check this code</b>
    data : begin of itab occurs 0,
           sno like sy-tabix,
           vbeln like likp-vbeln,
           netwr like likp-netwr,
           end of itab.
    itab-vbeln = '0005002035'.
    itab-netwr = '5.78'.
    append itab.
    clear itab.
    itab-vbeln = '0005002035'.
    itab-netwr = '-3.25'.
    append itab.
    clear itab.
    itab-vbeln = '0005002035'.
    itab-netwr = '-8.47'.
    append itab.
    clear itab.
    itab-vbeln = '0005002035'.
    itab-netwr = '1.98'.
    append itab.
    clear itab.
    loop at itab.
    itab-sno = sy-tabix.
    modify itab index sy-tabix.
    endloop.
    loop at itab.
       write : / itab-sno , itab-vbeln , itab-netwr  .
    endloop.

  • How to select data from a table by passing document number from another tab

    How to select data from a table by passing document number from another table.
    for eg:-
    I want to display name, adres, region from ADRC table
    by using field delivery document number
    Kind Regards,
    Shanbagavalli.S

    Hi Shanbagavalli,
    There are multiple solutions to this questions a few i will try to answer and then you can take the best required for your requirements.
    **Consider that you have a Internal table having document number from other table..
    SELECT NAME ADRES REGION FROM ADRC
           INTO IT_ADRC
           FOR ALL ENTRIES IN IT_DOC
           WHERE DOCUMENT_NO = IT_DOC-DOCUMENT_NO.
    **Consider that you have 1 document number then
    SELECT NAME ADRES REGION FROM ADRC
         INTO IT_ADRC
         WHERE DOCUMENT_NO = W_DOCUMENT_NO.
    Hope this solves your problem.
    Regards,
    Kunjal

  • Table Sequence number

    Hi All,
    I have a scenario which goes like this:
    We have a common table(Table1) in our DB which maintains the sequence numbers(we are not using oracle supplied db sequence).
    For every transaction we are using the current sequence number from the table Table1 and put in Table2, while saving
    we increment that number by 1 in Table1 for next transactions use. For every transaction the sequence number should be unique.
    At any point of time a record with same sequence number should not be inserted in Table2.
    In Table2 this sequnce number is not a unique column.
    To achieve this, we are checking using view object whether current sequence num already exists in Table2 before saving.
    If exists we refresh with new number from Table1. In normal scenario this works fine.
    But if concurrent users are accessing, there are cases where same sequence number getting inserted in the Table2
    with a time difference of 2 seconds or so(very short span, hence programmatic check fails).
    We are unable handle this case using programmatic check of records in table.
    Cany any one suggest the best solution possible to tackle this scenario.
    Thanks,
    Sanjaykar

    sanjaykar,
    Unless you use locking on the "sequence number generator" table, you WILL at some time get duplicates when two people try to insert at nearly the same time. Sounds like you are going for the infamous "gap-free sequence." My honest and not sarcastic nor facetious suggestion would be to go with a sequence number and abandon your approach.
    However, if you insist, you can do this by locking the row in the sequence generator table. You can do this in Oracle by using the FOR UPDATE clause of the SELECT statement like this:
    select current_value
    from my_sequence_table
    where sequence_name = 'foobar'
    FOR UPDATEThat will lock the row. You can then increment the number, specify it as your key value, update the current_value in your sequence table and commit. If another user jumps in around the same time, the SELECT FOR UPDATE will block, as the row is already locked. However, I cannot stress enough that if you are looking for a high-performance application, one that lets more than one person work at the same time, this is a horrible idea. Just pop over to http://asktom.oracle.com and search for gap-free sequences to read plenty of long discussions why.
    Best,
    John

  • APEX Sequence number when passing data from different instances

    Hello there,
    I have a question for you guys.
    I have an application sitting in my Production area, and the one in test needs to be up-to-date (the data). So I grab the excel file, truncate the table in my test area and load the table from prod into the one in TEST.
    The problem with this is that when I tried to insert a record to the table it gave me the unique constrain error. Because the sequence for the table in test next number is 500 and the last number (primary key) in PROD is 10,000.
    I tried to change that number in APEX but it won't alow me to. The only thing I can change is the minimum and the maximum value.
    Can I change the min to 10,001 so it can now start fro there or what would you recommend to shance the last sequence number of the table to 10,001?
    Regards,
    Ruben Tapia

    Hi,
    Copy your sequence SQL e.g. to notepad. Drop that sequence.
    Edit SQL in notepad by changing number after START WITH to be 10001.
    Then just recreate sequence from your edited SQL =)
    Br,Jari

  • Sequence Number on Labels

    Hope someone can help.  I have a request from client to print a sequential number on an avery label.  For example, if i used address labels that were 30 to a page, the first label would have 1 and the second label would have 2, etc.   No data is being printed so i don't have a table,  just the seq number.  Am i missing something easy here or can it not be done in crystal 2008.
    Thanks for any help or suggestions.
    Jeff

    Jeff,
    There's no reason to use Access, Excel, or any other outside application. A just about any modern database will support the use of temporary tables... and that's all you need.
    If your report is built be using linked tables, add the following code as a SQL Command (tested in SQL Server)
    DECLARE @SeqNum INT, @MaxValue INT;
    SET @SeqNum = 1
    SET @MaxValue = (SELECT MAX(SequenceNumber) FROM TableName)
    IF object_id('tempdb..#MyTempTable') IS NOT NULL
    BEGIN
       DROP TABLE #MyTempTable
    END
    CREATE TABLE #MyTempTable (SeqNum INT)
    WHILE @SeqNum < @MaxValue
    BEGIN
         INSERT INTO #MyTempTable (SeqNum) Values (@SeqNum)
         SET @SeqNum = @SeqNum + 1
    END
    SELECT SeqNum FROM #MyTempTable
    1) Be sure to alter line 3 of the code, where is says set @MaxValue = , so that  it is pulling the maximum sequence number from your table... This will make sure the proper number of rows are created... Not too many, not too few.
    2) Link this back to your table using an LEFT OUTER JOIN... With the new command on the left side.
    -- If you are already using a command to pull your data, just add this code to the existing command and reference the #MyTempTable in the main select statement.
    HTH,
    Jason

  • How to pass the sequence number of current loop in a for loop in FPGA vi to the host

    PCI-7830R
    LV 8.2
    What I was trying to do is to use multiple DIO to generate pulse at different sequence. Mode one is to automatically sweep from DIO1 to DIO20; mode 2 is several DIOs generate pulse simoutaneously.  So I use a case structure to make the selection, in the mean time, I set up two for loop in each case so that I can use multiple pulse generations. For example, in scanning mode, if I set 2 exposures, it sweeps from 1 to 20 then do it again.  
    Then I need to get the loop sequence number, i of each scenario. So I put an indicator within the first loop, and create a local variable of it and put in the second one.  Running the FPGA vi alone, I can see the indicator change in each case from 0 to N-1, N being the for loop time.But in the host vi, I tried to add this indicator as an element in the read/write invoke method, in the debugging mode, I could only see it directly jump to N-1 without all the changes I saw in FPGA vi. 
    Is it possible to get this number passed correctly from FPGA vi to the host vi? Thanks

    Thanks for the reply Jared.
    Excuse me if it looks incorrect, but I'm new to FPGA programming, so I would have to look into the FIFO you referred to.  I used local variables because for one thing I have several different cases containing for loop in each of them, and I only want one indicator for the "i".  If I put the indicator out of any for loop, it's only gonna show the last number which is N-1.  For the other thing, it seems like property nodes are not allowed in FPGA vi.  And by doing this, I can see the i number changing from 0 to N-1 in each case, well, in FPGA vi's front panel.  But while I ran the host vi with everything, the indicator in host vi's front panel only showed the last number N-1. It may be the reason you said, it happened too fast before the indicator in host vi can catch it.
    What I want to realize is to group the data I collect in host vi, for example, when I choose multiple exposure in each mode, and the FPGA runs 1 through 20 then do it again, I want the data stored in two groups using the loop sequence number as the seperator in file name.  So it goes like 1-1, 2-1.......20-1; then 1-2, 2-2,.....20-2.

  • "Sequence number already exists in table" maintining Data Sources

    Hi fellows, i am seting up a new connector in GRC 10.0, but when configuring the connector for the User detailed Data sources i get the same error; "Sequence number already exists in table".
    I have tried with over 200 numbers which I know for sure are available and still get the same error. Where can I find the table with this information?
    Can the information be removed to clean up table space?
    Thanks for your help!!!

    Hi Gabriela
    I recall getting this error a lot and it seemed to be a buffering/memory problem where it was remember the old value was getting remember. I had to exit out of the IMG navigation and reenter it again. It'd happen if I deleted one entry and then went to add another (even after saving). Not sure if you are getting this
    Other thing is to check the backed tables to see if any orphaned values on the primary key
    Regards
    Colleen

  • HT5100 How to limit the number of downloaded videos in parallel to one.i want my iPad itunesu to download only one video at once at time and when finished from downloading it to pass to the second queued one.

    How to limit the number of downloaded videos in parallel to one.i want my iPad itunesu to download only one video at once at time and when finished from downloading it to pass to the second queued one.

    @Tylerdowner: hmm.. maybe yes.. I just want to use the DOWNTHEMALL AddsOn for the saving file not the default download.. because my costumer download MP3 files and save it 3 or more files at a time so my Internet Connection goes down :( so I just want to limit them to save 1 file at a time.
    or if there is another way to limit it to 1.. please tell me :(

  • JDBC Adapter - Multiple Table Update - Sequence Number

    I have to design a integration scenario where I will be updating 4 tables in a oracle database. One of these tables is a header table and the rest are detail tables. I have to generate a sequence number using Oracle Sequence number object which is one of the columns in the header table.
    How can i use the Oracle SEquence number object to get the next value with JDBC Adapter?

    Use an Enhancement Spot

  • How to create Parent and Children is a tree table / trigger sequence number

    How to create Parent and Children is a tree table when the primary key of the parent is generated via a trigger and a sequence number in the database?
    My problem is when I create a parent and then right away a children. The parent still not have a primary key until the transaction get to the database. I get a error when trying the create the children, cannot insert null in the foreign key field of the children.
    Please help.
    Stephane

    You should have the parent key be marked as a DBSequence type.
    Then you should have the association between the master and detail defined as composite association to make sure that the posting order to the database is correct.
    http://download.oracle.com/docs/cd/E24382_01/web.1112/e16182/bcentities.htm#BABFECDJ

  • VT01N-Loading Sequence number functionality /BEV1/RPFLGNR in table VTTK.

    Hi Gurus,
    While creating shipment in VT01N, in the process screen, one field Sequence number: is showing by default Zero.
    Loading Sequence Number in the Tour /BEV1/RPFLGNR in table VTTK.
    Sequence number of the load in the tour.
    When will this sequence number will take running numbers like 1, 2 .. and so on.
    Could any body throw some light on this.
    Thanks&Regards
    Sreekanth

    No response

  • How to set default value of a table using sequence number

    Dear all,
    Does any body know that how to set default value of a table
    using sequence number.
    But I don't want to use trigger to do that.
    Please help!!!!
    Eldon

    Andrew is essentially correct. You can get around the trigger,
    but not the sequence, if (and this may be a very big if) you can
    guarantee that every time an insert is done into the table, from
    whatever source, the statement looks something like
    INSERT INTO tbl VALUES (sequence.nextval,other_columns_values)

  • How to get sequence number for tree level in tree table

    Hi,
    User would like to add a column as "Sequence" in the beginning of tree table. The tree table look like as following:
    Sequence Tasks Date
    1 ItemA
    subItem1 12/31/12
    subItem2 12/31/13
    subItem3 12/31/14
    2 ItemB
    subItem1 12/31/12
    subItem2 12/31/13
    subitem3 12/13/14
    How to add this sequence column in tree table?
    Thanks!
    Susan

    Check this sample:
    <af:form id="f1">
                    <af:treeTable value="#{bindings.Departments.treeModel}" var="node" styleClass="AFStretchWidth"
                                  columnStretching="last" selectionListener="#{bindings.Departments.treeModel.makeCurrent}"
                                  rowSelection="single" id="tt1">
                        <f:facet name="nodeStamp">
                            <af:column id="c1" headerText="Department Name" width="200">
                                <af:outputText value="#{node.index + 1} #{node.DepartmentName}" id="ot1"
                                               visible="#{bindings.Departments.treeModel.depth == 0}"/>
                            </af:column>
                        </f:facet>
                        <f:facet name="pathStamp"></f:facet>
                        <af:column id="c2" headerText="Employee Name">
                            <af:outputText id="ot4" value="#{node.FirstName} #{node.LastName}"/>
                        </af:column>
                    </af:treeTable>
                </af:form>Thanks,
    Navaneeth

Maybe you are looking for

  • Trying to get JRE for a month!!!!

    Hello, My name is Amber and I am in dire need of assistance! I am trying to download a plugin for an online course I am taking to school and I haven't been able to for at least a month. I have Mozilla firefox as a browser and all of my settings on my

  • How to print calendar for the year with one month a page in sharepoint 2010?

    Currently, I can print a SharePoint 2010 calendar one page at time when the month view is displayed.  Is there an easy way to print all the months at once with one month on each page? Thanks for any tips!

  • Where is tunisia map in nokia ovi suite?!

    hi,i don't find tunisia between  maps in nokia ovi suite?! where the bugs,please heeelp for downloadmap of my country Solved! Go to Solution. Attachments: tunisia not found.JPG ‏69 KB

  • Specifying where Reminders and Notes are saved.

    I can't get my head around where the agenda pulls it's data from and where notes should be saved and the same with reminders. I'd like reminders to be editable on my computer or emailed to me or, at least, somewhere where I will see them later. Notes

  • Scheduling email in lion mail?

    I need an easy and reliable way to schedule emails to be sent out at a particular time via mail. Any leads?