How to fetch column data using foreign key in adf table ?

I have created a adf table using a view that has a group id and user id column. I want to display the user name ( from user table) and group name from group table. I had created view links to the corresponding tables from the user_group view ( whose iterator is used to render the table).
It sort of works. I dragged the user name from the embedded user iterator in user_group iterator. It does find the correct user name but if I have more than one row, it displays the user name of the last row user in all rows !
Is there a solution to this problem ?

Well, I saw in the view query for the association view ( for Many-Many) that the SQL already had the joins with the two ( master) tables to the association table. So I went ahead and added the descriptive columns to the select clause. Then the selected columns showed up in the attribute list by themselves ( without my intervention). So far so good.
Then I recreated the adf table attribute by dragging these newly selected attribute to the page. I still see that the value of the attribute is the same in all the rows - this time it is the value for the FIRST row. It doesn't correspond to the foreign key for that particular row.
IS THIS A BUG ? Has anyone else ever done this ?

Similar Messages

  • Using FOreign key constraints on tables in database.

    I am student and novice in the field of ORACLE and PL/SQL and Database Creation. I had created a database consisting tables and got problem while applying foreign key constraints.
    CUST_MSTR
    CREATE TABLE "DBA_BANKSYS"."CUST_MSTR"("CUST_NO" VARCHAR2(10),
    "FNAME" VARCHAR2(25), "MNAME" VARCHAR2(25), "LNAME" VARCHAR2(25),
    "DOB_INC" DATE NOT NULL,      "OCCUP" VARCHAR2(25), "PHOTOGRAPH" VARCHAR2(25),
    "SIGNATURE" VARCHAR2(25), "PANCOPY" VARCHAR2(1),      "FORM60" VARCHAR2(1));
    (CUST_NO is PRIMARY KEY, )
    -- EMP_MSTR
    CREATE TABLE "DBA_BANKSYS"."EMP_MSTR"("EMP_NO" VARCHAR2(10),
    "BRANCH_NO" VARCHAR2(10), "FNAME" VARCHAR2(25), "MNAME" VARCHAR2(25),
    "LNAME" VARCHAR2(25), "DEPT" VARCHAR2(30), "DESIG" VARCHAR2(30));
    (EMP_NO is primary key )
    --NOMINEE_MSTR
    CREATE TABLE "DBA_BANKSYS"."NOMINEE_MSTR"("NOMINEE_NO" VARCHAR2(10),
    "ACCT_FD_NO" VARCHAR2(10), "NAME" VARCHAR2(75), "DOB" DATE,
    RELATIONSHIP" VARCHAR2(25));
    (NOMINEE_NO is primary key )
    --ADDR_DTLS
    CREATE TABLE "DBA_BANKSYS"."ADDR_DTLS"("ADDR_NO" NUMBER(6),
    "CODE_NO" VARCHAR2(10),      "ADDR_TYPE" VARCHAR2(1), "ADDR1" VARCHAR2(50),
    "ADDR2" VARCHAR2(50), "CITY" VARCHAR2(25), "STATE" VARCHAR2(25),
    "PINCODE" VARCHAR2(6));
    ( ADDR_NO is primary key )
    Problem: I want to apply foreign key constraints on ADDR_DTLS table so that Before inserting value in ADDR_DTLS table it must check, VALUE in ADDR_DTLS.CODE_NO must be PRESENT either in attribute value CUST_MSTR.CODE_NO or EMP_MSTR.CODE_NO or NOMINEE_MSTR.CODE_NO table .
    I applied the foreign key constraints using this syntax
    CREATE TABLE "DBA_BANKSYS"."ADDR_DTLS"("ADDR_NO" NUMBER(6),
    "CODE_NO" VARCHAR2(10),      "ADDR_TYPE" VARCHAR2(1), "ADDR1" VARCHAR2(50),
    "ADDR2" VARCHAR2(50), "CITY" VARCHAR2(25), "STATE" VARCHAR2(25),
    "PINCODE" VARCHAR2(6),
    constraints fk_add foreign key CODE_NO references CUST_MSTR. CODE_NO,
    constraints fk_add1 foreign key CODE_NO references EMP_MSTR. CODE_NO,
    constraints fk_add2 foreign key CODE_NO references NOMINEE_MSTR.CODE_NO);
    (foreign key)
    ADDR_DTLS.CODE_NO ->CUST_MSTR.CUST_NO
    ADDR_DTLS.CODE_NO ->NOMINEE_MSTR.NOMINEE_NO
    ADDR_DTLS.CODE_NO ->BRANCH_MSTR.BRANCH_NO
    ADDR_DTLS.CODE_NO ->EMP_MSTR.EMP_NO
    When I applied foreign key constraints this way, its gives a error called foreign key constraints violation. (I understand that, its searches the attribute value of ADDR_DTLS.CODE_NO in all the three tables must be present then the value will be inserted. But I want, if the value is in any of the three table then its should insert the value or its gives an error.)
    Please help me out, though i put the question and i want too know how to apply the forign key in this way. and is there any other option if foreign key implementation is not pssible.

    If you are on 11g you can use ON DELETE SET NULL:
    CREATE TABLE addr_dtls
    ( addr_no          NUMBER(6)  CONSTRAINT addr_pk PRIMARY KEY
    , addr_cust_no     CONSTRAINT addr_cust_fk    REFERENCES cust_mstr    ON DELETE SET NULL
    , addr_emp_no      CONSTRAINT addr_emp_fk     REFERENCES emp_mstr     ON DELETE SET NULL
    , addr_nominee_no  CONSTRAINT addr_nominee_fk REFERENCES nominee_mstr ON DELETE SET NULL
    , addr_type        VARCHAR2(1)
    , addr1            VARCHAR2(50)
    , addr2            VARCHAR2(50)
    , city             VARCHAR2(25)
    , state            VARCHAR2(25)
    , pincode          VARCHAR2(6) );In earlier versions you'll need to code some application logic to do something similar when a parent row is deleted, as otherwise the only options are to delete the dependent rows or raise an error.
    btw table names can be up to 30 characters and don't need to end with MSTR or DTLS, so for example CUSTOMERS and ADDRESSES might be more readable than CUST_MSTR and ADDR_DTLS. Also if the Customer/Employee/Nominee PKs are generated from a sequence they should be numeric.
    Edited by: William Robertson on Aug 15, 2010 6:47 PM

  • How we relate two tables using foreign key(fk)?

    hi to all,
        what are the conditions has to follow to relate two tables.I.e.,
    the two tables have same primary keys(pk). if we relate these two tables in one table the pk and fk will be the same then how that table in active.

    Hi
    To relate two tables..we have foreign key relationship.
    In one table v have primary key and in the second table, the same key is foreign key for that table..
    To relate two tables, we can use JOINS
    If there is already a suitable foreign key between two tables used in the view, these tables can be linked with a join condition from this foreign key.
    Create a view on tables TAB1 and TAB2. TAB1 is the primary table of the view. TAB2 is the secondary table of the view. TAB1 is the check table for TAB2. The foreign key fields are assigned to the check table fields as follows:
    TAB1-FIELD_A assigned to TAB2-FIELD_1
    TAB1-FIELD_A assigned to TAB2-FIELD_1
    The join condition of the view generated from the foreign key is then:
    CREATE VIEW ... AS SELECT ... WHERE TAB2-FIELD_1 = TAB1-FIELD_A AND TAB2-FIELD_2 = TAB1-FIELD_B.
    Join conditions can also be copied from generic and constant foreign keys. If a constant is assigned to a field in the foreign key, it is also assigned to the field in the join condition. There is no join condition for a generic relationship in the foreign key.
    The foreign key between tables TAB1 (check table) and TAB2 (foreign key table) is defined as follows:
    TAB1-FIELD_A assigned to TAB2-FIELD_1
    TAB1-FIELD_B generic
    TAB1-FIELD_C assigned to constant ‘C’
    The join condition for the view generated from the foreign key is in this case:
    CREATE VIEW ... AS SELECT ... WHERE TAB2-FIELD_1 = TAB1-FIELD_A AND TAB2-FIELD_2 = ‘C’.
    Hope it helps
    Reward if useful.

  • Foreign keys to same table / Who columns in User table???

    Hi All,
    We are designing a database for our client and we are using common columns in all tables like CreatedBy and UpdatedBy which are foreign keys to USER table. My question is can we use these two columns in USER table and have the foreign key constraints to the same tables?
    USER table script will look like following..
    CREATE TABLE XX_USER
         User_ID                              VARCHAR2(10)
    ,     CreatedBy                         NUMBER(10)
    ,     UpdatedBy                         NUMBER(10)
    ,     User_Name                         VARCHAR2(100)     NOT NULL
    ,     Designation                         VARCHAR2(100)     NOT NULL
    ,     CONSTRAINT USER_ISACTIVE_CHECK CHECK (Is_Active in ('Y', 'N'))
    ,     CONSTRAINT USER_KEY PRIMARY KEY (User_ID),
    ,     CONSTRAINT USER_CREATED_BY FOREIGN KEY (CREATED_BY)
         REFERENCES XX_USER (USER_ID)
    ,     CONSTRAINT USER_UPDATED_BY FOREIGN KEY (UPDATED_BY)
         REFERENCES XX_USER (USER_ID)
    );I think what I am doing (the above script) is not correct. Could someone please suggest me how can solve this issue?
    Thanks in advance,
    Oraebs

    user8644385 wrote:
    We are designing a database for our client and we are using common columns in all tables like CreatedBy and UpdatedBy which are foreign keys to USER table. My question is can we use these two columns in USER table and have the foreign key constraints to the same tables?You can. After fixing synatx errors:
    SQL> CREATE TABLE XX_USER
      2  (
      3   User_ID        VARCHAR2(10)
      4  , CreatedBy     NUMBER(10)
      5  , UpdatedBy     NUMBER(10)
      6  , User_Name     VARCHAR2(100) NOT NULL
      7  , Designation   VARCHAR2(100) NOT NULL
      8  , Is_Active     VARCHAR2(1)
      9  , CONSTRAINT USER_ISACTIVE_CHECK CHECK (Is_Active in ('Y', 'N'))
    10  , CONSTRAINT USER_KEY PRIMARY KEY (User_ID)
    11  , CONSTRAINT USER_CREATED_BY FOREIGN KEY (CreatedBy)
    12       REFERENCES XX_USER(USER_ID)
    13  , CONSTRAINT USER_UPDATED_BY FOREIGN KEY (UpdatedBy)
    14       REFERENCES XX_USER(USER_ID)
    15  )
    16  /
    Table created.
    SQL> Now USER_ID is a string while CreatedBy/UpdatedBy is a number. Even though it is allowed, it limits USER_ID to numeric strings and causes implicit conversions while validating. So I would change CreatedBy/UpdatedBy data type to VARCHAR2(10).
    SY.

  • How to fetch the data from a pl/sql table and varray, with some example

    I want to fetch the data using a cursor from Pl/sql table and varry and I want to update the data.
    Please provide me some example.

    PL/SQL Table  - please note that, right term is Associative Array.
    Presumably you are referring to the 'often heated' back-and-forth that sometimes goes on in the forums when people refer to ANY PL/SQL type using a term with the word 'table' in it?
    Curious that you then show an example of a nested table!
    type emp_tab is table of employees%rowtype;
    The 'right term' for that is 'nested table'. The following would be an 'associative array' or 'index-by table'
    type emp_tab is table of employees%rowtype INDEX BY PLS_INTEGER;
    Those used to be called 'PL/SQL tables' or 'index-by tables' but 'associative array' is the current term used.
    Associative Arrays
    An associative array (formerly called PL/SQL table or index-by table) is a set of key-value pairs. Each key is a unique index, used to locate the associated value with the syntax variable_name(index).
    The data type of index can be either a string type or PLS_INTEGER.
    Since the Oracle docs often use 'PL/SQL table' or 'index-by table' it isn't unusual for someone asking a question to use those terms also. Technically the types may not be 'tables' but it's clear what they mean when they use the term.
    In PL/SQL the term 'nested table' is still used even though the PL/SQL collection is not really a table. SQL does have nested tables where the data is actually stored in a table. The PL/SQL  'nested table' type can be used as the source/destination of the SQL data from a nested table so that may be why Oracle uses that term for the PL/SQL type.
    The doc that SKP referenced refers to this use:
    Nested Tables
    In the database, a nested table is a column type that stores an unspecified number of rows in no particular order. When you retrieve a nested table value from the database into a PL/SQL nested table variable, PL/SQL gives the rows consecutive indexes, starting at 1.

  • How to increment the date using sequence?

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

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

  • How to fetch the data & display the data if fields got the same name in alv

    hi frnds, i need ur help.
    how to fetch the data & display the data if fields got the same name in alv grid format.
    thanks in advance,
    Regards,
    mahesh
    9321043028

    Refer the url :
    http://abapexpert.blogspot.com/2007/07/sap-list-viewer-alv.html
    Go thru the guide for OOPs based ALV.
    Use SET_TABLE_FOR_FIRST_DISPLAY to display the table:
    CALL METHOD grid->set_table_for_first_display
     EXPORTING
    I_STRUCTURE_NAME = 'SFLIGHT'     “Structure data
    CHANGING
    IT_OUTTAB = gt_sflight.          “ Output table
    You can also implement
    Full Screen ALV, its quite easy. Just pass the output table to FM REUSE_ALV_GRID_DISPLAY. 
    For controlling and implementing the FS-ALV we have to concentrate on few of the components as follows :
    1. Selection of data.
    2. Prepare Layout of display list.
    3. Event handling.
    4. Export all the prepared data to REUSE_ALV_GRID_DISPLAY.
    Regd,
    Vishal

  • How does Fetch Rx Data works?

    Dear Sir or Madam,
    I have a problem when I am implementing MAC protocols by using LabVIEW and USRP2. Actually there are two problem, I will show them in a simple CSMA protocol.
    The first design is that in CSMA protocol, node 1 sent a data packet to node 2, and node 2 received the packet, analyzed it, and sent back a corresponding ACK. The problem is, node 2 need to switch between receiving mode (to receive the packet) and transmitting mode (to sent ACK back), and the switching time is non-neglectable (around 7 to 10 ms). That delay significantly decreases system performance. Is that any way to reduce the switching time?
    The second problem is rising after the first one. To overcome the time delay, I use two antennas in the system, therefore one can always work in Tx mode and another in Rx mode therefore no switching is needed. The block diagram is simplified as figure (if transmitter mode is set to false, then the receiving VI works by using another antenna).
    The problem is, since we are using if structure, there is noway that transmitting and receiving can work concurrently. However, nodes always receive the signal it sent in the last while loop round. For example, after receiving a DATA packet from another node, this node sends a ACK back, and then the transmitter mode are switching to false then I can receive next packet. However, after sending the ACK, and switching to reception mode, I can receive the ACK I sent myself! That is my question, how does fetch Rx Data VI works?
    Thank you very much!

    Hi HustLiliAn,
    Thank you very much for you quick reply. I have to say sorry that my code is only partially belonging to me so I cannot distribute all of them, beg your understanding
    To overcome the delay, I open both Tx and Rx session at the beginning of the code so I don't need to initial and abort session before and after using respectively. It could save a lot of time (I measure the same delay as you shown). I read from WBX application notes (http://files.ettus.com/uhd_docs/manual/html/dboards.html) that if the system is working in the duplex mode, then antenna TX/RX is using for transmission and RX2 is using for reception. I simply tested it and it seems true.
    Since two antennas are working concurrently, the receiving antenna (RX2) can receive packet even it is sent by TX/RX. My problem is, in software level I have used the if structure to make transmission and reception work successively, RX2 can still receive signal sent by TX/RX. That is the real problem. Probably we can write some compensation VI which we can remove it by using the transmitted signal, but I still want to know is there any official solution for it.
    BTW, I use the modulation toolkit. Its demodulation VI is also quite slow.
    Thank you for your reading. I am not a native English speaker, so if my post make you confuse, please let me know and I would like to elaborate it again.

  • How to insert value for composed foreign key?

    My problem when I update or insert to table Ffclient which has link 1-1 with other table ClientLoan by composes primary key loanId and clienId (break table). I auto mapping by Jdeveloper 10g version 10.1.2. In FfClient table has two fields compose foreign key of ClientLoan as loanId and clienId not nullable. In toplink object Ffclient it only has one reference ClientLoan object by clientLoan field, not has two fields loanId and clienId . When I insert or update to database, I can't set value for these two fields direct so I have created new ClientLoan object and set value for composed primary key loanId and clienId, after that set it to object Ffclient. But when I update or insert to database it occurs exception about insert null for two not nullable fields: loanId and clienId.
    Any one has error as mime? Any one help me correct my error.
    Thanks in advance.
    Mapping is:
    ….
    <database-mapping>
    <attribute-name>ffclientCollection</attribute-name>
    <read-only>false</read-only>
    <get-method-name>getFfclientCollection</get-method-name>
    <set-method-name>setFfclientCollection</set-method-name>
    <reference-class>uk.co.lsb.elb.toplink.Ffclient</reference-class>
    <relationship-partner-attribute-name>clientLoan</relationship-partner-attribute-name>
    <is-private-owned>false</is-private-owned>
    <uses-batch-reading>false</uses-batch-reading>
    <indirection-policy>
    <mapping-indirection-policy>
    <type>oracle.toplink.internal.indirection.TransparentIndirectionPolicy</type>
    </mapping-indirection-policy>
    </indirection-policy>
    <container-policy>
    <mapping-container-policy>
    <container-class>oracle.toplink.indirection.IndirectList</container-class>
    <type>oracle.toplink.internal.queryframework.ListContainerPolicy</type>
    </mapping-container-policy>
    </container-policy>
    <source-key-fields>
    <field>LSB.CLIENT_LOAN.CLIENT_ID</field>
    <field>LSB.CLIENT_LOAN.LOAN_ID</field>
    </source-key-fields>
    <target-foreign-key-fields>
    <field>LSB.FFCLIENT.CLIENT_ID</field>
    <field>LSB.FFCLIENT.LOAN_ID</field>
    </target-foreign-key-fields>
    <type>oracle.toplink.mappings.OneToManyMapping</type>
    </database-mapping>
    …..
    <database-mapping>
    <attribute-name>clientLoan</attribute-name>
    <read-only>false</read-only>
    <reference-class>uk.co.lsb.elb.toplink.ClientLoan</reference-class>
    <relationship-partner-attribute-name>ffclientCollection</relationship-partner-attribute-name>
    <is-private-owned>false</is-private-owned>
    <uses-batch-reading>false</uses-batch-reading>
    <indirection-policy>
    <mapping-indirection-policy>
    <type>oracle.toplink.internal.indirection.BasicIndirectionPolicy</type>
    </mapping-indirection-policy>
    </indirection-policy>
    <uses-joining>false</uses-joining>
    <foreign-key-fields>
    <field>LSB.FFCLIENT.CLIENT_ID</field>
    <field>LSB.FFCLIENT.LOAN_ID</field>
    </foreign-key-fields>
    <source-to-target-key-field-associations>
    <association>
    <association-key>LSB.FFCLIENT.LOAN_ID</association-key>
    <association-value>LSB.CLIENT_LOAN.LOAN_ID</association-value>
    </association>
    <association>
    <association-key>LSB.FFCLIENT.CLIENT_ID</association-key>
    <association-value>LSB.CLIENT_LOAN.CLIENT_ID</association-value>
    </association>
    </source-to-target-key-field-associations>
    <type>oracle.toplink.mappings.OneToOneMapping</type>
    </database-mapping>

    Yes, many thanks for you reply.
    My project has many layer (include DAO + EJB + BO + WEB).
    Toplink objects which are auto created by TopLink has only using in DAO and EJB layer, then toplink objects are transfer to Bean objects (valueObject) which are contain primitive java type as int, long, double... not java wrapper object as Integer, Long, Double... Bean objects are using from EJB to WEB layer. So when set value to bean object from toplink object I sometime don't set all reference toplink object to reference object of bean (although bean has references bean object as toplink object) because there are too big. So when I update data from WEB layer to EJB layer, before update to database, I must get fill all data for foreign key of update object by create new reference toplink object, add reference_id to this object and set it to update object. I waste a lot of time, its very handwork and tire. Are you has any solution about this problem?
    Thank in advanced.
    ThangNQ

  • How to insert the data using matrix

    Hi
      All how to insert the data using matrix feild
      plz help me
       thanks
        Loy

    Hi Loy,
    The best way to fill an entire matrix is to use a DBDatasource, here is some sample code:
    Dim oForm As SAPbouiCOM.Form
    oForm = SBO_App.Forms.Item("YourFormTypeID")
            '1. Add a DBDataSource to the form
            oForm.DataSources.DBDataSources.Add("OUSR")
            Dim oColumnDBS As SAPbouiCOM.Column
            Dim oColumnUDS As SAPbouiCOM.Column
            Dim i As Integer
            Dim GenEdt As SAPbouiCOM.EditText
            Dim oMatrix As SAPbouiCOM.Matrix
            Dim oColumns As SAPbouiCOM.Columns
            Dim oDBDataSource As SAPbouiCOM.DBDataSource
            oMatrix = oForm.Items.Item("7").Specific
            oColumns = oMatrix.Columns
            '2. DBDataSource: Binding a field / alias of the table to a column
            oColumnDBS = oColumns.Item("V_1")
            oColumnDBS.DataBind.SetBound(True, "OUSR", "U_NAME")
            '3. getting the data sources bound to the form
            oDBDataSource = oForm.DataSources.DBDataSources.Item("OUSR")
            oMatrix.Clear()
            ' Querying the DB Data source
            oDBDataSource.Query()
            ' Adding the data to the matrix
            oMatrix.LoadFromDataSource()
    When you want to fill a specific field use :
    GenEdt = oMatrix.Columns.Item("V_2").Cells.Item(1).Specific
                    GenEdt.String = "Hello"

  • Performance degradation when using foreign keys

    Hi,
    I face drastic performance degradation when I add foreign keys to a table and perform insert / update on that table.
    I have a row store table to  which I need to insert around 1,50,000 records.
    If the table has no foreign key reference it takes maximum of 5 seconds but if the same table has references to other tables (in my case there are 3 references), the processing speed reduces drastically to 2 minutes.
    Is there any solution / best practice that can help me in gaining performance (processing speed) in this situation?
    Thanks
    S.Srivatsan

    Hi Sri,
    When you perform one insert in any database table which is having foreign key relationships, it will check the corresponding parent tables to check whether the master data is available or not. If your table is having 2 foreign key relationship, it happen twice per insert. Hence the performance will degrade. This is one of the reasons why ECC  doesn't establish foreign key relationship in the back end database. The case is not just for INSERT, for UPDATE & DELETE the same is applicable.
    Sreehari

  • How is the Raw data used in iPhoto. I currently shoot both jpeg and raw and import them both into iPhoto.

    How is the Raw data used in iPhoto? I currently shoot both jpeg and raw and import them both into iPhoto. What do I gain by collecting Raw data?
    Thanks

    You get more parameters for making adjustments to the image. This is not really an iPhoto question but more a general photography one. In rather simple terms here's how a digital camera works:
    You expose an image. A lot of data is gathered in by the sensor. But it's just a bug lump of data and not very useful in that form.
    In cameras that shoot jpeg that mass of data is interpreted/processed into an actual image, and the image is stored in a jpeg file. (that's a process broadly analogous to developing a film). The decisions that go into making that interpretation are all made by an engineer somewhere, back when the camera was developed.
    If you shoot Raw, then what you do is take that mass of data, and rather than working to the decisions made by that engineer, you develop the shot - you run the digital darkroom.
    Why would you do this? Take on all this extra work? Well one of three reasons: a: you think you can do a better job than that engineer. b: you just prefer the result you get when you develop yourself or c: you're a hopeless shooter and raw means you have more options to fix the mistakes you made in the camera. (That's why I do it.)
    Here endeth the two dollar tour. So, basically, if you're happy with what your camera produces in Jpeg then there's really no need to shoot Raw.
    There's no need at all to shoot Raw+Jpeg as iPhoto creates a jpeg preview when you import, so you're just wasting space.

  • How to display today date using formcalc

    Hi all,
    how to display today date using formcalc, eg April 20, 2009?
    Thanskks

    Num2Date(Date(), "DD/MMM/YYYY", "de_GB")

  • Not use foreign keys.

    I would like to know if is it bad if I don't want to use foreign keys? is it just a constraint? Is it useful? If I wont use delete on cascade for example is it mandatory to use foreign keys? Please help me with this doubt.
    Thanks.

    A Small example:
    DROP TABLE T_TABLES ;
    CREATE TABLE T_TABLES AS
    SELECT ROWNUM AS ID, OWNER, TABLE_NAME
    FROM   ALL_TABLES;
    ALTER TABLE T_TABLES ADD CONSTRAINTS PK_TABLES PRIMARY KEY(ID);
    DROP TABLE T_TABLE_COLUMNS ;
    CREATE TABLE T_TABLE_COLUMNS AS
      SELECT T.ID, TC.OWNER, TC.TABLE_NAME, TC.COLUMN_NAME, TC.DATA_TYPE
      FROM   ALL_TAB_COLS TC
               JOIN T_TABLES T ON (T.OWNER = TC.OWNER AND T.TABLE_NAME = TC.TABLE_NAME)
      WHERE  T.TABLE_NAME NOT IN ('T_TABLES', 'T_TABLE_COLUMNS'); -- EXCEPT THESE TWO TABLES
    EXPLAIN PLAN FOR
    SELECT *
    FROM   T_TABLE_COLUMNS
    WHERE  ID IN (SELECT ID FROM T_TABLES);
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
    | Id  | Operation          | Name            | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |                 | 27823 |  3586K|    63   (7)| 00:00:01 |
    |   1 |  NESTED LOOPS      |                 | 27823 |  3586K|    63   (7)| 00:00:01 |
    |   2 |   TABLE ACCESS FULL| T_TABLE_COLUMNS | 27823 |  3233K|    60   (2)| 00:00:01 |
    |*  3 |   INDEX UNIQUE SCAN| PK_TABLES       |     1 |    13 |     0   (0)| 00:00:01 |
    --ADD FOREIGN KEY
    ALTER TABLE T_TABLE_COLUMNS ADD CONSTRAINT FK_TABLES FOREIGN KEY(ID) REFERENCES T_TABLES(ID);
    -- SAME QUERY AGAIN
    EXPLAIN PLAN FOR
    SELECT *
    FROM   T_TABLE_COLUMNS
    WHERE  ID IN (SELECT ID FROM T_TABLES);
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
    -- NO JOIN ANYMORE
    | Id  | Operation         | Name            | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |                 | 27823 |  3233K|    60   (2)| 00:00:01 |
    |*  1 |  TABLE ACCESS FULL| T_TABLE_COLUMNS | 27823 |  3233K|    60   (2)| 00:00:01 |
    -------------------------------------------------------------------------------------FKs can even save you from joins.

  • How to fetch MIR4 data based on MB51 refrence number

    hi Experts.
    i want to fetch MIR4 data based on MB51 refrence number.
    I want to fetch below fileds in MIR4 TCODE.
    1.  RBKP-BELNR (Invoice Document NUMBER)
    2. DRSEG-MENGE ( quantity )
    3. DRSEG-WRBTR ( Amount in document currency)
    As mentioned above DRSEG is structure.
    please help me how to fetch 3 data fileds based on my MB51 refrence.( mkpf-xblnr ).
    In MIR4 , Number of External Delivery Note( DRSEG-XBLNR ) is same as my MB51 refrence ( mkpf-xblnr).
    This is the only link avilable to fetch above 3 fields.
    kindly give any suggestions .
    thanks & regards,
    hari priya

    Hi ,
    can anybody give me suggestions .
    What is the table name for fetching above 3 fileld data  . 
    DRSEG  is structure .
    Thanks & regards,
    Hari priya

Maybe you are looking for