Db link to select only one table

Dear all,
I want to create a DB link in my local DB to access only one table in the remote DB .
User a in local DB
User y in remote DB ..Y has got 200 tables..
Can I create a DB link in my local DB as user a and access only one table in remote DB (Y schema)
Is this possible ?
Please let me know If I didn't make this clear ?
Kai

You need to create a new user in the remote db, with access to only 1 table.
The database link connects to this user.
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • Access ODBC link table list ONLY one table

    Hi all,
    I try to link Oracle tables from Microsoft Access via Link Table. The return list show ONLY one table, which by right it should show ALL tables in my Database.
    What is the problem here? Anyone encounter this same problem before.
    My database is very large, over 10,000 tables. Can it be because of resources issues?
    Pls help

    Are they all real tables are or some of them perhspa VIEWS, SYNONYMS or the like? The default list is for just tables. I have seen cases where a really large list would make Access puke, but this generally results in getting nothing listed.

  • Selecting only one row at a time

    Hi experts,
    i have following doubt regarding selecting rows from a db:
    Is there any way of selecting only one row AT A TIME from a dabase just to collect the data in rows instead of in a unique document containing all the rows?
    I would like you to ellaborate on this as i need to send only one row to the IE, and then other row, and so on... without throwing any error!
    I have seen that there are SELECT SINGLE and SELECT UP TO 1 ROW, but these two methods are only useful when retrieving only one row, and that does not match my requirements. I need to process all the rows but one by one..
    I know that we can use the receiver jdbc adapter as if it was a sender by means of its specific datatype, but how to do it row by row??
    Hope i had explained well..
    Thanks in advance and best regards,
    David

    Hi kiran,
    Yes, my table has 5 not null fields but i am selecting and updating fixes values so i think that I will definetely go for the next solution:
    SELECT * FROM t1 WHERE status='0' and ROWNUM<2;
    UPDATE t1 SET status='1' WHERE status='0' and ROWNUM<2;
    My only concern is if the update will take the same row that the select.... BTW, I think it will
    ..What do you guys think?
    I ve been trying to operate with your proposed queries but i received some errors. Your queries are very interesting but i think that with the above ones i meet my requirements as the status field will be 0 for not processed rows and 1 for precessed ones (and the update will look for the row that meets the same 'where' clause than the select, and then, and only then, it will set status='1').
    The only thing i have to care about is what i questioned before.
    Thanks a lot and best regards,
    David

  • How to select only one record at a time in ALV

    Hi all,
    I have to use ALV report.  Each record on the report output should have a button (or radio button) which will allow the record to be selected.  My requirement is to select only one record at a time.
    please guide me how to proceed further.
    regards
    manish

    hi
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/sampleCheckBoxProgram
    Regards
    Pavan

  • "Can I select only one page from a PDF document to convert to an excel doc. ?"

    "Can I select only one page from a PDF document to convert to an excel doc. ?"

    No, so extract one page, then convert.

  • Select only one entry - Message no. F5A156

    Dear Sir,
    Client require deleting multiple entries from petty cash book (FBCJ)
    When we are selecting multiple line items and pressing Shift - F2 the given bellow message appears.
    Select only one entry
    Message no. F5A156
    We require deleting more than 1500 payment entries from Petty cash book
    We have list of those accounting document that needs to be Reversed/Deleted from FBCJ
    Please Guide me as to how can we Mass Delete these entries.
    Regards
    Chirag Shah

    Dear Chirag,
    please read the SAP note 529984 that can help.
    Mauri

  • Whenever I click on a link with the middle-mouse button, it opens multiple copies the link instead of only one (Version is 4.0.1).

    Whenever I click on a link with the middle-mouse button, it opens multiple copies the link instead of only one (Version is 4.0.1). I have checked the mouse in other browsers and it doesn't behave oddly in them.

    Does that happen if you {Ctrl + Click} the same hyperlinks?

  • Oracle database link to MySQL select only one row

    Hello,
    I have created a connection from the Oracle batabase 11.2 to a MySQL database via database link. The following statement shows, that 35 rows are in the mySQL table:
    SQL>  select count(*) from "main_pages"@MOREWEB;
      COUNT(*)
            35
    But a normal select statement only return 1 row.
    SQL> select "subject" from "main_pages"@MOREWEB;
    subject
    Übersicht: Referenzen
    I am using the mysql-connector-odbc-3.51.30-winx64 driver. A newer version cann't be installed because on Windows Server 2008 R2 I get an error with an missing dll-file. The DataDirect-ODBC-driver is not possible, because we like to use the free MySQL-database an DataDirect only support the enterprise edition.
    I also have tried to limit the HS_OPEN_CURSORS or dont limit the HS_FDS_FETCH_ROWS, but there is no difference in the result. I always get only one row.
    HS Init.ora
    # This is a sample agent init file that contains the HS parameters that are
    # needed for the Database Gateway for ODBC
    # HS init parameters
    HS_FDS_CONNECT_INFO = moreweb
    HS_FDS_TRACE_LEVEL = ON
    HS_FDS_FETCH_ROWS=1
    # Environment variables required for the non-Oracle system
    #set <envvar>=<value>
    HS tracefile
    Oracle Corporation --- MITTWOCH   NOV 05 2014 13:56:22.066
    Heterogeneous Agent Release
    11.2.0.1.0
    Oracle Corporation --- MITTWOCH   NOV 05 2014 13:56:22.066
        Version 11.2.0.1.0
    HOSGIP for "HS_FDS_TRACE_LEVEL" returned "ON"
    HOSGIP for "HS_OPEN_CURSORS" returned "50"
    HOSGIP for "HS_FDS_FETCH_ROWS" returned "1"
    HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536"
    HOSGIP for "HS_NLS_NUMERIC_CHARACTER" returned ".,"
    HOSGIP for "HS_KEEP_REMOTE_COLUMN_SIZE" returned "OFF"
    HOSGIP for "HS_FDS_DELAYED_OPEN" returned "TRUE"
    HOSGIP for "HS_FDS_WORKAROUNDS" returned "0"
    HOSGIP for "HS_FDS_MBCS_TO_GRAPHIC" returned "FALSE"
    HOSGIP for "HS_FDS_GRAPHIC_TO_MBCS" returned "FALSE"
    HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
    HOSGIP for "HS_FDS_TRANSACTION_LOG" returned "HS_TRANSACTION_LOG"
    HOSGIP for "HS_FDS_TIMESTAMP_MAPPING" returned "DATE"
    HOSGIP for "HS_FDS_DATE_MAPPING" returned "DATE"
    HOSGIP for "HS_FDS_CHARACTER_SEMANTICS" returned "FALSE"
    HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
    HOSGIP for "HS_FDS_RESULTSET_SUPPORT" returned "FALSE"
    HOSGIP for "HS_FDS_RSET_RETURN_ROWCOUNT" returned "FALSE"
    HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
    HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
    using mpgw as default value for "HS_FDS_DEFAULT_OWNER"
    HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
    SQL text from hgopars, id=1, len=36 ...
         00: 53454C45 43542043 4F554E54 282A2920  [SELECT COUNT(*) ]
         10: 46524F4D 20606D61 696E5F70 61676573  [FROM `main_pages]
         20: 60204131                             [` A1]
    Deferred open until first fetch.
    Performing delayed open.
    SQL text from hgopars, id=1, len=40 ...
         00: 53454C45 43542041 312E6073 75626A65  [SELECT A1.`subje]
         10: 63746020 46524F4D 20606D61 696E5F70  [ct` FROM `main_p]
         20: 61676573 60204131                    [ages` A1]
    Deferred open until first fetch.
    Performing delayed open.
    Please can help me someone.
    Thanks.
    Bianca

    mxallen wrote:
    Bianca,
    If you log directly into MySQL and issue the same query (select "subject" from "main_pages";) what data is returned?
    I looks to me that you count is the number of rows in the entire table "main_pages"
    while you select is for the data in the "subject" column only.
    This seems to indicate that you have just one row in that subject column.
    Regards,
    Matt
    WHAATT?
    What do you mean by "just one row in that subject column"?
    That makes no sense at all.  A row is a row.  A column is a part of a row.  All rows have all columns, though not all columns of all rows will necessarily have an assigned value.  Lacking a WHERE clause to filter rows, any SELECT should return all rows.

  • I can select only one row in my table why?

    hi.. i have just started cold fusion. i am trying to connect
    my database. its ok. but i can see only one row? why?
    ff4.cfm =>
    <cfquery name = "myFirstSelect" datasource="calisma">
    select * from fuat1
    </cfquery>
    ff5.cfm =>
    <cfinclude template="ff4.cfm">
    <table>
    <cfoutput query="myFirstSelect">
    <tr height="20" onMouseOver="this.bgColor='#colorlist#';"
    onMouseOut="this.bgColor='#colorrow#';" bgcolor="#colorrow#">
    <td>AD</td>
    <td>SOYAD</td>
    <td>NUMBER</td>
    </tr>
    <tr height="20" onMouseOver="this.bgColor='#colorlist#';"
    onMouseOut="this.bgColor='#colorrow#';" bgcolor="#colorrow#">
    <td>#AD#</td>
    <td>#SOYAD#</td>
    <td>#NUMBER#</td>
    </tr>
    </table>
    </cfoutput>
    i can retrieve only one row. Cannot access the second row of
    table. What can I do? What can I reach the second row?
    thankx

    ok i solve this problem thanx

  • Am inserting only one table in a join table view

    am in Jdeveloper 11.1.2.1.0
    hi i have the following view am only able to insert in one table,which is SMS_PARTY_ADDRESS,am not able to insert to the othe join table which is property, my view is
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="smsProp_partyAddress"
      Version="11.1.2.60.81"
      BindingStyle="OracleName"
      CustomQuery="true"
      PageIterMode="Full"
      UseGlueCode="false">
      <DesignTime>
        <Attr Name="_isExpertMode" Value="true"/>
      </DesignTime>
      <Properties>
        <SchemaBasedProperties>
          <LABEL
            ResId="sms1100.smsProp_partyAddress_LABEL"/>
        </SchemaBasedProperties>
      </Properties>
      <ViewAccessor
        Name="Sub_lov1"
        ViewObjectName="sms1100.Sub_lov"
        RowLevelBinds="true"/>
      <ListBinding
        Name="LOV_Town"
        ListVOName="Sub_lov1"
        ListRangeSize="-1"
        ComboRowCountHint="10"
        NullValueFlag="none"
        MRUCount="0">
        <AttrArray Name="AttrNames">
          <Item Value="Town"/>
        </AttrArray>
        <AttrArray Name="DerivedAttrNames">
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="TowId"/>
        </AttrArray>
        <AttrArray Name="ListAttrNames">
          <Item Value="Town"/>
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="Id"/>
        </AttrArray>
        <AttrArray Name="ListDisplayAttrNames">
          <Item Value="Town"/>
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="DsdRegion"/>
          <Item Value="ServiceDeliveryArea"/>
        </AttrArray>
        <DisplayCriteria/>
      </ListBinding>
      <SQLQuery><![CDATA[SELECT SmsPartyAddress.ADDRESS_LINE1,
           SmsPartyAddress.ID,
           SmsPartyAddress.ADDRESS_LINE2,
           SmsPartyAddress.ADDRESS_LINE3,
           SmsPartyAddress.ADDRESS_LINE4,
           SmsPartyAddress.ADDRESS_TYPE_IND,
           SmsPartyAddress.PAR_ID,
           SmsPartyAddress.PROP_ID,
           SmsPartyAddress.START_DT,
           SmsProperties.TOW_ID,
           SmsProperties.ID AS ID1,
           SmsProperties.ADDRESS_LINE,
           SmsProperties.ERF_NO,
           SmsProperties.WAR_ID,
           SmsProperties.ZONE,
            DECODE(TOW1.TOWN,NULL,TOW.TOWN,TOW1.TOWN)TOWN ,
           TOW.TOWN SUBURB,
           POSTAL_CODE
    FROM SMS_PARTY_ADDRESS SmsPartyAddress, SMS_PROPERTIES SmsProperties,
    SMS_TOWNS TOW
        ,SMS_TOWNS TOW1
        ,SMS_POSTAL_CODES PCOD
    WHERE SmsPartyAddress.PROP_ID = SmsProperties.ID(+)
    and TOW.PCOD_ID = PCOD.ID
        AND TOW.TOW_ID = TOW1.ID (+)
        --and TOW1.ID = SMSPROPERTIES.TOW_ID(+)
        and TOW.ID = SMSPROPERTIES.TOW_ID
        and SmsPartyAddress.prop_id = SmsProperties.id
         CONNECT BY PRIOR TOW.TOW_ID = TOW.ID]]></SQLQuery>
      <EntityUsage
        Name="SmsPartyAddress"
        Entity="sms1100.SmsPartyAddress"/>
      <EntityUsage
        Name="SmsProperties"
        Entity="sms1100.SmsProperties"
        Association="sms1100.proppaddAssociation"
        AssociationEnd="sms1100.proppaddAssociation.SmsProperties"
        SourceUsage="sms1100.smsProp_partyAddress.SmsPartyAddress"
        ReadOnly="true"
        Reference="true"
        DeleteParticipant="false"
        JoinType="LEFT OUTER JOIN">
        <DesignTime>
          <AttrArray Name="_srcAttributes">
            <Item Value="sms1100.SmsPartyAddress.PropId"/>
          </AttrArray>
          <AttrArray Name="_dstAttributes">
            <Item Value="sms1100.SmsProperties.Id"/>
          </AttrArray>
        </DesignTime>
      </EntityUsage>
      <ViewAttribute
        Name="AddressLine1"
        PrecisionRule="true"
        EntityAttrName="AddressLine1"
        EntityUsage="SmsPartyAddress"
        AliasName="ADDRESS_LINE1"/>
      <ViewAttribute
        Name="Id"
        IsUpdateable="while_insert"
        PrecisionRule="true"
        EntityAttrName="Id"
        EntityUsage="SmsPartyAddress"
        AliasName="ID"/>
      <ViewAttribute
        Name="AddressLine2"
        PrecisionRule="true"
        EntityAttrName="AddressLine2"
        EntityUsage="SmsPartyAddress"
        AliasName="ADDRESS_LINE2"/>
      <ViewAttribute
        Name="AddressLine3"
        PrecisionRule="true"
        EntityAttrName="AddressLine3"
        EntityUsage="SmsPartyAddress"
        AliasName="ADDRESS_LINE3"/>
      <ViewAttribute
        Name="AddressLine4"
        PrecisionRule="true"
        EntityAttrName="AddressLine4"
        EntityUsage="SmsPartyAddress"
        AliasName="ADDRESS_LINE4"/>
      <ViewAttribute
        Name="AddressTypeInd"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="AddressTypeInd"
        EntityUsage="SmsPartyAddress"
        AliasName="ADDRESS_TYPE_IND"/>
      <ViewAttribute
        Name="ParId"
        PrecisionRule="true"
        EntityAttrName="ParId"
        EntityUsage="SmsPartyAddress"
        AliasName="PAR_ID"/>
      <ViewAttribute
        Name="PropId"
        PrecisionRule="true"
        EntityAttrName="PropId"
        EntityUsage="SmsPartyAddress"
        AliasName="PROP_ID"/>
      <ViewAttribute
        Name="StartDt"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="StartDt"
        EntityUsage="SmsPartyAddress"
        AliasName="START_DT"/>
      <ViewAttribute
        Name="TowId"
        PrecisionRule="true"
        EntityAttrName="TowId"
        IsUpdateable="true"
        EntityUsage="SmsProperties"
        AliasName="TOW_ID"
        IsPersistent="true"/>
      <ViewAttribute
        Name="Id1"
        IsUpdateable="while_insert"
        PrecisionRule="true"
        EntityAttrName="Id"
        EntityUsage="SmsProperties"
        AliasName="ID1"/>
      <ViewAttribute
        Name="AddressLine"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="AddressLine"
        EntityUsage="SmsProperties"
        AliasName="ADDRESS_LINE"/>
      <ViewAttribute
        Name="ErfNo"
        IsUnique="true"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="ErfNo"
        EntityUsage="SmsProperties"
        AliasName="ERF_NO"/>
      <ViewAttribute
        Name="WarId"
        PrecisionRule="true"
        EntityAttrName="WarId"
        EntityUsage="SmsProperties"
        AliasName="WAR_ID"/>
      <ViewAttribute
        Name="Zone"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="Zone"
        EntityUsage="SmsProperties"
        AliasName="ZONE"/>
      <ViewAttribute
        Name="Town"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="60"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="TOWN"
        Expression="TOWN"
        SQLType="VARCHAR"
        LOVName="LOV_Town">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="60"/>
        </DesignTime>
        <Properties>
          <SchemaBasedProperties>
            <CONTROLTYPE
              Value="combo_lov"/>
          </SchemaBasedProperties>
        </Properties>
      </ViewAttribute>
      <ViewAttribute
        Name="Suburb"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="60"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="SUBURB"
        Expression="SUBURB"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="60"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="PostalCode"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="4"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="POSTAL_CODE"
        Expression="POSTAL_CODE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="4"/>
        </DesignTime>
      </ViewAttribute>
      <AttrArray Name="KeyAttributes">
        <Item Value="Id"/>
      </AttrArray>
      <ResourceBundle>
        <PropertiesBundle
          PropertiesFile="SmsFrontService.SmsFrontServiceBundle"/>
      </ResourceBundle>
    </ViewObject>i what to insert in both table partyAddress and propertyaddress,the property table the Updateable="never" and is disable,am not able to set is to always

    use this method but the column i still disable
    <EntityUsage
    Name="SmsProperties"
    Entity="sms1100.SmsProperties"
    Association="sms1100.proppaddAssociation"
    AssociationEnd="sms1100.proppaddAssociation.SmsProperties"
    SourceUsage="sms1100.smsProp_partyAddress.SmsPartyAddress"
    Reference="true"
    ReadOnly="false"
    DeleteParticipant="false"
    JoinType="LEFT OUTER JOIN">
    public class smsProp_partyAddressImpl extends ViewObjectImpl {
        protected void create(AttributeList attributeList) {
        // The view row will already have created "blank" entity instances
          SmsPropertiesImpl newProperty = new SmsPropertiesImpl();
        SmsPartyAddressImpl newPostal = new SmsPartyAddressImpl();
        //SmsPropertiesViewImpl newProperty = getSmsPropertiesView2();
        //SmsPartyAddressViewImpl  newPostal = getSmsPartyAddressView1();
        //SmsPropertiesImpl newProperty = getSmsPropertiesView2();
        //SmsPartyAddressImpl  newPostal = getSmsPartyAddressView1();
        try {
        // Let postal Address "blank" entity instance to do programmatic defaulting
        newProperty.create(attributeList);
        // Let postalAddress "blank" entity instance to do programmatic
        // defaulting passing in new SmsPropertiesImpl instance so its attributes
        // are available to the SmsPartyAddressImpl's create method.
        newPostal.create(newProperty);
        catch (JboException ex) {
        newProperty.revert();
        newPostal.revert();
        throw ex;
        catch (Exception otherEx) {
        newProperty.revert();
        newPostal.revert();
        throw new RowCreateException(true /* EO Row? */,
        "SmsProperties" /* EO Name */,
        otherEx /* Details */);
    }but the updatable="Always"
    the view is
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="smsProp_partyAddress"
      Version="11.1.2.60.81"
      BindingStyle="OracleName"
      CustomQuery="true"
      PageIterMode="Full"
      UseGlueCode="false"
      RowClass="sms1100.smsProp_partyAddressRowImpl"
      ComponentClass="sms1100.smsProp_partyAddressImpl"
      RowInterface="sms1100.common.smsProp_partyAddressRow"
      ClientRowProxyName="sms1100.client.smsProp_partyAddressRowClient">
      <DesignTime>
        <Attr Name="_isExpertMode" Value="true"/>
        <Attr Name="_codeGenFlag2" Value="Access|Coll|Prog|VarAccess"/>
        <Attr Name="_isCodegen" Value="true"/>
      </DesignTime>
      <Properties>
        <SchemaBasedProperties>
          <LABEL
            ResId="sms1100.smsProp_partyAddress_LABEL"/>
        </SchemaBasedProperties>
      </Properties>
      <ViewAccessor
        Name="Sub_lov1"
        ViewObjectName="sms1100.Sub_lov"
        RowLevelBinds="true"/>
      <ListBinding
        Name="LOV_Town"
        ListVOName="Sub_lov1"
        ListRangeSize="-1"
        ComboRowCountHint="10"
        NullValueFlag="none"
        MRUCount="0">
        <AttrArray Name="AttrNames">
          <Item Value="Town"/>
        </AttrArray>
        <AttrArray Name="DerivedAttrNames">
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="TowId"/>
        </AttrArray>
        <AttrArray Name="ListAttrNames">
          <Item Value="Town"/>
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="Id"/>
        </AttrArray>
        <AttrArray Name="ListDisplayAttrNames">
          <Item Value="Town"/>
          <Item Value="Suburb"/>
          <Item Value="PostalCode"/>
          <Item Value="DsdRegion"/>
          <Item Value="ServiceDeliveryArea"/>
        </AttrArray>
        <DisplayCriteria/>
      </ListBinding>
      <SQLQuery><![CDATA[SELECT SmsPartyAddress.ADDRESS_LINE1,
           SmsPartyAddress.ID,
           SmsPartyAddress.ADDRESS_LINE2,
           SmsPartyAddress.ADDRESS_LINE3,
           SmsPartyAddress.ADDRESS_LINE4,
           SmsPartyAddress.ADDRESS_TYPE_IND,
           SmsPartyAddress.PAR_ID,
           SmsPartyAddress.PROP_ID,
           SmsPartyAddress.START_DT,
           SmsProperties.TOW_ID,
           SmsProperties.ID AS ID1,
           SmsProperties.ADDRESS_LINE,
           SmsProperties.ERF_NO,
           SmsProperties.WAR_ID,
           SmsProperties.ZONE,
            DECODE(TOW1.TOWN,NULL,TOW.TOWN,TOW1.TOWN)TOWN ,
           TOW.TOWN SUBURB,
           POSTAL_CODE
    FROM SMS_PARTY_ADDRESS SmsPartyAddress, SMS_PROPERTIES SmsProperties,
    SMS_TOWNS TOW
        ,SMS_TOWNS TOW1
        ,SMS_POSTAL_CODES PCOD
    WHERE SmsPartyAddress.PROP_ID = SmsProperties.ID(+)
    and TOW.PCOD_ID = PCOD.ID
        AND TOW.TOW_ID = TOW1.ID (+)
        --and TOW1.ID = SMSPROPERTIES.TOW_ID(+)
        and TOW.ID = SMSPROPERTIES.TOW_ID
        and SmsPartyAddress.prop_id = SmsProperties.id
         CONNECT BY PRIOR TOW.TOW_ID = TOW.ID]]></SQLQuery>
      <EntityUsage
        Name="SmsPartyAddress"
        Entity="sms1100.SmsPartyAddress"/>
      <EntityUsage
        Name="SmsProperties"
        Entity="sms1100.SmsProperties"
        Association="sms1100.proppaddAssociation"
        AssociationEnd="sms1100.proppaddAssociation.SmsProperties"
        SourceUsage="sms1100.smsProp_partyAddress.SmsPartyAddress"
        Reference="true"
        ReadOnly="false"
        DeleteParticipant="false"
        JoinType="LEFT OUTER JOIN">
        <DesignTime>
          <AttrArray Name="_srcAttributes">
            <Item Value="sms1100.SmsPartyAddress.PropId"/>
          </AttrArray>
          <AttrArray Name="_dstAttributes">
            <Item Value="sms1100.SmsProperties.Id"/>
          </AttrArray>
        </DesignTime>
      </EntityUsage>
      <ViewAttribute
        Name="AddressLine1"
        PrecisionRule="true"
        EntityAttrName="AddressLine1"
        EntityUsage="SmsPartyAddress"
        AliasName="ADDRESS_LINE1"/>
      <ViewAttribute
        Name="Id"
        IsUpdateable="while_insert"
        PrecisionRule="true"
        EntityAttrName="Id"
        EntityUsage="SmsPartyAddress"
        AliasName="ID"/>
      <ViewAttribute
        Name="AddressLine2"
        PrecisionRule="true"
        EntityAttrName="AddressLine2"
        EntityUsage="SmsPartyAddress"
        AliasName="ADDRESS_LINE2"/>
      <ViewAttribute
        Name="AddressLine3"
        PrecisionRule="true"
        EntityAttrName="AddressLine3"
        EntityUsage="SmsPartyAddress"
        AliasName="ADDRESS_LINE3"/>
      <ViewAttribute
        Name="AddressLine4"
        PrecisionRule="true"
        EntityAttrName="AddressLine4"
        EntityUsage="SmsPartyAddress"
        AliasName="ADDRESS_LINE4"/>
      <ViewAttribute
        Name="AddressTypeInd"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="AddressTypeInd"
        EntityUsage="SmsPartyAddress"
        AliasName="ADDRESS_TYPE_IND"/>
      <ViewAttribute
        Name="ParId"
        PrecisionRule="true"
        EntityAttrName="ParId"
        EntityUsage="SmsPartyAddress"
        AliasName="PAR_ID"/>
      <ViewAttribute
        Name="PropId"
        PrecisionRule="true"
        EntityAttrName="PropId"
        EntityUsage="SmsPartyAddress"
        AliasName="PROP_ID"/>
      <ViewAttribute
        Name="StartDt"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="StartDt"
        EntityUsage="SmsPartyAddress"
        AliasName="START_DT"/>
      <ViewAttribute
        Name="TowId"
        PrecisionRule="true"
        EntityAttrName="TowId"
        EntityUsage="SmsProperties"
        AliasName="TOW_ID"/>
      <ViewAttribute
        Name="Id1"
        IsUpdateable="while_insert"
        PrecisionRule="true"
        EntityAttrName="Id"
        EntityUsage="SmsProperties"
        AliasName="ID1"/>
      <ViewAttribute
        Name="AddressLine"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="AddressLine"
        EntityUsage="SmsProperties"
        AliasName="ADDRESS_LINE"/>
      <ViewAttribute
        Name="ErfNo"
        IsUnique="true"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="ErfNo"
        EntityUsage="SmsProperties"
        AliasName="ERF_NO"/>
      <ViewAttribute
        Name="WarId"
        PrecisionRule="true"
        EntityAttrName="WarId"
        EntityUsage="SmsProperties"
        AliasName="WAR_ID"/>
      <ViewAttribute
        Name="Zone"
        IsNotNull="true"
        PrecisionRule="true"
        EntityAttrName="Zone"
        EntityUsage="SmsProperties"
        AliasName="ZONE"/>
      <ViewAttribute
        Name="Town"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="60"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="TOWN"
        Expression="TOWN"
        SQLType="VARCHAR"
        LOVName="LOV_Town">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="60"/>
        </DesignTime>
        <Properties>
          <SchemaBasedProperties>
            <CONTROLTYPE
              Value="combo_lov"/>
          </SchemaBasedProperties>
        </Properties>
      </ViewAttribute>
      <ViewAttribute
        Name="Suburb"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="60"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="SUBURB"
        Expression="SUBURB"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="60"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="PostalCode"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="4"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="POSTAL_CODE"
        Expression="POSTAL_CODE"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="4"/>
        </DesignTime>
      </ViewAttribute>
      <AttrArray Name="KeyAttributes">
        <Item Value="Id"/>
      </AttrArray>
      <ResourceBundle>
        <PropertiesBundle
          PropertiesFile="SmsFrontService.SmsFrontServiceBundle"/>
      </ResourceBundle>
    </ViewObject>am also geting this error in my view after i set readOnly="false"
    Remove updateable flag from entity usage or mark attributes as key attributes for this entity usage
    i follow your link

  • How to select only one row

    hello,
    i've got a select query which returns a couple of rows.
    now i would like for the query to return only one row (the first match it can find).
    how do i do that?
    thank you!
    my sample of my data as below , the first and seconde record is equal and i want to display all the colomn for the first row and ignore the second row .
    84A8E46E8C97     9410     20110812
    84A8E46E8C97     9420     20110813
    84A8E46E8C6E     9410     20110816
    84A8E46E8AFA     9400     20110819

    876602 wrote:
    my sample of my data as below , the first and seconde record is equal and i want to display all the colomn for the first row and ignore the second rowThere is no row order in relational database tables. Same query canreturn rows in different order next time you run it unless you specify ORDER BY. Only ORDER BY guarantees order, so when you say first row/second row you must provide ordering criteria.
    SY.

  • Need programming help: Three Items selected, only one item displays.

    All the code is below.
    My client has a beach-wear website. It is VERY simple with three pages: Index, Order, and Invoice Page. If customers select the checkbox in front of three items, only one item is displayed on the invoice page. Why aren't all three displayed? I am new to programming:
    //INDEX PAGE:
    <title>Beachwear Title</title>
    <body bgcolor="#FFFFFF">
    <p> </p>
    <form name="form1" method="get" action="jserv/Search.jsp">
    <table width="52%" border="1">
    <tr>
    <td width="20%">Enter Color:</td>
    <td width="80%">
    <input type="text" name="txtColor" size="30" maxlength="20">
    </td>
    </tr>
    </table>
    <p>
    <input type="submit" name="Submit" value="Color">
    </p>
    </form>
    <p> </p>
    //SEARCH PAGE:
    <%@page language="java" import="java.sql.*"%>
    <%@ include file="../Connections/connBeachwear.jsp" %>
    <%
    String rsBeachwear__varColor = "%";
    if (request.getParameter ("txtColor") !=null) {rsBeachwear__varColor = (String)request.getParameter ("txtColor");}
    %>
    <%
    Driver DriverrsBeachwear = (Driver)Class.forName(MM_connBeachwear_DRIVER).newInstance();
    Connection ConnrsBeachwear = DriverManager.getConnection(MM_connBeachwear_STRING,MM_connBeachwear_USERNAME,MM_connBeachwear_PASSWORD);
    PreparedStatement StatementrsBeachwear = ConnrsBeachwear.prepareStatement("SELECT ID, Item, Color, Size FROM Beachwear WHERE Color LIKE '%" + rsBeachwear__varColor + "%';");
    ResultSet rsBeachwear = StatementrsBeachwear.executeQuery();
    boolean rsBeachwear_isEmpty = !rsBeachwear.next();
    boolean rsBeachwear_hasData = !rsBeachwear_isEmpty;
    Object rsBeachwear_data;
    int rsBeachwear_numRows = 0;
    %>
    <%
    int Repeat1__numRows = 10;
    int Repeat1__index = 0;
    rsBeachwear_numRows += Repeat1__numRows;
    %>
    <title>Beachwear Title</title>
    <body bgcolor="#FFFFFF">
    <p> </p>
    <p> 
    <form name="form2" method="post" action="Invoice.jsp">
    <table width="75%" border="1">
    <% while ((rsBeachwear_hasData)&&(Repeat1__numRows-- != 0)) { %>
    <tr>
    <td width="18%"><%=(((rsBeachwear_data = rsBeachwear.getObject("ID"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    <td width="20%"><%=(((rsBeachwear_data = rsBeachwear.getObject("Item"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    <td width="21%"><%=(((rsBeachwear_data = rsBeachwear.getObject("Color"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    <td width="5%"><%=(((rsBeachwear_data = rsBeachwear.getObject("Size"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    <td width="16%">
    <input type="checkbox" name="valueCheckbox" value="<%=(((rsBeachwear_data = rsBeachwear.getObject("ID"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%>">
    </td>
    </tr>
    <%
    Repeat1__index++;
    rsBeachwear_hasData = rsBeachwear.next();
    %>
    </table>
    <p>
    <input type="submit" name="Submit" value="Submit">
    </p>
    </form>
    <%
    rsBeachwear.close();
    ConnrsBeachwear.close();
    %>
    //INVOICE PAGE:
    <%@page language="java" import="java.sql.*"%>
    <%@ include file="../Connections/connBeachwear.jsp" %>
    <%
    String rsBeachwear__varCheckbox = "1";
    if (request.getParameter ("valueCheckbox") !=null) {rsBeachwear__varCheckbox = (String)request.getParameter ("valueCheckbox")   ;}
    %>
    <%
    Driver DriverrsBeachwear = (Driver)Class.forName(MM_connBeachwear_DRIVER).newInstance();
    Connection ConnrsBeachwear = DriverManager.getConnection(MM_connBeachwear_STRING,MM_connBeachwear_USERNAME,MM_connBeachwear_PASSWORD);
    PreparedStatement StatementrsBeachwear = ConnrsBeachwear.prepareStatement("SELECT ID, Item, Color, Size FROM Beachwear WHERE ID IN (" + rsBeachwear__varCheckbox + ")");
    ResultSet rsBeachwear = StatementrsBeachwear.executeQuery();
    boolean rsBeachwear_isEmpty = !rsBeachwear.next();
    boolean rsBeachwear_hasData = !rsBeachwear_isEmpty;
    Object rsBeachwear_data;
    int rsBeachwear_numRows = 0;
    %>
    <%
    int Repeat1__numRows = 10;
    int Repeat1__index = 0;
    rsBeachwear_numRows += Repeat1__numRows;
    %>
    <title>Beachwear Title</title>
    <body bgcolor="#FFFFFF">
    <p> </p>
    <p> 
    <p><br>
    INVOICE<br>
    <br>
    </p>
    <table width="75%" border="1">
    <% while ((rsBeachwear_hasData)&&(Repeat1__numRows-- != 0)) { %>
    <tr>
    <td width="18%"><%=(((rsBeachwear_data = rsBeachwear.getObject("ID"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    <td width="20%"><%=(((rsBeachwear_data = rsBeachwear.getObject("Item"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    <td width="21%"><%=(((rsBeachwear_data = rsBeachwear.getObject("Color"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    <td width="5%"><%=(((rsBeachwear_data = rsBeachwear.getObject("Size"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    </tr>
    <%
    Repeat1__index++;
    rsBeachwear_hasData = rsBeachwear.next();
    %>
    </table>
    <p>  </p>
    <%
    rsBeachwear.close();
    ConnrsBeachwear.close();
    %>

    Hi, Brad,
    I appreciate your help! I am a beginning Java student, so this code is more complex than what I can handle alone.
    A copy of the compilation error is at the very bottom of this message.
    I added " int chkValues[]; " to the beginning of your code, and then inserted the whole code snippet to the detail (Invoice) page as shown:
    <%@page language="java" import="java.sql.*"%>
    <%@ include file="../Connections/connBeachwear.jsp" %>
    <%
    String rsBeachwear__varCheckbox = "1";
    if (request.getParameter ("valueCheckbox") !=null) {rsBeachwear__varCheckbox = (String)request.getParameter ("valueCheckbox")   ;}
    %>
    <%
    Driver DriverrsBeachwear = (Driver)Class.forName(MM_connBeachwear_DRIVER).newInstance();
    Connection ConnrsBeachwear = DriverManager.getConnection(MM_connBeachwear_STRING,MM_connBeachwear_USERNAME,MM_connBeachwear_PASSWORD);
    int chkValues[];
    StringBuffer prepStr=new StringBuffer("SELECT ID, Item, Color, Size FROM Beachwear WHERE ID=");
    for(int x=0;x<chkValues.length;++x){
    prepStr.append( chkValues[x] );//using an x instead of an i
    if((x+1)<chkValues.length){//another iteration
    prepStr.append(" OR ID=");
    }//end if
    }//end for loop
    PreparedStatement StatementrsBeachwear = ConnrsBeachwear.preparedStatement(prepStr);
    ResultSet rsBeachwear = StatementrsBeachwear.executeQuery();
    boolean rsBeachwear_isEmpty = !rsBeachwear.next();
    boolean rsBeachwear_hasData = !rsBeachwear_isEmpty;
    Object rsBeachwear_data;
    int rsBeachwear_numRows = 0;
    %>
    <%
    int Repeat1__numRows = -1;
    int Repeat1__index = 0;
    rsBeachwear_numRows += Repeat1__numRows;
    %>
    <title>Beachwear Title</title>
    <body bgcolor="#FFFFFF">
    <p> </p>
    <p> 
    <form name="form1" method="post" action="">
    <p><br>
    INVOICE<br>
    <br>
    </p>
    <% while ((rsBeachwear_hasData)&&(Repeat1__numRows-- != 0)) { %>
    <table width="75%" border="1">
    <tr>
    <td width="13%">ID:</td>
    <td width="87%"><%=(((rsBeachwear_data = rsBeachwear.getObject("ID"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    </tr>
    <tr>
    <td width="13%">ITEM:</td>
    <td width="87%"><%=(((rsBeachwear_data = rsBeachwear.getObject("Item"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    </tr>
    <tr>
    <td width="13%">COLOR:</td>
    <td width="87%"><%=(((rsBeachwear_data = rsBeachwear.getObject("Color"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    </tr>
    <tr>
    <td width="13%">SIZE:</td>
    <td width="87%"><%=(((rsBeachwear_data = rsBeachwear.getObject("Size"))==null || rsBeachwear.wasNull())?"":rsBeachwear_data)%></td>
    </tr>
    </table>
    <%
    Repeat1__index++;
    rsBeachwear_hasData = rsBeachwear.next();
    %>
    <p>  </p>
    </form>
    <%
    rsBeachwear.close();
    ConnrsBeachwear.close();
    %>
    ERROR:
    500 Internal Server Error
    /jserv/Invoice.jsp:
    Compilation error occured:
    Found 1 errors in JSP file:
    C:\\Inetpub\\wwwroot\\Beachwear\\jserv\\Invoice.jsp:27: Error: No method named "preparedStatement" was found in type "java/sql/Connection".
    allaire.jrun.scripting.DefaultCFE:
    Errors reported by compiler:C:/Program Files/Allaire/JRun/servers/default/default-app/WEB-INF/jsp/jrun__jserv__Invoice2ejsp12.java:82:42:82:83: Error: No method named "preparedStatement" was found in type "java/sql/Connection".
         at allaire.jrun.scripting.JavaCompilerService.compile(../scripting/JavaCompilerService.java:96)

  • Question about selecting only one tree at a time...Please help

    Hi , guys
    does anybody know how to make only one tree selected in an application which shows three trees simultaniously.
    Untill now I can select both trees at a time (the third one is not implemented yet ) This is probably so because the trees are showed in different panels I have no idea....Please give me some hints or ideas.
    I thank you in advance.

    write a TreeSelectionListener which knows all Trees in your application. add the listener to all three Trees. within the valueChanged method, check the events source to evaluate the tree, which fired the event. close all selections of all trees ( method clearSelection() ) except the one, which fired the event.
    regards,
    stefan

  • When a Event is selected, only one large photo shows (no thumbnails)

    When I updated to iLife 08 (iPhoto 7.01) all worked well in iPhoto. Then a couple days ago when pulling a few photos to my desktop from an Event thumbnail section, I accidently mis-clicked the dragged photos to the thumbnails window and now ALL Events do not show thumbnail inside. Only one large photo. I can scroll through these with my arrow keys. Also, when I select Photos instead of Events in the Library, only a large photo shows here as well. I've tried to resore iPhoto with no change. Also I have tried to rebuild the thumbnail cashe with no change as well. How can I restore to the thumbnail view option within each Event?

    I am also having the same problem since yesterday. I am not able to see the Thumbnails in Events. Making changes in the Preferences to "Show Event Photos" also doesn't do anything.
    Any idea to restore this
    thanks

  • Possible for POJO to have a set of children with only one table?

    I have a situation that I'd like to model with Hibernate, but I'm not sure how to proceed.
    I've got two objects: Filter and Criterion. Filter has a java.util.Set of Criterion children.
    I currently have a schema with two tables: FILTERS and CRITERIA. The FILTERS table has nothing more than a primary key. CRITERIA has a foreign key relationship with FILTERS. I have a FilterDAO that will query the FILTERS table and bring back a Filter object that will use the one-to-many, parent-child relationship between the two tables to populate the Set.
    A DBA here has pointed out that the FILTERS table is anemic - it has nothing more than a primary key. She suggested that I eliminate it and go directly against the CRITERIA table to populate that Set.
    I'm so used to thinking about these things in terms of primary/foreign key relationships that I'm not seeing how to accomplish this with Hibernate. Is it a mere <set> declaration that populates the child java.util.Set<Criterion>? The WHERE clause would have to include a filter type. Is that where the JOIN has to come? Is the two table schema absolutely necessary, or can I get away without it?
    Hibernate allows the object model to be more fine-grained than the schema. The classic example is a PERSON table that has address information it in. I can model this on the object side using Person and Address classes and ask Hibernate to fetch the Address state as a component. Is this the same situation as my Filter and Criterion?
    Sorry if I sound confused, or if the question rambles. I guess I don't understand Hibernate well, because any time I get off the beaten path I fall into a hole.
    %

    Well, you're more advanced than me with Hibernate. I'd be very surprised if that were true, DrClap. 8)
    I can't even get one-to-many relationships working the
    way I'd like, every time I think I have it right
    (i.e. just the same as the examples) it gives me some
    guff about backreferences not existing.I'm finding Hibernate to be a bit difficult, especially when I don't have control over the schema. Our DBAs don't seem to follow all the "best practices" that Hibernate recommends.
    So my advice might not be the best. But if you don't
    have the Filters table, but you still need to get all
    the Criterions with "filter key" = x, then isn't that
    just a Query? Sure, you get the data back as a List,
    but you can wrap that in a Set pretty easily.I've gone back to the DBA and concluded that we have to have a FILTERS table (there's a FILTER_TYPE descriptor field that I've added). It's back in, so the 1:m with CRITERIA should work fine.
    But it begs the question: Does Hibernate and O/R mapping demand at least one table per object?
    If I look in "Hibernate In Action" on page 92, it says "A major objective of the Hibernate project is support for fine grained object models" - more classes than tables. There should be an adjective "persistent" applied to classes in that phrase, because I can have many more classes that are not persisted.
    So I take this to mean that the limit is one persistent class per table, but never less. True?
    %

Maybe you are looking for