Combining multiple tables: Patent wise associates for a given Lab

Oracle 10g
Request your help in re-writing the below query correctly
I have the following tables
CREATE TABLE  "ADDLAB"
   (     "VERSIONNO" NUMBER(*,0),
     "LABID" VARCHAR2(20),
     "LABNAME" VARCHAR2(60),
     "LABSTARTDATE" DATE,
     "LABSTATUS" VARCHAR2(20),
     "LABENDDATE" DATE,
     "OPERATOR" VARCHAR2(20),
     "FROMDATE" DATE,
     "TODATE" DATE,
     "SRCHFIELD" VARCHAR2(20),
     "PARENTLABID" VARCHAR2(20),
     "LABCLOSEREASON" VARCHAR2(1000),
     "LABHIDDENDATE" VARCHAR2(20),
      CONSTRAINT "PK_B34" PRIMARY KEY ("LABID", "LABHIDDENDATE") ENABLE
CREATE TABLE  "ADDPROJECT"
   (     "VERSIONNO" NUMBER(*,0),
     "PROJID" VARCHAR2(20),
     "PROJNAME" VARCHAR2(60),
     "PROJSTARTDATE" DATE,
     "PROJSTATUS" VARCHAR2(20),
     "PROJENDDATE" DATE,
     "PROJENDTYPE" VARCHAR2(20),
     "PROJENDREASON" VARCHAR2(1000),
     "UCPROJECTMANAGER" VARCHAR2(20),
     "FROMDATE" DATE,
     "TODATE" DATE,
     "SRCHFIELD" VARCHAR2(20),
     "OPERATOR" VARCHAR2(20),
     "PARENTPROJID" VARCHAR2(20),
     "PROJHIDDENDATE" VARCHAR2(20),
      CONSTRAINT "PK_B36" PRIMARY KEY ("PROJID", "PROJHIDDENDATE") ENABLE
CREATE TABLE  "PROJECTTOLABASSOCIATION"
   (     "VERSIONNO" NUMBER(*,0),
     "PROJLABASSOID" NUMBER(9,0),
     "PROJID" VARCHAR2(20),
     "LABID" VARCHAR2(20),
     "PROJLABSTARTDATE" DATE,
     "STATUS" VARCHAR2(20),
     "ENDDATE" DATE,
     "LABHIDDENDATE" VARCHAR2(20),
     "PROJLABHIDDENDATE" VARCHAR2(20),
     "PROJHIDDENDATE" VARCHAR2(20),
      CONSTRAINT "PK_B37" PRIMARY KEY ("LABID", "PROJID", "PROJLABHIDDENDATE") ENABLE
CREATE TABLE  "ADDPATENT"
   (     "VERSIONNO" NUMBER(*,0),
     "PATID" NUMBER(9,0),
     "PATTITLE" VARCHAR2(250),
     "PATSTATUS" VARCHAR2(20),
     "PATAPPDATE" DATE,
     "PATSTATUSDATE" DATE,
     "PATENTREJECTWITHDRAWNREASON" VARCHAR2(1000),
     "PATNO" VARCHAR2(20),
     "SRCHFIELD" VARCHAR2(20),
     "FROMDATE" DATE,
     "TODATE" DATE,
     "OPERATOR" VARCHAR2(20),
     "PATENTGEOGRAPHY" VARCHAR2(20),
     "PAPERTYPE" VARCHAR2(20) DEFAULT 'dummy',
     "PATENTURL" VARCHAR2(200),
      CONSTRAINT "PK_A67" PRIMARY KEY ("PATID") ENABLE,
      CONSTRAINT "UQ_PATENTTITLE" UNIQUE ("PATTITLE") ENABLE
CREATE TABLE  "PATENTTOPROJECTASSOCIATION"
   (     "VERSIONNO" NUMBER(*,0),
     "PATENTPROJASSOID" NUMBER(9,0),
     "PATID" NUMBER(9,0),
     "PROJID" VARCHAR2(20),
     "PATENTPROJHIDDENDATE" VARCHAR2(20),
     "STATUS" VARCHAR2(20),
     "STARTDATE" DATE,
     "ENDDATE" DATE,
     "PROJHIDDENDATE" VARCHAR2(20),
      CONSTRAINT "PK_A91" PRIMARY KEY ("PATID", "PROJID", "PATENTPROJHIDDENDATE") ENABLE
CREATE TABLE  "PATENTASSOCIATES"
   (     "VERSIONNO" NUMBER(*,0),
     "PATASSOID" NUMBER(9,0),
     "PATID" NUMBER(9,0),
     "ASSOCIATEID" NUMBER(9,0),
      CONSTRAINT "PK_B67" PRIMARY KEY ("ASSOCIATEID", "PATID") ENABLE
CREATE TABLE  "ADDASSOCIATE"
   (     "VERSIONNO" NUMBER(*,0),
     "ASSOCIATEID" NUMBER(9,0) NOT NULL ENABLE,
     "ASSOCIATENAME" VARCHAR2(100) NOT NULL ENABLE,
     "CTOJOINDATE" DATE,
     "STATUS" VARCHAR2(20),
     "ENDDATE" DATE,
     "SRCHFIELD" VARCHAR2(20),
     "OPERATOR" VARCHAR2(20),
     "FROMDATE" DATE,
     "TODATE" DATE,
      CONSTRAINT "PK_B23" PRIMARY KEY ("ASSOCIATEID") ENABLE
   )Now , I need to get the list of all the patent wise associates for each lab.
I have wirtten the following query. Though I am getting the correct results, I am getting duplicate values. Each record is getting displayed atleast 10times. Hence if there are 4 associates for a given patent, it is returning ateleast 40 records. I tried UNIQUE. Zero results were displayed.
query2 = "SELECT tn1.associateName AS name " +
"FROM AddLab al, AddProject ap, AddPatent p, ProjecttoLabAssociation pl, PatenttoProjectAssociation pp, " +
"AddAssociate tn1, PatentAssociates tn2 " +
"WHERE " +
"al.labID=pl.labID " +
"AND ap.projID=pl.projID " +
"AND pl.projID=pp.projID " +
"AND p.patID=pp.patID " +
"AND pl.status = 'Active' " +
"AND tn1.associateID = tn2.associateID " +
"AND tn2.patID = '" + rs.getString("patID") + "' " +
"order by al.labID";
try
stmt = conn.createStatement();
rs2 = stmt.executeQuery(query2);
String associateNames = "";
while(rs2.next())
associateNames += rs2.getString("ID") + ";\n";
}

Venkadesh,
I am getting the below error -
2012-07-24 10:44:28,278 ERROR [STDERR] (http-0.0.0.0-8022-19) java.sql.SQLException: ORA-00979: not a GROUP BY expression
2012-07-24 10:44:28,279 ERROR [STDERR] (http-0.0.0.0-8022-19)   at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
2012-07-24 10:44:28,279 ERROR [STDERR] (http-0.0.0.0-8022-19)   at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
2012-07-24 10:44:28,279 ERROR [STDERR] (http-0.0.0.0-8022-19)   at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
2012-07-24 10:44:28,279 ERROR [STDERR] (http-0.0.0.0-8022-19)   at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
2012-07-24 10:44:28,279 ERROR [STDERR] (http-0.0.0.0-8022-19)   at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:112)
2012-07-24 10:44:28,279 ERROR [STDERR] (http-0.0.0.0-8022-19)   at oracle.jdbc.driver.T4CStatement.execute_for_describe(T4CStatement.java:351)
2012-07-24 10:44:28,279 ERROR [STDERR] (http-0.0.0.0-8022-19)   at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:896)
2012-07-24 10:44:28,279 ERROR [STDERR] (http-0.0.0.0-8022-19)   at oracle.jdbc.driver.T4CStatement.execute_maybe_describe(T4CStatement.java:383)
2012-07-24 10:44:28,280 ERROR [STDERR] (http-0.0.0.0-8022-19)   at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:986)
2012-07-24 10:44:28,280 ERROR [STDERR] (http-0.0.0.0-8022-19)   at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1125)
2012-07-24 10:44:28,280 ERROR [STDERR] (http-0.0.0.0-8022-19)   at org.jboss.resource.adapter.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:226)

