Query many to one

Hello to all
I have 2 tables, this is a bit of them
Table1
id            Datare                             col1     cf
201152004569     11/10/2011 12:16:00     43      STASNT29XXXB345I
201152004353     27/09/2011 13:48:00     43      STASNT29XXXB345I  
201108024859     16/08/2011 12:05:00     83      STASNT29XXXB345I
201108024832     12/08/2011 14:43:00     83      STASNT29XXXB345I
201108024735     09/08/2011 13:45:00     18      STASNT29XXXB345I
201108024358     01/08/2011 10:41:00     83      STASNT29XXXB345I
table2
cf                  paz     c2
STASNT29XXXB345I   John Doe a1
STASNT29XXXB345I   John Doe a1
STASNT29XXXB345I   John Doe a2
STASNT29XXXB345I   John Doe a2How can I get a result like that described below, with only the 6 rows from table1 (plus the cf's column form table 2 )
201152004569     11/10/2011 12:16:00     43      STASNT29XXXB345I John Doe
201152004353     27/09/2011 13:48:00     43      STASNT29XXXB345I John Doe   
201108024859     16/08/2011 12:05:00     83      STASNT29XXXB345I John Doe
201108024832     12/08/2011 14:43:00     83      STASNT29XXXB345I John Doe
201108024735     09/08/2011 13:45:00     18      STASNT29XXXB345I John Doe
201108024358     01/08/2011 10:41:00     83      STASNT29XXXB345I John Doe because with the query
SELECT   DISTINCT 
            IREF.id,  IREF.datare,  IREF.col1,   AA.PAZ, AA.cf
FROM
      (SELECT  IP.id, IP.datare,ip.col1
          FROM table1 IP
          WHERE  IP.Cf = 'STASNT29XXXB345I') IREF
     , (SELECT  DISTINCT AA.PAZ, AA.cf
           FROM  table2 AA     ) AA
  WHERE AA.cf  = IREF.cf
order by 1 DESCI get the 6 rows from table1 multiplied by the number of rows in the table 2, that is, for how many times it repeats cf's columns
thanks for any help

Try this:
SELECT a.id,
       a.datare,
       a.col1,
       a.cf,
      (SELECT DISTINCT b.paz
       FROM   table 2 b
       WHERE b.cf = a.cf) paz
FROM   table1 aEdited by: lee200 on Sep 6, 2012 5:47 PM

Similar Messages

  • Crystal Report Many to One Query Config error when using DataSet.ReadXML me

    When I build a dataset with this method numerous relations are automatically created. I then map these fields onto crystal reports with ADO.net data connection. However when I run the report the following error occurs:
    CrystalDecisions.CrystalReports.Engine.InternalException: Cannot determine the queries necessary to get data for this report.Details:
    This query cannot be performed. The link order requires many to one query configuration, which is not supported. Please rearrange the links.
    If I remove the links (relations) i get duplicate data on the report. Is there any way to resolve this or a patch for the error?

    Hello, Mervin;
    Since you are using ADO.NET dataset, is it possible to get all of the fields you need in one SQL Query outside of Crystal Reports?
    If that is possible, you can use that dataset to create an XML or XSD file to use as the structure for your report.
    VB
    'Using the full path to the .xml file, include the schema
    dataSet.WriteXml("C:\temp\test.xml", XmlWriteMode.WriteSchema)
    or
    dataSet.WriteXmlSchema("c:\temp\testXML.xsd")
    Now create a new report with the ADO.NET(XML) connection and point to either the XML or XSD you created. XML is useful because you can view data in the report designer for final formatting of the report.
    Now there is only one datasource and no linking is required in Crystal Reports. That should resolve the one to many issue.
    Another useful tool is to group on the many and place all the fields normally in the detail section into that group header. Suppress the Detail and Group footer sections. The Group Header will now look like a Detail section and each distinct value will only appear once. You can group on one field or a combination (using a formula field) to get the results you need. Test this to be sure you do not miss anything you want to see.
    Elaine

  • SSAS - Many to Many Relationship Grain Filters Out Data (Many to One)

    I have a simple Many to One example: One Fact Table record has many Dimensional Items.  The Example I'm using is One FactEvent record can have multiple EventMembers.  These members are always unique so the relationship is really many to one (vs.
    many to many). The grain of the Fact is one row for every event.  Not all events have members, but I have stubbed those with -1
    I tried using a Referenced dimensional relationship, but it threw my total counts off.  I decided to make it more complicated by using a
    Many to Many relationship, but I had issues once I started slicing the data.
    The following are my two very simple tables:
    FactEvents:
    EventMemberID MemberKey EventMemberKey MemberName MemberGender
    1             1         -1             None       N          
    2             2         E2             Tyler      M          
    3             3         E2             John       M          
    4             4         E2             Sue        F          
    5             5         E5             Tim        M          
    6             6         E5             Jane       F          
    7             7         E12            Ashley     F          
    8             8         E12            Jessica    F          
    9             9         E12            Kristy     F          
    10            10        E17            Mike       M          
    11            11        E17            Josh       M          
    12            12        E18            Warren     M          
    13            13        E18            Eric       M           
    Here is the bridge Table:
    EventID EventBK EventName         EventMemberKey EventCount
    1       E1      Hockey Game       -1             1          
    2       E2      Soccer Game       E2             1          
    3       E3      Baseball Game     -1             1          
    4       E4      Concert           -1             1        
    5       E5      Food Festival     E5             1          
    6       E6      Movie Night       -1             1          
    7       E7      Data Group Event  -1             1          
    8       E8      City Tour         -1             1          
    9       E9      Ski Trip          -1             1        
    10      E10     Camping Trip      -1             1          
    11      E11     Hiking Trip       -1             1          
    12      E12     Community Cleanup E12            1          
    13      E13     Block Party       -1             1          
    14      E14     Toastmasters      -1             1          
    15      E15     Train Spotting    -1             1          
    16      E16     Plane Spotting    -1             1          
    17      E17     Fishing Trip      E17            1          
    18      E18     Hunting Trip      E18            1          
    19      E19     Street Hockey     -1             1          
    20      E20     Bonspiel          -1             1          
    You can see many events have no members and some events have multiple members.  There is not separate members Dim, just the bridge table.  I tried to build view that would work as bridge tables, but it started to feel like overkill.
    Here is the SSAS structure:
    Cube:
    I tried creating a bridge Dim and Measure Group that can be used to join FactEvents with DimMemberEvent:
    When I query the database tables directly, I can get the structure I'm looking for:
    Gender  Count
    F            5
    M           7
    N           15
    This represents that although there are 20 events, there were 5 Female and 7 Male participants and 15 events with No participants.  When looking at the cube in excel I get:
    Gender  Count
    F            3
    M           4
    N           15
    Grand Total 20
    The grand total is correct, however, it looks like it is grouping the events, so if there are multiple Female members at a particular event, they get rolled up.  You can see this better if I pull in member name:
    It includes all the names with count 1 ie. 5 Females with count 1, but the gender subtotal is 3 (as it is grouping the gender dimension)
    The detail member counts are good, but the rolled up M and F counts are stripping out duplicates.  Is there a way to model this in SSAS to preserve the detail member counts when the member dimension is used?  Is a many to many the best solution?
    This is all using SQL Server 2012 Multi-Dimensional Model. Thanks.

    Ok, for starters, if it's a one to many relationship, don't set it up as a many to many!  Avoid many to many relationships and really anything other than "regular" relationships. 
    Second, the tables you pasted the data for aren't the tables you are describing them as, based on the dsv screenshot you included.  If your post is confusing to the people who are wanting to help you, they will quickly move on.
    It seems that you are not clear on how to construct a star schema.  I will lay one out for you and hopefully this can help you on your journey.
    fact_member_event:
    event_id
    member_id
    member_event_count
    dim_member:
    member_id
    member_key
    member_name
    member_gender
    dim_event:
    event_id
    event_name
    fact_event:
    event_id
    event_count
    Or alternately, you could drop the fact_event fact table and have a calculated member that uses dimEvent.event.event.allmembers.count.  It's a little bit of a weird situation that I would want to play with, but I would start with the above.  
    Also if you post back and show query results, you should make it clear what columns  you are displaying.  I see "count" in your query above, but nowhere in the star schema do I see "member count"
    as a field.. I guess that's event count?
    Hope this helps,
    Ken

  • XQuery many to one in an XML document ??

    I have XMLType tables with xml documents that have data like the sample below.
    There are one to many InvoiceLineRet to one InvoiceRet, how do I return this data in an XQuery?
    I have tried many iterations but cannot get data to return correctly. It is somewhat like a many to one table relation where in the query the one side would repeat across the many lines, but it does not work that way with XQuery.
    Any and all suggestions will be appreciated.
    Thanks,
    Mike
    sample data:
    <InvoiceRet>
    <TxnID>D924-1210085400</TxnID>
    <TimeCreated>2008-05-06T10:50:00-05:00</TimeCreated>
    <TimeModified>2008-07-21T10:54:42-05:00</TimeModified>
    <EditSequence>1215638595</EditSequence>
    <TxnNumber>10398</TxnNumber>
    <CustomerRef>
    <ListID>80000278-1209483158</ListID>
    <FullName>Majestic Entries</FullName>
    </CustomerRef>
    <ARAccountRef>
    <ListID>80000009-1185470478</ListID>
    <FullName>Accounts Receivable</FullName>
    </ARAccountRef>
    <TemplateRef>
    <ListID>80000019-1190228214</ListID>
    <FullName>Compudoc</FullName>
    </TemplateRef>
    <TxnDate>2008-05-06</TxnDate>
    <RefNumber>22333</RefNumber>
    <BillAddress>
    <Addr1>Majetic Entries</Addr1>
    </BillAddress>
    <BillAddressBlock>
    <Addr1>Majetic Entries</Addr1>
    </BillAddressBlock>
    <IsPending>false</IsPending>
    <IsFinanceCharge>false</IsFinanceCharge>
    <DueDate>2008-05-06</DueDate>
    <ShipDate>2008-05-06</ShipDate>
    <Subtotal>391.50</Subtotal>
    <ItemSalesTaxRef>
    <ListID>8000004F-1185996977</ListID>
    <FullName>NC 7.25%</FullName>
    </ItemSalesTaxRef>
    <SalesTaxPercentage>7.25</SalesTaxPercentage>
    <SalesTaxTotal>5.73</SalesTaxTotal>
    <AppliedAmount>-397.23</AppliedAmount>
    <BalanceRemaining>0.00</BalanceRemaining>
    <IsPaid>true</IsPaid>
    <IsToBePrinted>false</IsToBePrinted>
    <IsToBeEmailed>false</IsToBeEmailed>
    <CustomerSalesTaxCodeRef>
    <ListID>80000001-1185469345</ListID>
    <FullName>Tax</FullName>
    </CustomerSalesTaxCodeRef>
    <InvoiceLineRet>
    <TxnLineID>D926-1210085400</TxnLineID>
    <ItemRef>
    <ListID>80000059-1199714336</ListID>
    <FullName>Labor:Non-Contract Labor Ken</FullName>
    </ItemRef>
    <Desc>Technical Labor performed by Ken Allen:
    Network Problem with Internet and intranet found two routers connected together and the one set for DHCP was bad we changed out their bad one with our small netgear router.</Desc>
    <Quantity>1.5</Quantity>
    <Rate>125.00</Rate>
    <ClassRef>
    <ListID>8000000D-1200208143</ListID>
    <FullName>KA</FullName>
    </ClassRef>
    <Amount>187.50</Amount>
    <ServiceDate>2008-04-28</ServiceDate>
    <SalesTaxCodeRef>
    <ListID>80000002-1185469345</ListID>
    <FullName>Non</FullName>
    </SalesTaxCodeRef>
    </InvoiceLineRet>
    <InvoiceLineRet>
    <TxnLineID>D927-1210085400</TxnLineID>
    <ItemRef>
    <ListID>80000029-1185470511</ListID>
    <FullName>Labor:Non-Contract Labor Rick</FullName>
    </ItemRef>
    <Desc>Technical Labor performed by Rick Wagoner: Assisted with above troubleshooting</Desc>
    <Quantity>1</Quantity>
    <Rate>125.00</Rate>
    <ClassRef>
    <ListID>80000004-1185998300</ListID>
    <FullName>RW</FullName>
    </ClassRef>
    <Amount>125.00</Amount>
    <ServiceDate>2008-04-28</ServiceDate>
    <SalesTaxCodeRef>
    <ListID>80000002-1185469345</ListID>
    <FullName>Non</FullName>
    </SalesTaxCodeRef>
    </InvoiceLineRet>
    <InvoiceLineRet>
    <TxnLineID>D928-1210085400</TxnLineID>
    <ItemRef>
    <ListID>80000050-1185997340</ListID>
    <FullName>Parts and Supplies</FullName>
    </ItemRef>
    <Desc>Parts and Supplies: Netgear router</Desc>
    <Quantity>1</Quantity>
    <Rate>79.00</Rate>
    <ClassRef>
    <ListID>80000007-1186694551</ListID>
    <FullName>Parts</FullName>
    </ClassRef>
    <Amount>79.00</Amount>
    <SalesTaxCodeRef>
    <ListID>80000001-1185469345</ListID>
    <FullName>Tax</FullName>
    </SalesTaxCodeRef>
    </InvoiceLineRet>
    </InvoiceRet>
    <InvoiceRet>
    <TxnID>ED59-1216758177</TxnID>
    <TimeCreated>2008-07-22T16:22:57-05:00</TimeCreated>
    <TimeModified>2008-07-26T11:21:48-05:00</TimeModified>
    <EditSequence>1217085708</EditSequence>
    <TxnNumber>11203</TxnNumber>
    <CustomerRef>
    <ListID>80000278-1209483158</ListID>
    <FullName>Majestic Entries</FullName>
    </CustomerRef>
    <ARAccountRef>
    <ListID>80000009-1185470478</ListID>
    <FullName>Accounts Receivable</FullName>
    </ARAccountRef>
    <TemplateRef>
    <ListID>80000019-1190228214</ListID>
    <FullName>Compudoc</FullName>
    </TemplateRef>
    <TxnDate>2008-07-22</TxnDate>
    <RefNumber>22479</RefNumber>
    <BillAddress>
    <Addr1>Majetic Entries</Addr1>
    </BillAddress>
    <BillAddressBlock>
    <Addr1>Majetic Entries</Addr1>
    </BillAddressBlock>
    <IsPending>false</IsPending>
    <IsFinanceCharge>false</IsFinanceCharge>
    <DueDate>2008-07-22</DueDate>
    <ShipDate>2008-07-22</ShipDate>
    <Subtotal>839.00</Subtotal>
    <ItemSalesTaxRef>
    <ListID>8000004F-1185996977</ListID>
    <FullName>NC 7.25%</FullName>
    </ItemSalesTaxRef>
    <SalesTaxPercentage>7.25</SalesTaxPercentage>
    <SalesTaxTotal>33.64</SalesTaxTotal>
    <AppliedAmount>0.00</AppliedAmount>
    <BalanceRemaining>872.64</BalanceRemaining>
    <IsPaid>false</IsPaid>
    <IsToBePrinted>true</IsToBePrinted>
    <IsToBeEmailed>false</IsToBeEmailed>
    <CustomerSalesTaxCodeRef>
    <ListID>80000001-1185469345</ListID>
    <FullName>Tax</FullName>
    </CustomerSalesTaxCodeRef>
    <InvoiceLineRet>
    <TxnLineID>ED5B-1216758177</TxnLineID>
    <ItemRef>
    <ListID>80000050-1185997340</ListID>
    <FullName>Parts and Supplies</FullName>
    </ItemRef>
    <Desc>Parts and Supplies - Linksys Router</Desc>
    <Quantity>1</Quantity>
    <Rate>89.00</Rate>
    <Amount>89.00</Amount>
    <SalesTaxCodeRef>
    <ListID>80000001-1185469345</ListID>
    <FullName>Tax</FullName>
    </SalesTaxCodeRef>
    </InvoiceLineRet>
    <InvoiceLineRet>
    <TxnLineID>ED5C-1216758177</TxnLineID>
    <Desc>Suspect that the phone switch is attempting to act as a DHCP server for the network. per Terry, the reason that the phone switch was on the network was to supply VOIP to the warehouse phone lines. This was not working and is no longer needed. We removed the connection between the phone switch and the network.</Desc>
    </InvoiceLineRet>
    <InvoiceLineRet>
    <TxnLineID>ED5D-1216758177</TxnLineID>
    <Desc>Removed the Netgear router and the D-Link router. The D-Link had lost all settings and we could not log into the Netgear even after resetting to factory defaults.</Desc>
    </InvoiceLineRet>
    <InvoiceLineRet>
    <TxnLineID>ED5E-1216758177</TxnLineID>
    <Desc>Installed a new Lnksys router to replace the D-Link and Netgear faulty routers.</Desc>
    </InvoiceLineRet>
    <InvoiceLineRet>
    <TxnLineID>ED5F-1216758177</TxnLineID>
    <Desc>Ensured that all computers were connecting properly. Ensured that all computers printed to the Savin printer correctly.</Desc>
    </InvoiceLineRet>
    <InvoiceLineRet>
    <TxnLineID>ED60-1216758177</TxnLineID>
    <Desc>Worked with Time Warner Cable to resolve customer location and static IP.</Desc>
    </InvoiceLineRet>
    <InvoiceLineRet>
    <TxnLineID>ED64-1216758177</TxnLineID>
    <ItemRef>
    <ListID>80000028-1185470511</ListID>
    <FullName>Labor:Non-Contract Labor Kareem</FullName>
    </ItemRef>
    <Desc>Analyzed and resolved Internet connectivity problems after loss of service from Time Warner Cable.</Desc>
    <Quantity>3</Quantity>
    <Rate>125.00</Rate>
    <Amount>375.00</Amount>
    <ServiceDate>2008-07-22</ServiceDate>
    <SalesTaxCodeRef>
    <ListID>80000002-1185469345</ListID>
    <FullName>Non</FullName>
    </SalesTaxCodeRef>
    </InvoiceLineRet>
    <InvoiceLineRet>
    <TxnLineID>ED68-1216758177</TxnLineID>
    <ItemRef>
    <ListID>8000005D-1216758445</ListID>
    <FullName>Labor:Non-Contract Labor Mike</FullName>
    </ItemRef>
    <Desc>Analyzed and resolved Internet connectivity problems after loss of service from Time Warner Cable.</Desc>
    <Quantity>3</Quantity>
    <Rate>125.00</Rate>
    <Amount>375.00</Amount>
    <ServiceDate>2008-07-22</ServiceDate>
    <SalesTaxCodeRef>
    <ListID>80000001-1185469345</ListID>
    <FullName>Tax</FullName>
    </SalesTaxCodeRef>
    </InvoiceLineRet>
    <InvoiceLineRet>
    <TxnLineID>ED94-1216758177</TxnLineID>
    <Desc>Terry called, cannot connect to internet. Everyone but Terry can connect. Terry is getting a 172 IP address on his laptop. Walked him through putting a static IP on his laptop so that he could be functional. I went to their site and talked with the NEC phone switch management company. They said the switch does not have DHCP capabilities. I could not duplicate Terry's issue using my laptop. The phone switch is now totally disconnected from the network since the VOIP setup for the warehouse was not functional. Validated that the TWC modem is not DHCP.</Desc>
    <ServiceDate>2008-07-23</ServiceDate>
    </InvoiceLineRet>
    <InvoiceLineRet>
    <TxnLineID>ED95-1216758177</TxnLineID>
    <Desc>Requires further diagnostics on Friday the 25th (if Terry is available) - need his laptop on-site to diagnose the problem.</Desc>
    </InvoiceLineRet>
    <InvoiceLineRet>
    <TxnLineID>EE30-1216758177</TxnLineID>
    <Desc>Communicated with Terry on 7/24/2008 via email. He is using DHCP and connecting correctly. Removing the final connection from the phone switch to the network appears to have corrected the problem.</Desc>
    <ServiceDate>2008-07-24</ServiceDate>
    </InvoiceLineRet>
    </InvoiceRet>

    try to use "xmlTable"
    search on this forum u can find much more stuff

  • Many-to-one synchronization

    I'm using DataServices to manage hiberate objects.  I have a simple many-to-one relationship between Account and Transaction (an account has many transactions).  I have two DataGrids in my application, one display accounts and their balances(which are derived from the trasactions, there is no balance field) the other displays transactions.  When I edit the accounts, the changes are propogated to the child transactions.  However, when I edit the transactions, the changes are not propagated to the accounts automatically.  If I edit the account or resort the columns it will update the balance.  My data-management-config.xml is below.  My question is, is there a way to make this work or is this not working by design?  I want my Account objects to automatically get the new Transactions associated with them so the balance will update correctly.
    <destination id="AccountHibernate">
         <adapter ref="java-dao" />
         <properties>
              <use-transactions>true</use-transactions>
              <source>flex.data.assemblers.HibernateAssembler</source>
              <scope>application</scope>
              <metadata>
                   <identity property="accountId"/>
                   <one-to-many property="transactions" destination="TransactionHibernate" lazy="false" read-only="true" load-on-demand="true"/>  
              </metadata>
              <network>
                   <session-timeout>0</session-timeout>
              </network>
              <server>
                   <hibernate-entity>budget.data.Account</hibernate-entity>
                   <fill-method>
                        <name>fill</name>
                        <params>java.util.List</params>
                   </fill-method>
                   <fill-configuration>
                        <use-query-cache>false</use-query-cache>
                        <allow-hql-queries>true</allow-hql-queries>
                   </fill-configuration>
              </server>
         </properties>
    </destination>
    <destination id="TransactionHibernate">
              <adapter ref="java-dao" />
              <properties>
                   <use-transactions>true</use-transactions>
                   <source>flex.data.assemblers.HibernateAssembler</source>
                   <scope>application</scope>
                   <metadata>
                        <identity property="transactionId"/>
                        <many-to-one property="account"  destination="AccountHibernate" lazy="false" />
                   </metadata>
              <network>
                   <session-timeout>0</session-timeout>
              </network>
              <server>
                   <hibernate-entity>budget.data.Transaction</hibernate-entity>
                   <fill-method>
                        <name>fill</name>
                        <params>java.util.List</params>
                   </fill-method>
                   <fill-configuration>
                        <use-query-cache>false</use-query-cache>
                        <allow-hql-queries>true</allow-hql-queries>
                   </fill-configuration>
              </server>
         </properties>
    </destination>

    Ed: Thanks for your response, I think I have a better idea of what is going
    on now.
    Regarding the first question: In this case I am just modifying an attribute,
    the relationship between them remains the same.
    I verified that adding a transaction does not update the size of the
    transaction collection the account has if I add the new transaction to the
    transactions collection.  However, if I add the transaction to the
    appropriate accounts list of transactions it does update the collection
    (i.e. there is one more element) but it does not update the balance.  I have
    since changed my balance to a property that is calculated by a query server
    side.  I noticed that even if I change a property on the account, it will
    not update the balance unless I call fill again.
    So I have two questions: 1) is there a way to make the account realize it
    has transactions added to it without adding them directly to the account's
    transaction collection?  2) Is there a way to force the account object to
    refresh the balance (i.e. re-run the query to generate it?).  I realize I
    can call fill() again client side and easily fix this, but I would like to
    do this in a way that causes all clients to have their account balances
    refreshed when the should i.e. I want the server to automatically push the
    new balance property.  If it matters I'm using HibernateAssembler.  Could I
    extend that to achieve this?
    Jim

  • Does anyone know how many devices one can have on one apple ID?

    Does anyone know how many devices one can have on one apple ID?

    The names are for your benefit. The devices are identified by serial number in iTunes. iTunes knows which device is which no matter what you name the devices. It works the same way with iCloud. You can name all three devices Fred - and iTunes can tell them apart - but like I said, you want to give them different names for your benefit.

  • Move a query to from one user group to another user group

    Hi,
    it's possible to move a query (SQ01) from one user group to another user group ??
    Thank you.

    Hi,
    You can copy queries only if you have the authorization to make changes. Within your current user group, you can copy all queries. However, queries of other user groups can only be copied if the InfoSet used to define the query is assigned to both user groups.
    To copy a query, proceed as follows:
    1. Choose the name of the query you want to copy on the initial screen.
    If you do not know the name, use the directory functions to display the query directories and then choose a query to copy from there.
    2. Choose Copy.
    3. Enter the name and the user group of the query that you want to copy in the dialog box. Furthermore, you must enter a name for the copied query. The system proposes values for this.
    4. Choose Continue.
    This takes you to the initial screen. The query is added and appears in the query directory. You can now continue.
    Regards,
    Amit

  • Can we query more than one class in a call to .tmib

    Hi,
    i am creating a utility to monitor the applications at run time using mib.any
    body have an idea if we can query more than one class in one call to .tmib.
    thanks
    roopesh

    That would be an interesting enhancement, perhaps using Embedded FML to
    pack multiple MIB requests into one buffer.
    Product Management makes all decisions about major enhancements, and it
    is based on customer need, so that's where the requests should go.
         Scott Orshan
    roopesh wrote:
    >
    yes.
    i am trying to devlop a utility which can monitor
    applications at runtime.i wanted to make as less the
    no of calls to tmib as possible but one class does
    not give all the information so i need to query
    more than one.
    anyways thanks for the reply.
    "MS" <[email protected]> wrote:
    Hi,
    Are you trying to write a Tuxedo app health-check monitor utility.
    A tuxedo client can make different calls to .TMIB service for different
    classes.
    I don't think we can query more than one class in a single call.
    Are you looking for something else??/
    HTH
    regards
    MS

  • Many to One Mapping issue

    Hi Experts,
    I am currently facing issue with many to one mapping . I have a source schema called revenue having Profit and Profit GST which is looping multiple times. I need to copy the name,value and GST value for each type into the destination schema.
    i am using Looping funtiod to create item profit records and than copying name and value from source to destination but the problem statement is that i am unable to map the GST value
    Thanks
    Abhishek

    could you post the schema definition please
    well why i am asking is, in General matching the records will be based on common node values in corresponding records.
    Assume you have 2 records of Profit and 2 records of ProfitGST in the source message like below, you cannot match the records unless you have some value common in both the records. i mean there should be some common node or attribute value that exits in
    both records.
    assume the following sample with 2 records each
    <ns0:Revenue xmlns:ns0="http://TestSample">
    <ns0:profit availabilityIncentivePayment="342" increasedCapacityCharge ="121" increasedCapacaityPayment="231" />
    <ns0:profit availabilityIncentivePayment="100" increasedCapacityCharge ="110" increasedCapacaityPayment="120" />
    <ns0:profitGST availabilityIncentivePayment="55" increasedCapacityCharge ="21" increasedCapacaityPayment="23"/>
    <ns0:profitGST availabilityIncentivePayment="150" increasedCapacityCharge ="160" increasedCapacaityPayment="170"/>
    </ns0:Revenue>
    if you observe the above sample instance, it does have 2 records each, but Profit record's nodes values
    are no where common with ProftGST record's node values.
    And for every Profit record, you want to pick corresponding GST value from ProfitGST record. However, since you don't have atleast one common node/attribute value here, you will not find a way to relate corresponding records. Means while mapping the first
    record of Profit, it cannot decide which record's nodes values in the ProftGST should pick to match as there are 2 records of ProfitGSt and with no relation with Profit Records.
    if the requirement is such that the records should be matched by the order(index) irrespective
    or the values in them, then that can be achieved easily with postion() function in the for loop.  just try to use code some thing like below sample xslt script like below, apply the proper name spaces and put full names as applicable in your scirpt, mould
    it as per your need
    <ns0:Root>
    <xsl:for-each select="Profit">
    <Profit>
    <xsl:if test="@availabilityIncentivePayment">
    <name>
    name>availabilityIncentivePayment</name>
    </name>
    </xsl:if>
    <xsl:if test="@increasedCapacityCharge">
    <Value>
    <xsl:value-of select="@increasedCapacityCharge" />
    </Value>
    </xsl:if>
    <xsl:if test="../profitGST/@availabilityIncentivePayment">
    <ProfitGSt>
    <xsl:value-of select="../profitGST/@availabilityIncentivePayment[position()]" />
    </ProfitGSt>
    </xsl:if>
    </Profit>
    </xsl:for-each>
    </ns0:Root>
    Please mark the post as answer if this answers your question. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • How do i query a sun one server for a member of a  group

    Hi Folks
    I would like to know if any one know how to query a sun one directory server to list all members of the group.
    currenty i have this
    LDAP://SERVERNAME.test.com:5221/ou=people,dc=testrelsec,dc=com>;(&(objectclass = person)& adsPath;subTree"
    this query gives me all users in the directory ,
    Now I have created a static group called GROUPONE using sunone console GUI and made 2 people member of that group
    I need the ldap query which can list the members of GROUPONE
    thanks
    g4hbk
    thanks in advance
    g4hbk

    https://www.redhat.com/archives/fedora-directory-users/2005-September/msg00010.html
    Useful script to extract LDAP based user posixGroup memberships information
    ===
    Assuming you are using posixGroup objectclass and memberUid attribute to
    store your membership information, you may find my shell script useful
    and handy.
    It works on Solaris LDAP Client with "ldapaddent" and "ldaplist"
    commands, and works against FDS, SUN DS or OpenLDAP.
    ===
    Gary

  • How to connect to SQL*Plus and issue a query all in one command?

    Hi everyone,
    Does anyone know of a way to connect to a db with SQL*Plus, and issue a simple query, all with one command?
    I know that I can save a .sql script with a query, then do this:
    sqlplus user/pwd@db @myscript.sql
    But I'm wondering if there's any way to put the actual query right into the connect command, something like:
    sqlplus user/pwd@db "select count(*) from dba_tables;"
    Does anyone know of a way to do this?

    you didn't mention windows or unix. so, here's a link with both
    Re: windows sql script
    it also has a link to another thread on how to deal with the parens when using ehco in dos.

  • Keeping my query rows on one page.

    Please take a look at this URL
    http://dev.tms-hq.com/tmsreport.cfr
    and please tell me how to keep the query records on one page
    and not have the type and category elements repeated on 2 pages.
    Thanks so much.

    There's something covering the navbar on the About Me page.  As soon as you get the navbar cleared it should work.
    OT

  • I i want to run many-to-one replication scenario

    Hi,
    i want to run many-to-one replication scenario and for that i have created two tables and inserted values on source db and one table on target db in which i want consolidated data from those two tables. Below are the table details,
    Source DB,
    CREATE TABLE GGS.CLIENT_INFO
    ( CLIENT_ID varchar2(10) not null,
    CLIENT_NAME varchar2(50) not null,
    CLIENT_ADD varchar2(50),
    CONSTRAINT CLIENTID_PK PRIMARY KEY (CLIENT_ID)
    CREATE TABLE GGS.ACCOUNT_INFO
    ( ACCOUNT_NO varchar2(15) not null,
    BANK_NAME varchar2(50) not null,
    CLIENT_ID varchar2(10) not null,
    CONSTRAINT ACCTNO_PK PRIMARY KEY (ACCOUNT_NO)
    alter table GGS.ACCOUNT_INFO add CONSTRAINT FK_CLIENTINFO FOREIGN KEY (CLIENT_ID) REFERENCES GGS.CLIENT_INFO(CLIENT_ID);
    Target DB,
    CREATE TABLE GGS1.CLIENT_ACCOUNT_INFO
    ( CLIENT_ID varchar2(10) not null,
    ACCOUNT_NO varchar2(15) not null,
    CLIENT_NAME varchar2(50) not null,
    CLIENT_ADD varchar2(50),
    BANK_NAME varchar2(50) not null,
    CONSTRAINT CLIENT_ACCOUNT_PK PRIMARY KEY (CLIENT_ID, ACCOUNT_NO)
    when i start replicat process, it is giving below error,
    *"Oracle GoldenGate Delivery for Oracle, CLACTDEL.prm: OCI Error ORA-01400: cannot insert NULL into ("GGS1"."CLIENT_ACCOUNT_INFO"."CLIENT_NAME") (status = 1400), SQL <INSERT INTO "GGS1"."CLIENT_ACCOUNT_INFO" ("CLIENT_ID","ACCOUNT_NO") VALUES (:a0,:a1)>."*
    Note: i am inserting two source tables data in one table which at target side using OGG capture-replicate process.
    Please help to resolve above error.
    Regards,
    Shital

    For one, do not use the GoldenGate database user as your source and target schema owner. Why? What happens in a bidirectional setup? To prevent ping-ponging of data, operations performed by the replicat user should be ignored. That's what keeps the applied update on a target being re-applied on the original source, and then being captured and sent to the target, etc.
    Without knowing your setup, what did you do for ADD TRANDATA and supplemental logging at the database level (only needed for the source)? What did you do for initial load and synchronization? What are your parameter files?
    The error shown so far - cannot insert null - applies everywhere in Oracle whenever you try to insert a record with a null value in a column where a NOT NULL constraint is present. You can see that for yourself in a SQL*Plus session and trying the insert. You are inserting two column values, when your own table definition shows you would need at least 4 values (to account for all of the not null constraints).

  • HT3819 Isn't the five computer limit for home sharing restrictive given the many devices one household may have?

    Isn't the five computer limit for home sharing restrictive given the many devices one household may have?

    It is only restrictive if you have more than 5 computers.
    Otherwise it is not restrictive at all.
    devices do not count, only computers.
    You have more than 5 computers on the same home network.

  • Query Regarding Applying One-Off Patches

    Hi,
    We have plans of doing the following:
    Upgrade the databases to 10.2.0.5.0
    Apply the 10.2.0.5 PSU 3
    Apply a list of one-off patches identified for our environment (which are not included in 10.2.0.5.3)
    Query:
    If the one-off patches identified to be applied in our environment are available only top of 10.2.0.5.0 and not for 10.2.0.5.3, then which of the following mentioned solutions should be proceed with considering :
    Upgrade the database to 10.2.0.5.0, apply the one-off patches available on top of 10.2.0.5.0 and then apply the 10.2.0.5.0 PSU3
    or
    Upgrade the database to 10.2.0.5.0, apply the 10.2.0.5.0 PSU3, request for one-off patches on top of 10.2.0.5.3 and appy the same
    Thanks and Regards,
    Santosh

    Pl follow the steps is MOS Doc 865255.1 (Best approach for Oracle database patching sequence to latest/required patchset along with CPU/PSU/any-other-one-off patch)
    HTH
    Srini

Maybe you are looking for

  • Flash Builder Design Mode Bug Workaround (!!!)

    I've been fighting this annoyance since FB4 came out, and while I still don't think that custom/embedded fonts in design view are fixed by this, I've been able to reproduce this "fix" (workaround) to get design view to show fonts/theme correctly unde

  • Selection-screen(condition)

    Hi all, I have a report with about 15 select-options in selection screen. My condition is there should be atleast one input from the end user if not I should say 'Not enough inputs'. For this I implemented a logic using 'at selection-screen' event. I

  • SSD unmounts randomly

    Hi all, I have an issue for the past 1 month. I bought the samsung ssd 840 evo 1 month ago and i did i copyied (throught the Time Machine) the current hdd to the ssd. For the first boot i had some strange problems with some programs that i fixed in t

  • Left/right Keys appear to be stuck

    Here's the problem: I'm not sure what exact keys are stuck, but it appears that my computer is receiving constant left/right input. It only appears in certain areas though. For instance, a Finder window will constantly shift left and right. This also

  • Business Connector  : get querystring variables in url

    Hi; I have a server service in Business Connector . a client post a url like this http://10.10.10.10:5555/invoke/MM/mm2sms?drug_code=905913&drug_desc=aaaaa I have to get these variables drug_code,drung_desc and assing to a recordList.. Firstly Which