How do you obtain SEQ_ID of a collection based on a SQL QUERY

I don't know if my brain is not working or what, but how can I access the seq_id of a collection that I display as a SQL Query? I have this SQL Query:
select
htmldb_item.checkbox(1,b.asset_id) " ",
htmldb_item.select_list_from_lov(2,
'SHARE-UNRESTRICTED','LOV_RESERVATION_MODE',null,'YES') "mode",
a.seq_id,
b.asset_no,
b.device_name,
b.device_name_attached_to
from
htmldb_collections a,
asset_report_vw b
where
a.collection_name = 'CART'
and a.c001 = b.asset_id
The user can select the reservation mode from the select list for the Mode field and hit a button to update the cart. I have reviewed documentation and the Collections Showcase demo that showed how to do this with form items, but not from a report. I can't figure out how to get the seq_id to pass to the HTMLDB_COLLECTION.UPDATE_MEMBER_ATTRIBUTE procedure. I tried to create a hidden region item called P9_SEQID but I can't figure out how to set it to the seq_id returned from a query. Using #SEQ_ID# syntax doesn't work.

I am including the seq_id in my SQL Query report. The sticky point was how to reference the seq_id in an AFTER SUBMIT process to update the collection returned by the SQL Query when the user hit the Apply Changes button (they can edit one of the fields).
So, I assume then this is how I need to do it. I thought there might be a more efficient way to do it by somehow referencing the seq_id column in the SQL Query report instead of having to requery to get the seq id for each row in the SQL Query:
-- 'update_cart' AFTER SUBMIT process
DECLARE
v_seqid number := null;
BEGIN
FOR I in 1..HTMLDB_APPLICATION.G_F02.COUNT LOOP
select x.seq_id into v_seqid from htmldb_collections x
where x.collection_name = 'CART'
and c001 = htmldb_application.g_f01(i);
HTMLDB_COLLECTION.UPDATE_MEMBER_ATTRIBUTE(
p_collection_name => 'CART',
p_seq => v_seq_id
p_attr_number => 2,
p_attr_value => htmldb_application.g_f02(i));
END LOOP;
END;