Similar Messages

  • How to find rows in F table of a cube for a given request ID

    Can someone tell me how to find the rows in the F table of a cube for a given request id?

    Hi,
    Copy the Request ID number of that cube and go to manage of the cube and select contents tab, select Infocube content,
    select list of objects to be displayed with results and in that screen give Request ID at Request ID row and at bottom Max no. of Hits keep blank and execute at the top.
    this will display all the data rows loaded with that request. this is records from cube.
    from Fact table, go to SE11, give /BIC/FXXXX "XXXX" is cube name for custom cube.
    get the SID of that cube from the Cube contents as mentioned above, for field select for output along with Request ID select Request SID also.
    from SE11 give table /BIC/DXXXXXP "XXXX" is cube name for custom cube. P for Packet Dimension. here pass reqest SID in 'SID_0REQUID' and get value for DIMID.
    pass this DIMID into KEY_XXXXP, this give the fact table rows for that request DIM ID.
    hope this helps
    Regards
    Daya Sagar

  • Multiplication Table with Two Nested For Loops

    I am trying to code a multiplication table in which the user enters the number of rows between 2 and 10 and enters the number of columns from 2 to 10. This must be in nested for loop format somewhat like this:
    rows has been assigned the input variable for rows and columns is the name for input value for columns
    for (int i = 1; i <=rows; i++)
    for (int j = 1; j <=columns; j++)
    i * j
    i can't figure out how to get it to print out in table format or if the calculation coding is correct. can anyone help me please?
    it should look like this for rows is 4 and columns is 7
    1 2 3 4 5 6 7
    2 4 6 8 10 12 14
    3 6 9 12 15 18 21
    4 8 12 16 20 24 28
    Edited by: hatecodingsomuch on Feb 22, 2009 8:15 PM

    hatecodingsomuch wrote:
    I refuse to ask for help from people who are acting like they are all-knowing and unwilling to help someone, considering I am asking for help...to learn. Obviously I am not understanding java very well and I don't need to be ridiculed like this from members who are supposed to help "NEW TO JAVA" individuals. Get off your high horse or get off the website. I will never use this again.Good luck with that.
    You do seem to be yet another "do my homework for me" type of flunkie. I predict you'll soon have an epiphany that software development really isn't for you.
    I hope you know how to say "Do you want fries with that, sir?" better than the next guy so you can edge him out.

  • VBA needs to pull from multiple tables, how to code for best efficiency?

    I have one main table, and three other tables that exist in a one to many relationship off of the main table.
    I need data from all 3 tables for my calculation. I'll iteratively run through the recordsets of each of these tables for the record on the main table, to perform my calculation.
    Now I need to run this calculation for each record on the main table. I see two options:
    1. Query the three tables for relevant records, for each individual record on the master table. I suspect this approach would be computationally inefficient.
    2. Create additional logic within my calculation to limit the recordset movement to just the record at hand. I can no longer use end of field, or move first type properties/methods, so this will add a good bit of complexity to already complex code.
    I'll need to run this monthly for approx 3000-5000 records.

    Since you can't include multiple independent 1-many relationships in a single query, I only see two choices.
    You can open a recordset for each of the four tables sorted by the main table's primary key. Use an outer loop to move through the main table row by row. Within that loop you loop on each of the child tables using the condition While child.Fields("FK")
    = parent.Fields("PK").
    Another approach is to define a querydef for each of the child tables including a parameter for the foreign key value. Then within the outer loop you assign the parameter and open a recordset from each of the child querydefs. You're still querying the
    database 3 times for each iteration of the parent table, but I think it saves some time to be able to reuse the querydef instead of creating a new one each time.
    I think either approach should be fast enough for 3-5,000 records done monthly.
    Paul

  • Batch wise stock for a given period or month

    Hi,
    My company wants to implement stock ageing report in MM.
    We manage the stocks in Batches. For us the main criteria for stock ageing is batch creation date.
    The report should run stock ageing based upon the date range given as an input screen
    For ex : date range in input can be of today or as of 30.06.2010.
    If the report is run as of today then I am able to get the batch stock from table MCHB . Quantity from field "CLABS"  and the batch creation date from the field "ERSDA"
    But if the report to be run as of 30-06-2010. Then I am not able to get the data from MCHBH as of 30.06.2010.
    I have checked for one material in the table and as per stock it should be 351 as of 30-06-2010 but in the MCHBH table for the month 06. year 2010 it is showing as 136 pcs only.
    As our LIS tables are not getting populated correctly I am not able to check those tables too.
    Can any one guide me with the logic or the table where I can get the batch stocks for a particular month.
    I need Material, Batch, Quantity month and year .
    Please advice how can i get the data and from which table.
    Thanks you for your support in advance.
    Regards
    Fazal

    Hi Jurgen,
    Thanks for your reply. I am not looking for any analysis report or LIS report.
    i am looking for simple ageing report for a date entered by the user. I got the logic and tables for the current date but if i need to refer the stock ageing of previous date like my stock ageing at 30-06-2010. I am not able to get any tables where i can have the batch stock for a given date or a month.
    The report output format to be
    stock <=30 days
    stock>30 and <=90
    stock>90 and <=180
    stock>180 days
    The criteria for calculation will be the date entered by the user in the input screen. If the user enters the date as 30-06-2010 then all the stock received in the month of june and still lying in my storage location will fall the category <=30 and display in the report.
    Stocks received in the month of march, april and may will fall under the category "stock >30 and <=90".
    If I can get the batch wise stock for a particular month , I can pick the posting date of the Goods receipt from the batch number and calcuate my ageing (i.e date entered in the input scren of the report 30-06-2010 - batch posting date).
    I am also referring to the note which you have sent but in the mean while if you can help me to identify the tables where I can get the batch stock for a particular month.
    Thanks
    Fazal.

  • Is there a way to combine multiple tables/sheets into one file?

    In Excel if add more than one sheet you have tabs at the bottom that you can click on and name. Does Numbers have something similar? I searched support and even googled the question but couldn't really find an answer. I appreicate any help!!!
    Thanks!!

    More a vocabulary issue than anything else, although the underlying models are somehwat different.
    A Numbers document must have at least one Sheet, the large canvas on which other objects are placed.
    Every Sheet starts with one Table on it. You can add several tables to a Sheet. Usually hese are (relatively) small, single purpose tables, typically used to perform calculations on the contents of the main table, to hold data used by the main table, to extract data from the main table for use in a Chart, or for other purposes. As each Table is added, its icon is added to the list, under the Sheet to which it was added. Tables can be moved to a different sheet by dragging their icons in the Sheets list. umbers aoutomatically updates all formulas to fit the new location.
    Charts can be added to a Sheet by selectng the data to be graphed, then choosing the chart type from the Charts button in the Toolbar. An icon for each chart is added to the list (under its Sheet) as the chart is created.
    When you add a Sheet to a Numbers document, that Sheet's icon appears in the Sheets list to the left of the working area (where the active Sheet and its contents are displayed). Charts can be moved to a differet Sheet by dragging their icons.
    Other objects (Text boxes, graphics objects) can also be added to the Sheet. No icons appear for these.
    The list of items for each Sheet can be collapsed (by clicking the disclosure triangle beside the Sheet name), hiding the Table and Chart names, and leaving only the Sheet name and icon showing in the Sheets list.
    Only one sheet may be viewed at a time. To switch between sheets, click the icon of the Shhet to which you want to go, or click the icon of an item on that sheet to bring the sheet to the front with the clicked item on the screen.
    For more detail, and a better introduction to Numbers, I'd recommend reading at least the first four chapters of the Numbers '09 User Guide, available through the Help menu in Numbers, or from this page.
    Regards,
    Barry

  • Combine multiple JPGs into 1 JPG for standard report

    All
    I am creating a standard report and I have to include some pictures. Since I cannot align or using any of those functions, is there a way I can combine two pics (place them side by side) using picture functions and call them as 1 picture into the report ?
    Has anyone used standard report for making decent sized report with bunch of pictures ?
    Thanks
    Kudos always welcome for helpful posts

    Hi,
    I am not sure if this is what you need, but you'll tell me ...
    I made the attached VIs a while ago when I was still a trainee, basically, feed it with a folder path that contains the images you want to bind and it might only work with bmp images but it will be easy to change it to jpg or else.
    Also, when I didi that I was to rebuild an image from triggered linear camera so maybe image must have the same hight in pixel... I don't remember, you might have to check this and maybe to perform a resize before binding...
    Good luck
    Hope this helps
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
    Attachments:
    Build_bmp_image.vi ‏76 KB
    main1.vi ‏31 KB

  • [ADF Help] How to create a view for multiple tables

    Hi,
    I am using Jdeveloper 11G and ADF framework, and trying to create a view to update multiple tables.
    ex:
    Table A has these fields: ID, Name
    Table B has these fields: ID, Address
    A.ID and B.ID are primary keys.
    B.ID has FK relationship with A.ID
    (basically, these tables have one-to-one relation)
    I want to create a view object, which contains these fields: B.ID (or A.ID), A.Name, B.Address.
    So I can execute C,R,U,D for both tables.
    I create these tables in DB, and create entity objects for these tables.
    So there are 2 entity objects and 1 association.
    Then I create a view object based on B and add fields of A into the view:
    If the association is not a "Composition Association",
    when I run the model ("Oracle Business Component Browser") and try to insert new data, fields of A can't edit.
    If the association is a "Composition Association", and click the insert button, I will get
    "oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity"
    If I create a view object based on A and add filed of B into the view:
    When I run the model and try to insert new data, fields of B can't edit, no matter the association is or is not a composition association.
    So... how can I create a view for multiple tables correctly?
    Thanks for any advices!
    Here are some pictures about my problem, if there is any unclear point, please let me know.
    http://leonjava.blogspot.com/2009_10_01_archive.html
    (A is Prod, B is CpuSocket)
    Edited by: user8093176 on Oct 25, 2009 12:29 AM

    Hi Branislav,
    Thanks, but the result is same ....
    In the step 2 of creating view object, I can select entity objects to be added in to the view.
    If I select A first, and then select B (the "Source Usage" of B is A), then finishing the wizards.
    When I try to create a new record in the view, I can't edit any properties of B (those files are disabled).
    If I select B first, and then select A in crating view object, the result is similar ...
    Thanks for any further suggestion.
    Leon

  • How to combine multiple queries!

    I know this is pretty basic, but I'm confused. Basically, I need to extract all data for a given entity from a highly normalized database. There are probably 2 dozen tables which contain data for a given entity that must be queried. However, rather than constructing one single query that merges all of the tables together to come up with one huge rowset/row format, how could I query each table seperately and combine the results of each query into one XML file? Can I create a clob with the first query and then append subsequent queries to that clob? Not sure what to do, and I can't find any good examples.
    Thanks in advance!

    Thanks, but I don't think that's quite what I'm looking for. In a nutshell, this is what I'm doing and this is the problem I'm having:
    1. I set a string equal to a query.
    2. I use xmlgen.getxml to fetch the xml into a clob.
    3. I parse the clob into a DOMDocument.
    The problem occurs with multiple queries. If I follow this same process for 5 different queries, then I have 5 instances of a DOMDocument, each holding a different queries XML. Now, can I put them together? I tried xmldom.makeNode for each DOMDocument, but the nodes are associated with the Document from which they came. I tried cloning each node to disassociate from it's Document, but that didn't seem to work. Even if it did, and I got all of the nodes together, I kept getting a java.lang.ClassCastException for trying xmldom.makeDocument for a node. I'm lost. How can I combine the results of multiple queries into a single DOMDocument instance? It was suggested that use xmlgen.getXML to get multiple queries into multiple CLOBS, then essentially combine the CLOBS together, and finally parse into a DOMDocument as a last step, but that doesn't really leverage DOMs capabilities. At this point, I may have to go down that road...

  • Multiple tables of contents -- any updates?

    I've searched the Pages help topic and came here look to see if I could find any help. I'm writing my dissertation in Pages, and I need to have multiple tables of content: one for the chapters, headings, sub-headings, etc., one for a list of figures, and one for a list of tables.
    I found one thread on this topic that was already closed, and it looks like multiple tables of contents was not possible at that point. Are there any new updates or workarounds that would allow this feature?
    I'd hoped to complete my entire dissertation in Pages but alas, it looks like I'll have to export it to Word and struggle with learning to to TOCs in Word. Bleah.

    Karen,
    Sorry to disappoint but you aren't going to easily achieve what you want with the current version of Pages. Hopefully a newer version will do this. You might want to experiment with NeoOffice in the meantime. It's free and IMHO a less of a struggle than Word.
    In any event, concentrate on the content of your dissertation. When you have the text, the formatting will be a breeze no matter what applications you have at your disposal by then.
    Good luck!

  • ALV for fields from multiple tables and make them editable

    Hi,
    I am working on a forecasting report. We have created few custom table e.g. store forcaset detail for whole year month wise. tables are say sales data, budget data, forcast data etc.
    Now i need to make a report based on monthwise based on above mention table.
    eg.o/p looks like:
    column name                     type desc monthapr monthmay .......
    table forcast                      Qty  sales    100          150
    table budget/sales             amt   amou    20.50    130.50
    table sales vs forcast       amt   amount  3000     50000
    -Now i don't know how to display data from multiple table in single ALV list that to with different field type.
    -2nd issue is i need to make only perticuler row editable so that user can chage data.
    -3rd when user change data and press calulate button - it should calculate data for future month - i got formula for that and disply the calulated data.
    - 4th if user like the forcast data then when press save - change data should update dbtable.
    Is this all possible with simple abap FM Or need to use ABAPOO.
    I will appericiate all expert help.
    Many thanks in advance.
    KDE.
    Edited by: kde_test on Jun 4, 2010 5:44 PM

    Hi,
    Solutions :
    1. You can use  FM REUSE_ALV_HIERSEQ_LIST_DISPLAY as guided by Ashutosh.
    You can also check out this
    [http://www.sap technical.com/Tutorials/ABAP/3DGraph/demo.htm]  change link to saptechnical without space
    2. [How to make certain rows in ALV grid editable...;
    3 & 4. Use two importing paramaters 'PF_STATUS_SET' 'USER_COMMAND' of  REUSE_ALV_GRID_DISPLAY.
    create two function codes 'CALC and 'SAVE' in pf-status and provide your required functionality to these function codes using User-Command.
    Sorry am unable to provide you with supporting code, but you can search for it and It can solve your problem
    Regards,
    Rohit

  • Generic lookup table for multiple tables

    I'm sure this issue has come up and been solved before. If this is not the right place for this post, please let me know the correct forum.
    Here is an issue I have. I have multiple tables of different inventory items. Each inventory item can have multiple notes/actions associated or a note or action can be assigned to multiple devices. So I have a many-to-many relationship and need a lookup table. I would like to create just one lookup table not a lookup table for each combination.
    My first thought was to create a main table to hold all primary keys and table names and connecting the lookup table to that.
    1. Create main GUID table to hold all primary keys and table names
    2. All primary keys will be created by sys.guid to ensure all keys are unique.
    3. The Lookup table primary key will be a composite key
    4. If a Note is deleted – it deletes from the main GUID table and the delete cascades down to all other tables.
    CREATE TABLE "ND_NOTE"
    (     "GUID" NUMBER,
         "NOTE_DESCRIPTION" VARCHAR2(4000),
         CONSTRAINT "ND_NOTE_PK" PRIMARY KEY ("GUID") ENABLE
    ALTER TABLE "ND_NOTE" ADD CONSTRAINT "ND_NOTE_FK" FOREIGN KEY ("GUID")
         REFERENCES "ND_GUID" ("GUID") ENABLE
    CREATE TABLE "ND_VIRTUAL_COMP"
    (     "GUID" NUMBER,
         "VIRTUAL_COMP_NAME" VARCHAR2(4000),
         CONSTRAINT "ND_VIRTUAL_COMP_PK" PRIMARY KEY ("GUID") ENABLE
    ALTER TABLE "ND_VIRTUAL_COMP" ADD CONSTRAINT "ND_VIRTUAL_COMP_FK" FOREIGN KEY ("GUID")
         REFERENCES "ND_GUID" ("GUID") ON DELETE CASCADE ENABLE
    CREATE TABLE "ND_GUID"
    (     "GUID" NUMBER,
         "TABLE_NAME" VARCHAR2(4000),
         "STATUS" NUMBER,
         CONSTRAINT "ND_GUID_PK" PRIMARY KEY ("GUID") ENABLE
    CREATE TABLE "ND_NOTE_LK"
    (     "GUID" NUMBER,
         "ANY_OTHER_GUID" NUMBER,
         CONSTRAINT "ND_NOTE_LK_CON" PRIMARY KEY ("GUID", "ANY_OTHER_GUID") ENABLE
    ALTER TABLE "ND_NOTE_LK" ADD CONSTRAINT "ND_NOTE_LK_FK" FOREIGN KEY ("GUID")
         REFERENCES "ND_GUID" ("GUID") ON DELETE CASCADE ENABLE
    ALTER TABLE "ND_NOTE_LK" ADD CONSTRAINT "ND_NOTE_LK_FK2" FOREIGN KEY ("ANY_OTHER_GUID")
         REFERENCES "ND_GUID" ("GUID") ON DELETE CASCADE ENABLE
    Is there a better way to do this? I feel like I'm talking myself into circles.

    hi ,
    Can u explain the 'LOGIC' mistake which u have figured out .. will be useful for freshers and beginners
    With Warm Regards
    ssr

  • Can we use single DB Adapter for multiple tables

    Hi,
    I have 3 tables. ONE is the Master table and other 2 tables having Primary and foreign key relationships with the Master Table.
    Data is enter in the Tables 2 & 3 (based on Master Table Primary key)
    I have to use a DB Adapter in BPEL Process which will be in Transaction (what type of Transaction is Best in such a Scenario).
    - How do i implement it in BPEL.
    - Can i use a Single DB Adapter for Multiple Tables ? (*Views* should not be created for tables 1, 2 & 3),
    as we want to avoid using multiple DB Adapters, as in future Tables may increase or decrease...
    - while in Transaction if Table 2 fails in Inserting / Updating, it should roll back on error and also if Table 3 fails in Inserting / Updating, it should roll back table 2 and Table 3.
    - how access to concurrent users is maintained / managed in such a scenarios.
    But everything should be done using Single DB Adapter without creating a separate view.
    Is this Possible in BPEL..
    If not, How do we design, Implementation such a BPEL Process in Transaction with a best in Performance (both BPEL Process & DB Resources)
    thanks in advance
    thanks & regards,
    anvv sharma

    Hi,
    Thanks for your quick response.
    I have few quires.
    If we use PL/SQL, how do we implement transaction and Exception Handling appropriately based on the Error / Exception in BPEL.
    If the Table 2 or Table 3 gives out Error / Exception, i have to handle it separately and intimate accordingly.
    Suppose, if Table 2 got Error / Exception - Error Handling would be 'Roll back due to error in Table2'
    Thanks & regads,

  • Is it possible to combine multiple Pur Reqs for multiple materials to one vendor into one PO through MD07?

    We have material planners who use MD07 (traffic signal screen) Stock/Requirements List, Collective Access tab to review material requirements by MRP Controller.  Once the list is created, they select individual materials and review them in MD04.  In a lot of cases, Purchase Reqs (PRs) are reviewed and adopted into POs individually for each material.  Sometimes they will combine multiple PRs for one material into one PO.  This is a good practice.  However, from what I have found, it is not possible to combine multiple PRs for multiple materials into one PO.  If this was done it would dramatically reduce the number of POs that we are issuing to suppliers.  Problem statement:  We issue too many POs which causes additional influxes down the line (receiving dock/goods receipts processing, receiving issues, invoices, invoice issues, etc.).  Does anyone know of a way to address this problem without a major overhaul in approach or customization of the system?  Thank you in advance!   

    Hello Michael
    As far as I know, this is not possible directly from MD07, only from the MM transactions.
    The following thread suggests the following procedure to convert several PRs into one PO:
    Conversion of multiple PR into single P.O
    Drag and drop the first PR from the item overview to the shopping card on top of ME21N,
    then open the PO detail delivery schedule tab and drag  and drop all other PR to the shopping card shown  in the schedule tab
    You can use the same procedure, calling the order conversion from MD07 and then drag and drop another PRs into this PO.
    BR
    Caetano

  • User Datastore for multiple tables and columns!

    Hi,
    I hop so much, someone can help me.
    I've made a user datastore to index multiple columns of multiple tables.
    Now, the Documentation of Oracle explains the idexing of one table.
    I have multiple tables, which have all, the columns descr and tagnr. I want to make a query sth like this:
    select table1.column, table2.columnd... where contains(indexed field,'gas within descr',1)>0
    is it possible to index 4 seperate tables, without having a collective key? I dont want to make a Concatenated Datastore.
    I have wrote this code.
    But it doesn't work. It's been compiled fine. But I don't get any result with my queries.
    create or replace
    procedure My_Proc_Wide
    Must be in ctxsys schema.
    In a full-scale example, this would be a wrapper
    for a proc in the user schema.
    rid in rowid,
    tlob in out NOCOPY clob /* NOCOPY instructs Oracle to pass
    this argument as fast as possible */
    is
    v_descr varchar2(80);
    v_tagnr varchar2(30);
    v_descr_name constant varchar2(20) := 'descr';
    v_descr_start_tag constant varchar2(20) := '<' || v_descr_name || '>';
    v_descr_end_tag constant varchar2(20) := '</' || v_descr_name || '>';
    v_tagnr_name constant varchar2(20) := 'tagnr';
    v_tagnr_start_tag constant varchar2(20) := '<' || v_tagnr_name || '>';
    v_tagnr_end_tag constant varchar2(20) := '</' || v_tagnr_name || '>';
    v_buffer varchar2(4000);
    v_length integer;
    begin
    /* verify the env which called this */
    if Dbms_Lob.Istemporary ( tlob ) <> 1
    then
    raise_application_error ( -20000,
    '"IN OUT" tlob isn''t temporary' );
    end if;
    /* the real logic */
    /* first tabel to be indexed */
    select t1.tagnr, t1.descr
    into v_tagnr, v_descr
    from tweb.pdp_positions t1
    where t1.rowid = rid;
    v_buffer := v_tagnr_start_tag ||
    v_tagnr ||
    v_tagnr_end_tag ||
    v_descr_start_tag ||
         v_descr ||
         v_descr_end_tag;
    v_length := length ( v_buffer );
    Dbms_Lob.WriteAppend(tlob, length(v_buffer) + 1, v_buffer || ' ');
    /* second table to be indexed */
    select t2.tagnr, t2.descr
    into v_tagnr, v_descr
    from tweb.pdp_schema_equ t2
    where t2.rowid = rid;
         v_buffer := v_tagnr_start_tag ||
    v_tagnr ||
    v_tagnr_end_tag ||
    v_descr_start_tag ||
         v_descr ||
         v_descr_end_tag;
    v_length := length ( v_buffer );
    Dbms_Lob.WriteAppend(tlob, length(v_buffer) + 1, v_buffer || ' ');
    /*third table to be indexed */
    select t3.tagnr, t3.descr
    into v_tagnr, v_descr
    from tweb.pdp_equipment t3
    where t3.rowid = rid;
         v_buffer := v_tagnr_start_tag ||
    v_tagnr ||
    v_tagnr_end_tag ||
    v_descr_start_tag ||
         v_descr ||
         v_descr_end_tag;
    v_length := length ( v_buffer );
    Dbms_Lob.WriteAppend(tlob, length(v_buffer) + 1, v_buffer || ' ');
    /* fourth table to be indexed */
    select t4.tagnr, t4.descr
    into v_tagnr, v_descr
    from tweb.pdp_Projcode t4
    where t4.rowid = rid;
         v_buffer := v_tagnr_start_tag ||
    v_tagnr ||
    v_tagnr_end_tag ||
    v_descr_start_tag ||
         v_descr ||
         v_descr_end_tag;
    v_length := length ( v_buffer );
    Dbms_Lob.WriteAppend(tlob, length(v_buffer) + 1, v_buffer || ' ');
    end My_Proc_Wide;
    what have I to do, to make this work?
    Any Help would be appriciated!!
    Kind Regards,
    Arsineh

    Arsineh,
    I realise that it has been quite some time since you posted this question but I thought I'd reply just in case you never did manage to get your user datastore working.
    The reason your procedure will not work is simple. A user datastore procedure accepts a rowid input parameter. The rowid is the ID of the row that Oracle Text is currently trying to index. In the example you have given, you are attempting to use the supplied rowid as the primary key for multiple tables, this will simply never work as the rowid's across multiple tables will never correspond.
    The best way to achieve your goal is to create the index on a master table which contains the common primary keys for each of your four tables e.g.
    MASTER_TABLE
    COL:COMMON_KEY (NUMBER(n))
    COL:USER_INDEX_COLUMN (VARCHAR2(1))
    If you create the user datastore index on the MASTER_TABLE.USER_UNDEX_COLUMN column your stored proc simply needs to read the correct row from the MASTER_TABLE (SELECT t.common_key into v_CommonKey FROM master_table t WHERE t.rowid = rid) and issue subsequent queries to extract the relavant data from the t1..t4 tables using the common key e.g.
    SELECT t1.tagnr, t1.descr into v_tagnr, v_descr FROM t1 WHERE t1.[PRIMARY_KEY_FIELD] = v_CommonKey;
    SELECT t2.tagnr, t2.descr into v_tagnr, v_descr FROM t2 WHERE t2.[PRIMARY_KEY_FIELD] = v_CommonKey;
    and so on...
    Hope this helps
    Dean

Maybe you are looking for

  • Problem sharing media between multiple users on same Mac

    My wife and I have an eMac, running Mac OS 10.4.11, with iTunes 9.2.1(4).  We each have separate user accounts.  Previously, I had imported several albums into my iTunes library.  Now, my goal is to be able to share the albums that I had imported wit

  • Override JNDI names in persistence.xml and @resource annotation

    I have a Java EE 7 application that I am developing for use with both GlassFish and WildFly, but I have discovered that both application servers use a slightly different format for specifying JNDI names. In GlassFish the persistence.xml file referenc

  • Target Directory & File Name parameters in Receiver File Adapter with ASMA

    Hi Experts.. I have the following question.... What am I suppose to inform in the Target Directory & File Name obligatory parameters in Receiver File Adapter if I am using ASMA to fill it? Is it any dummy value? Also, if you have any step by step gui

  • What is the file attribute @ and how can I get rid of it

    I converted some wav files using Roxio Toast 11 and the output AIF files have a '@' in the file permissions and are not displayed in Finder. What does the '@' mean and how can I get rid of it. Would love to know why Toast adds it but I posted a quest

  • Credit Limit - How to Use the Foward button in VKM4

    Hi all, I have an enquiry here. In VKM4, we can see that there is a 'Foward' icon where we will be able to foward the respective sales order to an authorize person for approval. After I Foward and Save it, system only prompts me saying the SO has bee