Reference record in another record

Hi,
I have two packages each having one record. Is it possible to reference the record of the second package in the record of the first package ? For example:
create or replace pkg1 is
type rec1 is record (
col11 integer,
col12 ref pk2.col21
end pkg1
create or replace pkg2 is
type rec2 is record (
col21 integer,
col22 varchar2(20)
end pkg2
The above code always results in PLS-00532.
I don't want a nested record but something like a foreign key from one record to another...
thank you for your help,
Vanessa

You have two options:
1).
SQL> create or replace package pkg2 is
  2      type rec2 is record (
  3          col21 integer,
  4          col22 varchar2(20)
  5      );
  6  end pkg2;
  7  /
Package created.
SQL> create or replace package pkg1 is
  2      type rec1 is record (
  3          col11 integer,
  4          col12 pkg2.rec2
  5      );
  6  end pkg1;
  7  /
Package created.
SQL>2).
SQL> create or replace type rec2 is object (
  2          col21 integer,
  3          col22 varchar2(20)
  4      );
  5  /
Type created.
SQL> show errors
No errors.
SQL> create or replace package pkg1 is
  2      type rec1 is record (
  3          col11 integer,
  4          col12 ref rec2
  5      );
  6  end pkg1;
  7  /
Package created.
SQL>

Similar Messages

  • Reference data from another sheet

    Hey everybody, I am sorry to post here if it has been previously posted. I am looking to use a conditional format  a cell with a value less than 84 to be changed to red. I am using the iPad.
    I also need to reference data from another worksheet.
    Thanks,
    Greg

    I had this same issue, I finally figured you you need a space before and after each ::
    'MY BUSINESS 2014 EXPENSES - Table 1' :: B242

  • How can I reference records outside the two date parameters?

    Hi all,
    I have a query that fetches records based on the two date parameters defined (Startdate and Enddate).
    If the Startdate is 2014-12-01 and the Enddate is 2014-12-12, I want to pull records outside these two date parameters, that is      2014-09-01 and 2014-11-30.
    I want to add up the records from  2014-09-01 and 2014-11-30 and include them in one of the columns in my report.
    I tried using this query:
     SUM(CASE WHEN FilteredIncident.Statuscodename IN ('QUEUED', 'ASSIGNED') AND (EnteredOn >= '2014-09-01' AND EnteredOn<= @StartDate) THEN 1 ELSE 0 END) AS OpenRecords
    Please help with any ideas..thanks

    Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You should follow ISO-8601 rules for displaying temporal data. We need
    to know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI/ISO Standard SQL. And you probably need to read and download the PDF for: 
    https://www.simple-talk.com/books/sql-books/119-sql-code-smells/
    There is no such crap as a “status_code_name” in RDBMS. It has to be a “<something in particular>_status”; think about how silly that data element name is! Want to keep going and have a “status_code_name_value_id”? LOL! 
    The name “Filtered_Incident” is also wrong. Tables are sets, so unless you have only one element in this set, the table name should be a plural or (better) collective name. But a better question is why  did you split out “Filtered_Incidents” from “Incidents”?
    Would you also split “Male_Personnel” and “Male_Personnel” from “Personnel”? 
    Get a book on data modeling and learn some basics. 
    >> I have a query that fetches records [sic: rows are nor records] based on the two date parameters defined (report_start_date and report_end_date). If the report_start_date is 2014-12-01 and the report_end_date is 2014-12-12, I want to pull records [sic]
    outside these two date parameters, that is 2014-09-01 and 2014-11-30. I want to add up the records [sic] from 2014-09-01 and 2014-11-30 and include them in one of the columns in my report. <<
    Having no DDL and no sample data makes this hard. Does your boss make you program without any documentation, DDL, etc? This spec is vague; you say to do a total, but show a count, etc. 
    One of the many nice things about DATE data types is that the BETWEEN predicate works with them, so you can quite writing 1960's BASIC predicates with primitive logic operators. 
    Here is a guess: 
    SELECT SUM(CASE WHEN incident_date BETWEEN '2014-09-01' 
               AND @report_start_date THEN 1 ELSE 0 END)
           AS open_record_cnt 
      FROM Incidents
     WHERE incident_status IN ('QUEUED', 'ASSIGNED')
        AND incident_date <= @report_end_date; 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • How to reference recording fields values?

    hi,
    i am in the LSMW Maintain field mapping and conversion rules screen and i used the following abap coding routine to move values to a destination field :-
    g_amount = VA02-KURSK + 3.     
    write g_amount                 
       to VA02-KURSK decimals 2.  
    What i am doing above is i am adding a value of 3 to the destination structure field VA02-KURSK before writing it to the field. However when i run the convert data step of the lsmw it throws an abap run time error as "Unable to interpret "/ " as a number. " in the first line of the above code.
    Can someone pls tell me how to fix this?

    You've posted to the VB.Net forum which is for Windows Forms applications and service and general Visual Basic topics.  Since this is LightSwitch it is outside of our bailiwick (the first error about the messagebox shouldn't appear in windows forms). 
    I'm going to move this to the LightSwitch forum were you should be able to get more appropriate help.
    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

  • Reference cells in another spreadsheet

    I've not looked at Numbers for a pretty long while now, but '09 has definitely introduced the things that have kept me away (particularly row and column freezing) and it's good to be back!
    Just a check:- I've had a good look around, but as far as I can see, it is not possible to link to cells in another spreadsheet. It's not a deal breaker, but have I understood that correctly?
    Thanks a lot
    Jim

    Henry, you can certainly use references between sheets within the same -- what Excel calls a "workbook", I don't know what it is called in Numbers.
    This is the sysntax, where "Spreadsheet1" is the sheet and "Table1" is the table on that sheet.
    =Spreadsheet1::Table1::a1
    Here's my problem --- I want to use a cell's contents to reference a sheet:
    Sheets named "susie", "dave", and "colette" all have their date of birth in cell A1.
    My summary sheet has the values "susie", "dave", and "colette" in cells A1, A2, and A3.
    I need a function in B1, B2, and B3 that will retrieve the contents of cell A1 from the sheet named in column A.
    I tried using INDIRECT and a straight reference. I just can't find the syntax. Anybody?
    (By the way, I couldn't get INDIRECT to work even in the simplest case. Is it working?)
    regards to all

  • Reference cell from another spreadsheet

    In Numbers, is it still not possible to reference a cell from one spreadsheet to another spreadsheet? I know it's possible between sheets within a spreadsheet but it would be nice to "grab" info from a different spreadsheet.

    No way to know as noone here in the forums are Apple employees.  You can post your feedback and feature requests to Apple using the menu item "Numbers > Provide Numbers Feedback"

  • Reference columns from another query

    I've made XML data template in Report Builder, which consists of multiple data queries and groups. When I use for each XML structure in Word template builder to obtain data, I get data only from one data query, and blanks for fields that I referenced from another group.
    Is there any way to solve that problem.
    Thanks in advanced for the answers.

    It seems to me that you are trying to get to a higher/parent element from within a lower/child group. So, use the ../ notation to get up to an element in a parent group. And add ../ as you go higher and higher. ex. <?../../CHECK_DATE?> Obviously, for referencing lower group, you just open the group with a for-each.
    Make it a habit to open and close your groups for ease of readability.
    Shree

  • Reference cell from another sheet

    Hello,
    I've created income and expenses spreadsheets, within the same file. I would like to create a cell with a formula for INCOME less EXPENSES. I've read through many forums and have tried the following formulas to no avail:
    On the income sheet (B65 represents our total income, FYI) I've typed:
    =B65-'MY BUSINESS 2014 EXPENSES'::'Table 1'::B242
    or
    =B65-'Sheet 2'::'Table 1'::B242
    or
    =B65-('MY BUSINESS 2014 EXPENSES'::'Table 1'::B242)
    or
    =B65-('Sheet 2'::'Table 1'::B242)
    or
    =B65-'MY BUSINESS 2014 EXPENSES - Table 1'::B242
    Nothing is working. I keep getting the same #REF! error message. What am I doing wrong here?
    Thanks in advance!

    I had this same issue, I finally figured you you need a space before and after each ::
    'MY BUSINESS 2014 EXPENSES - Table 1' :: B242

  • Lifetime of document[ record] in a record center

    hi all,
     would like to know for how many days/ months/years we can keep document as a  record in the record center site collection.
     i have configured the record center and  providing a link to record center to view the  document.now, as per the design will i be able to access the   same document[record] after  few months/years.
    PrasadWT

    Hi Prasad,
    If a document has been declared as a record in a record center, it will be a record until you undeclared it as a record.
    However, the documents may not always be stored in the place where you add them.
    It depends on the Content Organization Rules and Retention Policies set on the records or documents.
    If such rules or policies have been created, actions will be operated on the records or documents such as moving them to another place.
    You can check the Content Organization rules by going to Site settings > Content Organization rules.
    You can check the Retention Policy by going to Library settings > Information management policy settings.
    More references:
    Records management:
    http://blogs.msdn.com/b/mcsnoiwb/archive/2009/11/05/sharepoint-2010-records-management.aspx
    Content Organization rules:
    https://support.office.com/en-us/article/Configure-the-Content-Organizer-to-route-documents-b0875658-69bc-4f48-addb-e3c5f01f2d9a?CorrelationId=ee3c8983-fd6f-4cad-b57e-a9cc4a5d1505&ui=en-US&rs=en-US&ad=US
    Retention Policy:
    https://mikesnotebook.wordpress.com/2013/05/20/sharepoint-retention-policies/
    Best regards.
    Victoria
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Using BAPI_PO_CREATE to create a PO with reference to another PO.

    Hi, I am using BAPI_PO_CREATE to create a PO with reference to another PO, in the po_header_add_data, I have done this: po_head_add-our_ref = p_ebeln.
                 CALL FUNCTION 'BAPI_PO_CREATE'
                       EXPORTING
                            po_header             = po_head
                            po_header_add_data    = po_head_add
                            skip_items_with_error = ''
                       IMPORTING
                            purchaseorder         = po_nbr
                       TABLES
                            po_item_schedules     = po_item_schedules
                            po_item_text          = po_item_text
                            po_items              = poitem1
                            return                = return.
    But when I have created the PO, in the our reference field, it is space? Why? If I want to fill the the our reference  with the another PO, how should I do?

    NULL

  • Creation of Sales order with reference to SOW contracts(VA01 )

    I had created sales order using BAPI_SALESORDER_CREATEFROMDAT2 and now i want to attach the document link for each line item.I could not do it in my program or recording.How can i enter these document type?pls help......

    Dear Machoy,
    In IMG under
    Sales and Distribution -> Sales -> Sales Documents -> Maintain Copy Control for Sales Documents -> Copying Control: Sales Document to Sales Document
    or Transaction VTAA
    http://help.sap.com/erp2005_ehp_02/helpdata/en/70/a7853478616434e10000009b38f83b/frameset.htm
    If you create a sales document with reference to a preceding document, the system copies nearly all the data from the preceding document. The data in the preceding document originally comes from the customer and material master records. Because the data is copied from the preceding documents into the sales document, any changes that have been made to the master data records since the preceding document was created are not included in the sales document. If, when you create with reference, you add another item to the document that was not in the preceding document, the system determines the data for it from the master records, such as the material master or info record.
    You have created an inquiry and a quotation with reference to this inquiry. Before you created the quotation, you changed some data in the material and customer master records.
    You have changed the material description in the material master record. This description is stored in the sales document at item level.
    You have changed the terms of payment in the customer master record from ZB01 to ZB03. These are stored in the sales document at header level.
    When you created the inquiry, the system copies the original material description to the item. If you enter another item in the quotation for the same material, the system displays the new material description for the new item.
    However, the system continues to propose the original term of payment, that is, ZB01, for all items including the new one. This is because it is copied from the header of the preceding document into the header of the quotation, and the change in the customer master record has no affect on the quotation.
    Regards,
    Naveen.

  • Creation of sales order with reference to inquiry no.

    Hi gurus!
    Im having trouble in creation of sales order with reference to inquiry no. The scenario is like this one. In va11(creation of inquiry no.), in the field of <b>SERVICE LEVEL</b>, i indicated a value. after the creation of inquiry no, i want to create a sales order with reference to inquiry no. But the problem is, the <b>SERVICE LEVEL</b> field does not have any value. What is the main problem to this scenario? is it the VARIANT CONFIG or the program itself? please help its urgent
    Regards,
    Mackoy

    Dear Machoy,
    In IMG under
    Sales and Distribution -> Sales -> Sales Documents -> Maintain Copy Control for Sales Documents -> Copying Control: Sales Document to Sales Document
    or Transaction VTAA
    http://help.sap.com/erp2005_ehp_02/helpdata/en/70/a7853478616434e10000009b38f83b/frameset.htm
    If you create a sales document with reference to a preceding document, the system copies nearly all the data from the preceding document. The data in the preceding document originally comes from the customer and material master records. Because the data is copied from the preceding documents into the sales document, any changes that have been made to the master data records since the preceding document was created are not included in the sales document. If, when you create with reference, you add another item to the document that was not in the preceding document, the system determines the data for it from the master records, such as the material master or info record.
    You have created an inquiry and a quotation with reference to this inquiry. Before you created the quotation, you changed some data in the material and customer master records.
    You have changed the material description in the material master record. This description is stored in the sales document at item level.
    You have changed the terms of payment in the customer master record from ZB01 to ZB03. These are stored in the sales document at header level.
    When you created the inquiry, the system copies the original material description to the item. If you enter another item in the quotation for the same material, the system displays the new material description for the new item.
    However, the system continues to propose the original term of payment, that is, ZB01, for all items including the new one. This is because it is copied from the header of the preceding document into the header of the quotation, and the change in the customer master record has no affect on the quotation.
    Regards,
    Naveen.

  • Automatically fill cells from reference table

    Not sure if this is even possible, but I thought I'd ask and see if anyone knows of a way to do this. Here goes.
    Can I have cells fill in information automatically from a reference table in another sheet? What I'm trying to do is this:
    I need to keep training records for a group. What I've created is a numbers document with two sheets. In the first sheet, I have a single table with two columns that lists all of the training courses in column B with their course codes in column A. For example, let's say that course C32 (listed in Column A) is a "Basic Training" course (so "Basic Training" is in column B). On the next row is the next course, the next row is the next course, etc. This is my reference table.
    Now in the second sheet, I have a table for each person. Each table is three columns. In the first I enter the course code they've taken, in the second I enter the date they took it, and what I'd LIKE to have happen is that when I enter the course code in Column A, the description from the reference table automatically fills into the third column. That way I don't have to type all the course descriptions over and over. (Some of them are fairly lengthy).
    Is there any way to do this in numbers?
    Thanks

    Yes, it is possible. Use the LOOKUP function. However, your lookup table must be in the same document, but can be on a separate sheet.
    Create a table of the course names (2 columns, code in A and name in B) and call the table (not the containing sheet) something significant such as "Course names". Then in Column C of each persons table use the formula =LOOKUP(A, Course Names :: A, Course names :: B). This says take the code reference from the first cell on the line (local column A) and compare it with the codes in the first column (Course names :: A) of the Course names table, and return the value from the second column (Course names :: B) of the matching row.
    Remember to enter the formula as a column formula to save having to repeat it in each cell.

  • How do I move imove content from one user to another on the same computer?

    We bought our Macbook pro about six months ago. We made the mistake of creating two users for it (my husband and myslef) but bow we only log in under my user name. The problem is we originally imported all of our video camera content to his "log in" and now it is in his imovie folder, and not mine. I want to make a movie on my log in with the fottage that we imported to his. So, how do I get video content from one users login on the SAME computer to the other log in users? I cannot seem to move it for the life of me. I did not expect this to be so difficult.

    Hi,
    You need to log into his account and look, under the Movies folder, for iMovie Events. Inside, you'll find folders with the events names and still further will be the movie itself. Copy each to an external media or use the Shared folder so both accounts can reference them.
    Another option would be to attach an external HD and via iMovie (Events Library pane) move them to the new disk. You would preserve the thumbnails and analysis already performed on the videos.
    Good luck!

  • Pricing procedure with a reference of a billing document

    Hi all,
    How to apply new pricing procedure when you use a reference of another billing document?
    by VA01, I want to use a billing document as a reference to create another sales document. Tthese 2 has different pricing procedures but when I do this, I want the sales document to use its own procing procedure.
    But when I refer a billing document and create a sales document at VA01, it copies the billing document's pricing procedure.
    These 2 pricing procedures have different condition types.
    I already went to "Maintain Copy Control for Sales Document" - "Copying Controld: Billing Document to Sales Document"  and set "B" as its pricing type.
    Waiting for a valuable replies from y'all.
    Best regards
    Misaki

    HI,
    Thank you for your reply,
    I already have assigned pricing procedures to the required order types at OVKK, and V/08.
    but it still doesn't go right.
    When I don't refer any billing document at VA01 and simply create a sales document using required order type,  the assigned pricing procedure is used. However, when I use a reference of a billing document to create a new sales document, it copies a pricing procedure from the refered billing document and doesn't  use its own pricing procedure.
    Wanting to know how to redetermine a pricing procedure to create a sales document when referring a billing document.
    Ideally, the new sales document doesn't copy a pricing procedure at all from the reference(billing document), if possible.
    I really appreciate for your help.
    Misaki

Maybe you are looking for

  • Phantom hairline showing up in shape, transfers to After Effects, doesn't move on art board

    Hi, First time posting here so hope I'm following protocol. We're having an issue at my office with Illustrator (5.1) and After Effects. This just started happening this week. For some reason, when a file is created in Illustrator and you zoom in ext

  • Cannot connect to mobile bluetooth device in my car

    I have an iPhone 4 and cannot connect zu the mobile bluetooth device in my car. My iPhone doesn't find it. Can anybody help?

  • WIndow scrolling and refresh issues.

    I am having problems with intermittent window scrolling and refreshing. I noticed it first in Safari but I have confirmed it is happening in other applications as well. Typically I have no problems with window scrolling and refreshing. At times howev

  • Iphoto restored but problems

    My Mac crashed 2 weeks ago and restoring iPhoto has been a nightmare.  All of my "events" are gone, I have duplicates, triplicates, etc.  My photos have jibberish under them like "hyvSMkMfS2mpzg1LnmCDsA".  I have over 20,000 photos and have most back

  • How to convert columns to rows

    I have 70 columns and I need to convert them into rows. Please help! Currently, it is showing as listed below message 1 message 2 message 3 message 4 message 5 .......... message 70 system 1 20 10 40 60 100 system 2 40 30 50 80 110 system 3 60 60 70