Similar Messages

  • How do you create a counter/or increment a number in SQL Developer?

    How do you create a counter/or increment a number in SQL Developer?
    for example:
    x = x + 1; // add 1 to the value of x
    Thanks,

    Thank you for your help. In reply to your comment I notice that I forgot the colon ":" when I "DECLARE x = 0;"
    When I fixed the "DECALARE x := 0;" the code works fine. See below:
    SET SERVEROUTPUT ON
    Declare
    x integer :=0;
    BEGIN
    -- use a FOR loop to process a series of numbers
    FOR i in 1..3 LOOP
    x := x + 5; ---// add 1 to the value of x
    DBMS_OUTPUT.PUT_LINE('Counter: ' || TO_CHAR(x) || ' Square: ' || TO_CHAR(i*i));
    END LOOP;
    END;
    ---------------- OutPut ----
    anonymous block completed
    Counter: 5 Square: 1
    Counter: 10 Square: 4
    Counter: 15 Square: 9
    ====================================
    Thank you again and greatly appreciate your feedback.
    Have a great day!!

  • How to default field values based on a sql query?

    I have a create form that has employee_id and supervisor_id fields. I am defaulting the employee_id based on the login info (no problem there). Now I want to default the supervisor_id also. Supervisor id is based on a sql query that takes the employee_id as a parameter for the where clause.
    How do I implement this in jDeveloper?

    I figured how to do this. I created a new EO, associated it to my base EO via association. Then put this code in the base EO's create() method:
    // Set supervisor id based on SupervisorEO
    SupervisorEOImpl supEO = getSupervisorEO();
    Number newSupId = supEO.getSupervisorId();
    setSupervisorId(newSupId);
    This seems to be the simplest.

  • How do you obtain a previous version of Adobe InDesign after purchasing the latest version?

    If I purchase the full version of the latest Adobe InDesign software (currently version CS6), how do I obtain a copy of a previous version of InDesign (such as version CS5)?
    I need to be able to generate CS5 INDD files for the completion of a project, but I don't believe this is possible unless I have CS5 installed.
    I am aware that I can save to an IDML file in InDesign CS6 which can be opened in a previous version of Adobe InDesign, but the requirements of the project require INDD files that can be opened in CS5.

    Thanks again Jeff, I really appreciate it.
    In case anyone reading this needs it, the following link describes the backwards license process:
    http://www.adobe.com/volume-licensing/policies.html - CLP and EA policies section.
    And the information link for volume licensing available:
    http://www.adobe.com/volume-licensing.html

  • How do you obtain albumart?

    I have a not-so-small music collection (~60gb) and most of the albums miss album art.
    Does anybody know a better method instead of go to amazon, search album, download image, copy to the right folder, rename...?
    There is the app 'albumart' in AUR but the latest version doesn't work anymore, and it hangs sometimes.

    @stefanwilkens: yeah, I used this in windows, too.
    Looks like I can't get around windows...
    EDIT:
    Urfaust wrote:
    There is "Überview" in the AUR.
    http://aur.archlinux.org/packages.php?ID=22508
    http://bbs.archlinux.org/viewtopic.php?id=61660
    Mainly used for browsing your music collection based on album art but it also has a search function if the album art is missing.
    You can right click on the folder and it will perform a cover search based on album name and artist, then you can save the image into the folder.
    Hmm, looks interesting. Maybe there's after all a way around windows...
    Last edited by x0rg (2009-10-17 21:11:29)

  • WHAT I AM HEARING, LION OS CAN ONLY BE OBTAINED FROM THE APPLE STORE, HOW DO YOU OBTAIN A BOOT DISK?

    I understand  Lion OS is downloaded from the Apple store and a hard copy is not available. Then how do you create a boot disk?

    There have been several news items over the last couple of days highlighting the fact that you can create a boot disk from the downloaded files. Here's a link:
    http://eggfreckles.net/tech/burning-a-lion-boot-disc/
    Keep in mind, we should wait until Lion is released for more information.

  • HT2518 how do you transfer video from a DVD based camcorder that does not use USB?

    How do you transfet older video on tape and DVD based camcoder that do not have usb?
    looking at buying a MacBook 15.4

    I have done this for someone else with Tape Deck coax out through USB if you have installed a TV USB application such as Hauppauge WinTV HVR; recording with TV App which is rather tedious.
    Check out these - you may find better ways to do it depending on camcorder.
    http://www.ehow.com/how_2005441_camcorder-pc-usb.html
    http://www.bing.com/videos/search?q=camcorder+media+to+pc&FORM=BVFD#

  • How to pass a string value from XL sheet cell to SQL query.

    Hi,
    I am using SQL query in XL sheet to fetch some data. for that i am using ODBC connection. Now I want to pass a string from XL sheet Cell value in the where clause of Select statement, Please let me know how to do this.
    Below is My code:
    nge("A4").Select
    With ActiveSheet.QueryTables.Add(Connection:= _
    "ODBC;DRIVER={Microsoft ODBC for Oracle};UID=xyz;PWD=xyz;SERVER=xyz;" _
    , Destination:=Range("A4"))
    .CommandText = Array( _
    "SELECT CRYSTAL_REPORT1.PROJECT, CRYSTAL_REPORT1.OBJECT" & Chr(13) & "" & Chr(10) & "FROM NAIODEV.CRYSTAL_REPORT1 CRYSTAL_REPORT1" _
    .Name = "Query from gg"
    Thanks,
    Priya

    What does "XL" (whatever that is) have to do with Crystal Reports which is what you are obviously working with have to do with the Oracle database?
    The rules for using Crystal with Oracle are quite clearly described in all the Crystal Reports docs ... you MUST use IN OUT ref cursors unless you are doing direct table or view access.

  • How to dynamically update columns in a where clause to a SQL query in OSB?

    Hi Gurus,
    I have a requirement where in we need to dynamically update a where clause to a SQL query in OSB(11.1.1.6.0).
    For example:
    If the JCA sql string is "select * from emp where emp_id = 100 and emp_status ='Permanent'" now i want to change this where clause and the new query has to be like "select * from emp where emp_name like 'S%' and emp_dept like 'IT' ". basically we need to change the where clause dynamically.
    We can also use "fn-bea:execute-sql()" in a xquery but I don't want to use this function as creates a new connection.
    I have done some home work and found out --> as per the DOC "http://docs.oracle.com/cd/E23943_01/dev.1111/e15866/jca.htm#OSBDV943" section: "25.5.2 JCA Transport Configuration for Proxy and Business Services", when a business service is created by using JCA, we can see Interaction Spec Properties under JCA Transport Tab. This will have a property "SqlString' and we can over ride it. But I am unable to figure out how to over ride the value. I have tried by using Transport Headers activity but no luck. Please guide me how to achieve this?
    Thanks in advance
    Surya

    I solved my problem.
    In my header renderer, I simply added a line to set the text to the object value "label.setText( (String) value );" (where label is an instance of a JLabel.
    Thank you to who took some time to think about it.
    Marc

  • How to get row number in the fetch row itself in Sql Query ?

    Hi,
    i am fetching some rows from a sql query . Is there any way to get row number as well in each row while all rows are fetched ?
    like this :
    RowNum data1 data2
    1 abc ere
    2 bnh ioi

    Hello
    Ofcourse you can get the rownum inside a query, just keep in mind that the rownum is the number of order in which the records were fetched from the table, so if you do an order by, the rownum will not be sequential, unless you query the information in a subquery first.
    SELECT rown, col1, col1
    FROM table
    Or
    SELECT rownum, col1, col2
    FROM (SELECT col_1, col_2 FROM table ORDER BY col1)
    Regards
    Johan

  • How do you obtain graph informatio​n from a subvi?

    Hello all,
    I have a working VI that varies a voltage source with certain start end and intervals. and every step it increases the voltage, it takes a look at a spectrum which is graphed in a multiplot-XY graph. the vi on its own works perfectly fine. Now the problem is: when i tried to implement this vi as a subvi to a larger VI, the graph does not get updated during the steps, but only gets updated once when the subvi finishes and displays the final graph. I have connected the XY-Graph of my subvi to an output terminal and connected that to  a local variable of my bigger proram's Xy-graph.
    I'd assume the problem is that the graph information only gets passed out of the subvi to the main vi once at the end of the subvi operation. (i have a for loop in my subvi to increase the voltage by steps, and then the same loop i take a spectrum and graph it, and i think that is the problem since i'd assume no information from this for loop will be passed out to the main  vi until the loop finishes, no?
    attached is a look at my subvi.
    thank you very much for all your help!!!!
    Attachments:
    t-series.JPG ‏165 KB

    Hello GerdW
    =P sorry about the messiness~~
    and to your answer:
    i don't quite understand what exactly you meant by your answer. "wire a reference of the indicator to the subvi" the indicator as in the xy graph? and what exactly is a reference? those static vi reference thing? (sorry, i'm veeeeeeery new at this labview as you may tell from the messiness)
    "use a proerty node to set new values in the xy-graph": isn't that what i used in my block diagram? I used a XY-graph value property node to update the xy-graph within my subvi.
    so it won't work by simply making my XY-graph an output terminal and connect that terminal to the main VI's xy-graph?
    if it's not too much trouble, please be bit more specific ><
     i uploaded the subvi even though it's missing few sub-subvis? (the main vi is 1mb big and requires like 270 different subvis so it's impossible to upload that one -_-)
    thanks again for your help GerdW!
    Attachments:
    t-series.vi ‏62 KB

  • How do you cause a job to skip based on the value of variable?

                       We are moving all of our jobs that are scheduled in AppWorx to TIDAL.  In AppWorx, there is a condition that you can use so that if a variable = "whatever", you can cause the job to skip.  We need to be able to to this in TIDAL, but cannot come up with a solution.  Does anyone have an idea of how to accomplish this?

    Hello,
    Please refer to forum post : http://forums.adobe.com/message/4828489#4828489
    Regards,
    Sachin

  • How do you transfer music from a mac based Ipod to a PC based computer

    I have my main Itunes music collection on my "authorized" computer(Mac)at home and would like to transfer/move a copy of my collection to my "authorized"copy of Itunes computer(Windows) at work. My ipod is set up for the mac. Any clues hints or help would be appreciated

    If your iPod is formatted for Mac it won't run natively on a PC because Windows operating systems don't recognize Mac OS-formatted disks (HFS or HFS Plus formats). Mac formatted iPods can only be used on a PC that has a third party helper program such as XPlay or MacDrive installed. XPlay is an iPod specific program and can be used as an iTunes alternative, it will also let you copy songs from an iPod to a computer. MacDrive is more general and lets you access various types of Mac formatted drives on Windows such as CDs, DVDs, hard drives etc:
    XPlay
    MacDrive

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

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

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

  • How do you auto-populate a text field based on entries in other text fields?

    I would like to be able to have a text field that populates as "Complete" or "Incomplete" based on whether all the mandatory text fields have been filled out or not.
    For example, if the "First Name," "Last Name," and "City" text fields are not filled out, the "completion status" text field will show "Incomplete" and once they are filled out, the "completion status" text field will turn into "Complete."
    How would I do this using javascript? I've searched the web for a tutorial, but most of the results seem to be dropdown-centric.
    Please point me in the right direction!

    Try the script below. I put this on the calculate event for Field1
    if(FirstName.rawValue == null || LastName.rawValue == null || City.rawValue == null){
    Field1.rawValue = "Incomplete"
    else
    Field1.rawValue = "Complete"

Maybe you are looking for

  • How can I restore saved e-mail from time machine in 10.7.2?

    My saved e-mails just vanished. I have dire need to restore them. They contain vital information. Where are they in Time Machine and exactly how can I restore them? Thanks in advance for any help. Jim

  • Upgrade - SAP XI 3.0 to PI 7.0

    Hello, Can you please let me know the defined steps in upgrading XI 3.0 to PI 7.0?  I checked the blogs on this.  But couldn't get the right infomation on this.  Can any pass on this information? Thanks. Srinivas.

  • Default email address in Ical alarm

    Hi all. I am having problems setting the default address in alarms in Ical. The situation is like this: -I had 2 emails, "a" and "b", setup in my address book, both in my account (word "me" overlay on my picture). -When I wanted to configure an email

  • 1.2.6 oracle lite connecting using SQL*PLUS

    i have successfully installed a oracle 8iLite on win2000 professional. user id --- system password --- manager host string ---- odbc:polite But when i try to give this command " set serveroutput on " i am getting a message "Server not available or ve

  • Network files, error messages, using compatibility

    I use a Windows 7 64 bit Dell at home and at work. Both have Photoshop CS6 (not extended). This week when I saved files at home using file compatiblity (since co-workers in my office are on CS 5.1) and FTPed them from home to the work network I ran i