Single result set across multiple tables

Hi - what's the best way to perform a single query that can pull
a single result set across multiple tables, ie., a master table
containing subject details and child table containing multiple
records with detail.
I know how to do this for two columns in the same table via
indexing, but how about across tables?
Cheers,
John

I am not sure if I understood your question, but you can use
Intermedia Text with USER_DATA_STORE to create an index with data
source from multiple tables.
(see technet.oracle.com -> products -> oracle text)
Thomas

Similar Messages

  • Can Windows Server Backup spread a single backup job across multiple disks if they are not set up as a virtual disk?

    This may be a dumb question, but I can't seem to find any definitive information after having done many, many searches.  Short question is - can Windows Server Backup spread a single backup job across multiple disks if they are not in a storage
    pool or some other RAID/JBOD structure?
    Background:
    I'm running Server 2012 Essentials with all Windows Updates installed.  I have been backing up approx 2.8TB of data (Bare Metal Recovery, C:, S: (shared folders), and system reserved) for the past year+ onto a storage pool made up of two-2TB external
    USB drives.  Backup is slow (takes approx 1.5 days to complete), but generally works.  Not surprisingly I was constantly getting capacity low messages so I decided to increase my backup storage pool by adding a 3TB drive and another spare 750GB drive
    for a total of 7.75TB.  Instead of having four separate external USB enclosures, I bot a 4-bay enclosure - Startech.com model #S3540BU33E to simplify this (or so I thought!).
    The first problem I had was adding the two new drives to the existing storage pool. I think that is because the Startech uses a JMicron USB controller that reports identical uniqueid's for all drives so only one shows up in the GUI interface for creating storage
    pools. After doing research on this, I set up a new storage pool and virtual disk using all four drives via Powershell and thought I was good. However, when the backup ran, it failed after filling the first drive, saying there was no remaining capacity. In
    reality there were three remaining empty drives and there storage pool reported almost 5TB of avail capacity. I assumed this was due to the identical uniqueid issue so I decided to try a different tactic.
    Instead of using a storage pool that combines all four disks into one virtual disk, I just added each of them to Windows Server Backup as individual drives thinking it would manage them collectively. I.e., when a drive filled up during a particular backup,
    it would just start using the next drive and so on. Apparently this was a foolish assumption because the backup failed again as soon as the first disk filled up.
    So now I don't know if this is still an issue with the identical uniqueid's or if Server Backup actually can't spread a single backup across multiple individual drives that aren't in a pool or other virtual disk implementation. Hence, my original question.
    My guess is that it does *not* spread them across individual disks, but I just wanted to get confirmation.
    Thanks

    Mandy,
    Thank you for following up on my question.
    Unfortunately the article you referenced doesn't address what I am trying to accomplish.
    The article focuses on saving the same backup job to multiple disks and rotating the disks between on and offsite for enhanced protection.  However, it still requires that an individual backup job fits on a single disk.
    What I am trying to determine is if a single backup job can span across more than one physical disk (during the backup process) without those physical disks being in some type of virtual disk implementation (e.g., storage pool, RAID, etc.).
    Thanks,
    Gerry

  • How to execute entire result set of multiple sql statements via sp_executesql?

    I have a query that generates multiple insert statements (dynamic sql).  So when I execute this my result set is a table of sql insert statements (one insert statment per row in my source data table).  Like so:
                 Select 'INSERT INTO [dbo].[Table_1] ([Col1]) VALUES (' +  SrcData + ')' from SourceDataTbl
    How can I completely automate this and execute all these sql statements via sp_executesql?
    My plan is to completely automate and execute all this via an SSIS package.
    As always any help is greatly appreciated!
    fyi-  This is a very simple version of what I am trying to do.  My query probably plugs in 20+ values from the SourceDataTbl into each of the sql insert statements.

    Ah, a small error in Visakh's post, which I failed to observe, and then I added one on my own.
    DECLARE @SQL Varchar(max)
    SELECT @SQL =
       (SELECT 'INSERT INTO [dbo].[Table_1] ([Col1]) VALUES (' +  SrcData +
                ')' + char(10) + char(13)
        from SourceDataTbl
        FOR XML PATH(''), TYPE).value('.', 'nvarchar(max)')
    EXEC sp_executesql @SQL
    Without ", TYPE" FOR XML returns a string when assigned to a variable. The TYPE thing produces a value of the XML data type, so that we can apply the value method and get string out of the XML.
    And why this? Because:
    DECLARE @str nvarchar(MAX)
    SELECT @str = (SELECT 'Kalle Anka & co' FOR XML PATH(''))
    SELECT @str
    SELECT @str = (SELECT 'Kalle Anka & co' FOR XML PATH(''), TYPE).value('.', 'nvarchar(MAX)')
    SELECT @str
    Although the data type is string when , TYPE is not there, it is still XML and characters special to XML are enticised.
    Confused? Don't worry, for what you are doing, this is mumbo-jumbo.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Does lion server support a single email address across multiple devices??

    I am looking to move from an outdated Microsoft Exchange Server 2003 to OS X Lion Server but I am unsure as to how Lion will handle email. I do not want to spend money on a new windows server if I can get a Mac Mini Server to do the job. I am a very small business with a number of email accounts for a couple employees and need access to email and calendar from both the office iMac's and my Macbook Pro when on the road. My IT guy says I need Exchange but he's been off base on a few other items recently and I wanted to check with other sources.
    I have 2 new iMac's, a MacBook Pro, an iPad1 and and iPhone4 on the mac side of things and 2 windows computers running XP. I would get rid of the windows computers completely if not for my CAD program which runs best not in a virtual machine mode.
    How well will email and calendar entries sync across devices?

    I have a very similar setup at my office. Lion Server will push email, calandar, contacts to all of your apple product with out a hitch.
    As far the Windows XP machines, you can access email over IMAP with Thunderbird, and calandars via sunbird or the built in web app.
    I would ditch the exchange server move to Mac OS X Server, and never look back.
    God Luck!
    PS. All of your devices will be in sync all the time.
    Shore answer:
    Does lion server support a single email address across multiple devices??
    Yes.

  • Can we use single DB Adapter for multiple tables

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

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

  • Modifying datatype of columns across multiple tables

    Hi,
    I have a requirement where-in I have to modify the datatypes of columns across multiple tables. Is there any direct way to do this? I mean does oracle has any function or in-built functionality to achieve this.
    Example;
    Table1 -> col1 datatype needs to be changed to varchar2(10)
    Table2 -> col2 datatype needs to be changed to varchar2(30)
    Table3 -> col3 datatype needs to be changed to number.
    and so on....
    Do we have such functionality?
    Thanks,
    Ishan

    Hi Aman,
    Seeing the replies, I think I was unclear in the requirements. But I guess you understood it fully, but still I would like to restate my question once again, just to be 100% sure.
    What I actually want is that in one shot, I would be able to modify columns of multible tables.
    eg, table1-> col1 changed to varchar2(20);
    table2->col2 changed to varchar2(10)
    table3-> col3 changed to number;
    I know how to do it individually, but just wanted to check, if only one command can modify the datatypes of multiple tables/.
    If not, I have already written half the script, but just for knowledge sake wanted to check if some feature is available in oracle for that.
    Regards,
    Ishan

  • How do I total across multiple Tables? Help!

    how do I total across multiple Tables? Help!
    I feel like a complete noob.

    Hi Marc,
    There is no function explicitly for that sort of array calculation in Numbers.
    My favorite way is to use a list of Table Names and the INDIRECT(ADDRESS) function combination to produce a SUM across tables. I'm making the assumption that you want to do something like adding up all the values in a particular cell of multiple tables.  For example "give me the total of all the A1 cells in tables T1, T2, T3 and T4".  For this I would use the formula:
    =INDIRECT(ADDRESS(1,1,1,,A))
    to grab the cell contents of the table names mentioned in column A of a summary table.  Once you have them collected in your summary table, add them up.
    Here's a screen shot...
    Hope that gives you an idea for approaching this problem.
    Jerry

  • Inserting records across multiple tables

    I'm still pretty new to working with databases, but have been
    fine using DW to use forms to add, edit and delete records from a
    flat table.
    I'm less sure about updating records across multiple tables,
    for example in a one to many rleationship with a look up table, eg
    If I have three tables
    Companies :
    CompanyID (INT, auto increment)
    Company
    Address
    etc
    Contacts :
    ContactID (INT, auto increment)
    FirstName
    LastName
    etc
    CompanyContacts :
    CompanyID (INT)
    ContactID (INT)
    It's straightforward enough to create pages to insert new
    records into the Companies or Contacts tables, but how do I go
    about populating the CompanyContacts table when I add a new record
    in the Contacts table, so that it becomes 'attached' to a
    particular 'Company'?
    If that makes sense.
    Iain

    I'm still pretty new to working with databases, but have been
    fine using DW to use forms to add, edit and delete records from a
    flat table.
    I'm less sure about updating records across multiple tables,
    for example in a one to many rleationship with a look up table, eg
    If I have three tables
    Companies :
    CompanyID (INT, auto increment)
    Company
    Address
    etc
    Contacts :
    ContactID (INT, auto increment)
    FirstName
    LastName
    etc
    CompanyContacts :
    CompanyID (INT)
    ContactID (INT)
    It's straightforward enough to create pages to insert new
    records into the Companies or Contacts tables, but how do I go
    about populating the CompanyContacts table when I add a new record
    in the Contacts table, so that it becomes 'attached' to a
    particular 'Company'?
    If that makes sense.
    Iain

  • How to return the result set of multiple select statements as one result set?

    Hi All,
    I have multiple select statements in my stored procedure that I want to return as one result set 
    for instance 
    select id from tableA
    union 
    select name from table b 
    but union will not work because the result sets datatypes are not identical so how to go about this ?
    Thanks

    You have to CAST or CONVERT (or implicitly convert) the columns to the same datatype.  You must find a datatype that both columns can be converted to without error.  In your example I'm guessing id is an int and name is a varchar or nvarchar. 
    Since you didn't convert the datatypes, SQL will use its data precedence rules and attempt to convert name to an int.  If any row contains a row that has a value in name that cannot be converted to an int, you will get an error.  The solution is
    to force SQL to convert the int to varchar.  So you want something like
    select cast(id as varchar(12)) from tableA
    union
    select name from tableb
    If the datatypes are something other that int or varchar, you must find a compatable datatype and then convert one (or both) of the columns to that datatype.
    Tom

  • Row selection across multiple tables

    Hi
    I currently have multiple tables where, if the user selects a particular row or group of rows in one table the correspondign row or group of rows is selected in the other table.
    At the moment I've acheived this by placing listSelection listeners on all the tables so that when the selection on one table changes it fires an event and updates the slection on the other tables using:
    secondTable.setRowSelectionInterval(
    firstTable.getSelectedRows()[0],
    firstTable.getSelectedRows()[firstTable.getSelectedRowCount() - 1]
    );This works fine if the user selects a single row or a continuous group of rows. THe problem is if the user selected a non-continuous group, or selects a continuous group and then deselects some of these rows.
    Because the method I've got selects all rows between the start and finish of the selection it means rows are highlighted on the other tables that are not highlighted on the first table.
    My thoughts on how to approach this would be to cycle through the array of selected rows and select the corresponding rows in the other tables individually rather than selecting a range, but I can't see how to accomplish this. Could anyone give me some pointers or suggestions.
    Thanks

    What you are doing is correct in principle (use a
    listener to propagate the selection)
    Always a good start :-)
    but you need to
    understand the subtleties of the ListSelectionEvent -
    read the API carefully - it gives you a range of
    indices which may have changed but does not tell you
    whether any specific indices in that range are
    selected or unselected.
    That makes sense, the event just indicates that the selection has changed yes?
    For that you will need to get
    the source ListModel from the event and query each
    row in the event range to determine its selection
    state.
    This is where I run into difficulty. I think I can go through the each row and find out if its selected or not (using isSelectedIndex(i))
    What I'm unsure what to do is how to set that for the rows in the other ListModels. What I would have normally done would be something like
    otherListModel.getIndex(i).setSelected(firstListModel.isSelectedIndex(i));But as the api doesnt list the methods to do that I think I might not have got this concept sorted in my head. Could someone provide me with some pointers?
    Thanks

  • How to past single activity set in multiple wbs

    hi to all i have many work breakdown structure in Primavera p6.
    and i have single set of activity this is use for my all wbs so how can we copy and past please give me a step.

    hi tom thanks for answering but my query is different
    i have one set of activity and i have multiple wbs so how can i paste activities set under multiple wbs, in one go.
    eg.
    activity set
    1 one activity
    2 two activity
    3 three activity
    4 four activity
    5 five activity
    this is my set of activities and i have to paste the same set under multiple wbs, in one go.
    How can i do this? please revert.

  • Saving SQL result set in new table

    Is it possible to save a SQL result set in a new table? (easily)
    What I want to do is duplicate, or back up a table.

    Create table temp as (select a,b,c from your_table); This statement will create a table with your resultset. This will work in Oracle, I am not sure about others.

  • Implementing single sign on across multiple web apps

    Hi
    I was wondering if somebody could help me. I need to implement single sign on
    for multiple web apps deployed in separate WARs in a single EAR file. I need
    to authenticate against an LDAP server and ensure that the user only has to sign
    on once per user session even if the user navigates between web apps. The weblogic
    docs only seem to go so far, i.e. "Single sign on works if each web app uses the
    same cookie" etc. So I see that, apart from buying WebLogic Enterprise Security
    there are only two ways of doing this:
    1. Implement single sign on.
    2. Create my own security realm with my own authenticator implementations.
    So my questions are:
    1. We don't want to effect the normal weblogic user/passwords used to access the
    WLS console but need to have single sign on. Should we implement single sign on
    (option 1,above) or create our own realm?
    2. Can somebody point me to somewhere on the web/in the the WLS documentation
    that shows me how to implement single sign on using session cookies?
    TIA
    Mik

    "Mik Quinlan" <[email protected]> wrote in message
    news:[email protected]..
    >
    Hi
    I was wondering if somebody could help me. I need to implement singlesign on
    for multiple web apps deployed in separate WARs in a single EAR file. Ineed
    to authenticate against an LDAP server and ensure that the user only hasto sign
    on once per user session even if the user navigates between web apps. Theweblogic
    docs only seem to go so far, i.e. "Single sign on works if each web appuses the
    same cookie" etc. So I see that, apart from buying WebLogic EnterpriseSecurity
    there are only two ways of doing this:
    1. Implement single sign on.
    2. Create my own security realm with my own authenticator implementations.
    So my questions are:
    1. We don't want to effect the normal weblogic user/passwords used toaccess the
    WLS console but need to have single sign on. Should we implement singlesign on
    (option 1,above) or create our own realm?
    2. Can somebody point me to somewhere on the web/in the the WLSdocumentation
    that shows me how to implement single sign on using session cookies?
    http://e-docs.bea.com/wls/docs81/security/thin_client.html#1039551
    That also has a pointer to:
    For more information, see session-descriptor in Assembling and Configuring
    Web Applications.

  • How to display results set of multiple reports into a single report table

    Our goal is to create a single report (or dashboard) that shows the "funnel" of object creations related to each campaign. The flow goes from Activity to Lead to Opportunity as well as multiple steps within each (ie. Unqualified Lead -> Qualified Lead, etc).
    We currently have 3 separate reports in three different subject areas, each reporting the different metrics and we would like to combine the output into a single Unified report.
    For example what we currently have is:
    Activities:
    Campaign Name # of Activities
    Campaign A 12
    Campaign B 26
    Leads:
    Campaign Name # of Leads # of Qualified Leads
    Campaign A 10 4
    Campaign B 20 18
    Opportunities:
    Campaign Name # of Opportunities # of Opps per Sales Stage ... # of Wins Closed Revenue
    Campaign A 3 2 1 $1,000.00
    Campaign B 10 8 3 $2,800.00
    What we want to see is:
    Combined:
    Campaign Name - Campaign Cost - # of Activities - # of Leads - # of Qualified Leads - # of Opportunities - # of Opps per Sales Stage - # of Wins - Closed Revenue
    Campaign A - $423.00 - 12 - 10 - 4 - 3 - 2 - 1 - $1,000.00
    Campaign B - $ 1,000.00 - 26 - 20 - 18 - 10 - 8 - 3 - $2,800.00
    We have tried using the "Combine with similar analysis" but the number of columns for each subject area differ. We also tried creating multiple UNION criteria (one for each column), but in the case of # of Opps per Sales Stage and Closed Revenue, those are not "Metrics" fields, so they won't combine.

    Hi, You may have to create some dummy fields to equate the no. of field in each of the report matching the data type too and get a one single report using combined analytics and then using the resultant data you can create a simple pivot like below. Haven't tried it before
    -- Venky CRMIT
    Hi Venky,
    I am facing the same problem. Can you please say Steps how to create resultant data and Combine in pivot Table .
    Please Help me .
    Thanks in Advance .
    My mail id is :
    [email protected]

  • Multiple Result Set Using Nested Table

    Package declaration------------
    CREATE or REPLACE PACKAGE dummy
    AS
    TYPE CResValues IS TABLE OF VARCHAR2(2000);
    FUNCTION GetValue(p_user IN VARCHAR2,
    p_owner IN VARCHAR2, p_resource IN VARCHAR2,
    ResValues OUT CResValues) RETURN INTEGER; END dummy;
    Package Body declaration------------
    CREATE OR REPLACE PACKAGE BODY dummy
    BEGIN
    FUNCTION GetValue(p_user IN VARCHAR2,
    p_owner IN VARCHAR2,
    p_resource IN VARCHAR2,
    ResValues OUT CResValues) RETURN INTEGER IS
    ----implementation
    END dummy;
    /* Problems While executing HELP*/
    DECLARE
    TYPE CResValues IS TABLE OF VARCHAR2(2000);
    resvalues CResValues;
    total INTEGER; BEGIN
    select dummy.GetValue('tt', 'test', 'test', resvalues) INTO total FROM DUAL;
    END;
    /////////ERROR in PL/SQL////////////////
    ERROR at line 5:
    ORA-06550: line 5, column 8:
    PLS-00306: wrong number or types of arguments in call to 'dummy'
    ORA-06550: line 5, column 1:
    PL/SQL: SQL Statement ignored
    null

    Thank you for the response.
    I used the XMLType and Queue is created so far ok. This queue is actually used through Event Based Queue in Scheduler. Now when i use the XMLTYpe payload and specify that in event_condition as follows in dbms_scheduler.create_job it throws "ORA-25448: rule . has errors".
    following is the code. Does this mean dbms_scheduler queue spec does not support XMLType payload?
    dbms_scheduler.create_job(
    job_name => v_name,
    job_type => 'stored_procedure',
    job_action => v_action,
    start_date => systimestamp,
    queue_spec => v_qspec,
    event_condition => 'tab.user_data.xdata.extract(''/Application/@name'') = '''||v_event1||''' and tab.user_data.extract(''/Application/Scripts/Procedure/@name'')= '''||v_event2||'''',
    enabled => true,
    auto_drop => true);
    dbms_scheduler.set_attribute(name => v_name, attribute => 'max_runs', value => 1);
    dbms_scheduler.set_attribute(
    name => v_name,
    attribute => 'raise_events',
    value => dbms_scheduler.job_all_events);
    exception when others then
    dbms_output.put_line(sqlerrm);
    my xml message is like below
    <?xml version="1.0"?>
    <Application id="1" name="TEST" module="EXP">
         <Scripts> ||chr(10)||<Procedure id=1 name="sp_init"/>||chr(10)||</Scripts>||chr(10)||
    </Application>

Maybe you are looking for

  • Fault Messages/Response handling in File-XI-SOAP scenario

    Hi I have a File-XI-Webservice scenario. Suppose I am sending a call "Request" to the webservice with 4 fields a,b,c and d. If the call is succesful we get an epmty "Response" back. Suppose any of the fields a,b,c or d are missing then the webservice

  • New IMac 24" problems!

    I previously used Windows XP but decided there were too many headaches with their OS. So after watching and reading ads and reviews for iMAC decided to buy it. I ordered it on the launch day of Leopard. When I received it, I found out I needed to ins

  • How to use Dreamweave​r instead of Site Builder

    I created a website using Dreamweaver and used its FTP capability to upload the files.  I used the settings (HOST NAME: ftpmysite.verizon.net, User Name: your user ID (e.g. - jsmith), PASSWORD: your password) that were published here.. http://www.ver

  • Oracle Database: productivity increase

    Hi all, in our company we use the three-tier architecture base on Oracle products: client(web browser) - application server (Oracle AS 10g) - database server (Oracle database 10g). and we plan to appreciably increase number of clients. And it is nece

  • Counter to generate event after certain counts

    Hi everyone, I would like to use my PXI card to generate an event (to my software) every say, 100 counts(for 100kHz Timebase). In other words, is it possible to generate an event every 1 ms based on the counts on the counters.  Also, is it possible t