URGENT query multiple views

Hi,
I want to query on multiple views, how do I do that?
I have a view (foto_main) with primary key foto_id and 6 other attributes.
I have 2 other views (foto_link_feat and foto_link_pict) that are linked with foto_main.
Foto_link_feat has 2 attributes (foto_id and feat_id) and foto_link_pict has also 2 attributes (foto_id and pict_id).
I want to create a query on all the attributes in foto_main and on feat_id and foto_id.
You can create a new view with al the attributes you want to search but that is not a good solution.
Does anyone know how to solve this problem??

I believe that there was a suggestion/feature request which involves defining ViewObjects which do not work on database tables/views, but on other ViewObjects. I guess this is what you would want.
However, that still would mean defining yet another ViewObject. So I guess, that wouldn't be much different to creating a new ViewObject in your current situation.
Or.. in case I misunderstood you, you can alter an existing ViewObject in a way that it queries multiple tables/views. In order to do that, just set the query to expert mode and enter a simple join or whatever.
HTH

Similar Messages

  • Complex Query - Joins vs Multiple Views

    I am trying to run a query that joins a main table representing people with 7 others that contain demographic and status information. Some of the other tables don't have records or have more than one record per person. For the instances of more than one phone number for a person, I need to filter out all but the active home number record. If the person doesn't have a phone number, I still need a record returned, just without a phone number listed. I have tried joining all the tables in a single query, but can't get every person to show up in the results. If the person doesn't have a phone number, or has a phone number that isn't both active and "Home" then they don't show up... I got around this by using multiple views to make sure everyone was pulled, but the multi level view runs slow as heck... Here are the two approaches. Any ideas?
    Here are the views that work:
    CREATE OR REPLACE VIEW pinnacle_address AS SELECT p.person_id, a.line1 | | ' ' | | a.line2 | | ' ' | | a.line3 AS StreetAddress, a.city, a.state, a.zip FROM cmn_people p, cmn_people_addresses a WHERE p.person_id=a.person_id(+) and a.Active_Address = 'Y' and a.Address_Type = 'Home';
    CREATE OR REPLACE VIEW pinnacle_phone AS SELECT p.person_id, ph.phone_number, ph.phone_number_type FROM cmn_people p, cmn_phone_nos ph WHERE p.person_id=ph.person_id(+) and ph.active_phone_number = 'Y' and ph.primary_flag = 'Y';
    CREATE OR REPLACE VIEW pinnacle_people AS SELECT p.person_identifier01, p.last_name, p.first_name, p.middle_name, p.date_of_birth, p.gender, a.StreetAddress, a.city, a.state, a.zip, ph.phone_number, ph.phone_number_type, p.email, p.ssn, p.ethnic, p.fulltime, p.person_id FROM cmn_people p, pinnacle_address a, pinnacle_phone ph WHERE p.person_id=a.person_id(+) and a.person_id = ph.person_id(+);
    CREATE OR REPLACE VIEW pinnacle_student AS SELECT DISTINCT p.person_identifier01, p.last_name, p.first_name, p.middle_name, p.date_of_birth, p.gender, p.streetaddress, p.city, p.state, p.zip, p.phone_number, p.email, p.ssn, p.ethnic, p.fulltime, i.student_instance_id, e.comb_id FROM sss_student_enrollments e, sss_student_instance i, pinnacle_people p, cmn_statuses s WHERE e.person_id=i.person_id and i.person_id=p.person_id and i.status_id=s.status_id and s.status in('Active', 'Accepted');
    Here's the single sql that doesn't:
    CREATE OR REPLACE VIEW pinnacle_test AS SELECT DISTINCT cp.PERSON_IDENTIFIER01, cp.LAST_NAME, cp.FIRST_NAME, cp.MIDDLE_NAME, cp.DATE_OF_BIRTH, cp.GENDER, cpa.LINE1 | | ' ' | | cpa.LINE2 | | ' ' | | cpa.LINE3 AS StreetAddress, cpa.CITY, cpa.STATE, cpa.ZIP, cph.PHONE_NUMBER, cp.EMAIL, cp.SSN, cp.ETHNIC, cp.FULLTIME, si.STUDENT_INSTANCE_ID, se.COMB_ID FROM SSS_STUDENT_ENROLLMENTS se, SSS_STUDENT_INSTANCE si, CMN_STATUSES cs, CMN_PEOPLE cp, (SELECT * FROM CMN_PEOPLE_ADDRESSES WHERE Active_Address = 'Y' and Address_Type = 'Home') cpa, (SELECT * FROM CMN_PHONE_NOS WHERE active_phone_number = 'Y' and primary_flag = 'Y') cph WHERE se.PERSON_ID = si.PERSON_ID and si.STATUS_ID = cs.STATUS_ID and si.PERSON_ID = cp.PERSON_ID and cp.PERSON_ID(+) = cpa.PERSON_ID and cpa.PERSON_ID(+) = cph.PERSON_ID and cs.status in ('Active', 'Accepted');
    Thanks in advance,
    Erik Marin
    [email protected]

    CREATE OR REPLACE VIEW pinnacle_student
    AS
    SELECT DISTINCT p.person_identifier01,
    p.last_name,
    p.first_name,
    p.middle_name,
    p.date_of_birth,
    p.gender,
    a.line1 | | ' ' | | a.line2 | | ' ' | | a.line3 AS StreetAddress,
    a.city,
    a.state,
    a.zip,
    ph.phone_number,
    p.email,
    p.ssn,
    p.ethnic,
    p.fulltime,
    i.student_instance_id,
    e.comb_id
    FROM sss_student_enrollments e,
    sss_student_instance i,
    cmn_people p,
    cmn_people_addresses a,
    cmn_phone_nos ph,
    cmn_statuses s
    WHERE e.person_id = i.person_id
    and i.person_id = p.person_id
    and i.status_id = s.status_id
    and p.person_id = a.person_id(+)
    and p.person_id = ph.person_id(+)
    and s.status in ('Active', 'Accepted')
    and a.Active_Address(+) = 'Y'
    and a.Address_Type(+) = 'Home'
    and ph.active_phone_number(+) = 'Y'
    and ph.primary_flag(+) = 'Y';
    null

  • Passing one parameter to multiple views

    Is this possible?  I would like to pass one parameter, a date field, to multiple views.  I cannot use it in the record selection, because my views do a mathematical computation which returns a single value, but I only want to select the data for a single day. 
    The problem is that there are several views and I do not want to have to enter the date parameter a dozen times.

    Try to use add command and write the query like this
    select * from view where datefield={?date}
    also create another add command for the other view
    select * from view2 where datefield2={?date}
    for all the queries create the same parameter with the name {?date}
    Regards,
    Raghavendra

  • Same BI query multiple times, different variable values ...

    Hi all, Im having a problem executing a BI query multiple times, passing different parameters. What I did is drag & drop the query multiple times (from the "Find Data" section) and pass different variable values from the signal-in of the nested iview that contains all of them, everyone has its own chart view. The problem is, only the first occurrence of the query is showing (only the first chart). I dont know if there is a restriction, or if I am missing something.
    Thanks in advance.
    Daniel

    Hi all, forget about this, it was a problem in the query definition not in visual composer. Im closing this thread.
    Regards.
    Daniel

  • Querying Multiple databases on Azure SQL

    Does anybody know if there is a way to query multiple Azure sql databases in a query?
    I have tested the query on a standard sql server I have setup here and that works fine.
    I believe Azure does not support cross database queries and you have to do an elastic database query.  Any ideas how this works?
    This topic first appeared in the Spiceworks Community

    Hello. We currently have a database cluster that has a WSUS database on it.  We wanted to setup another WSUS server in our environment, is this possible?  I have read some posts saying that there was a 1 to 1 for WSUS DB to SQL Instance
    but those were from 2008 and 2011 and I am wondering if it is possible today.  If not, what would be the recommendation?  Another SQL Instance or just use the Windows Internal Database. 
    There is still a limitation of 1 WSUS to 1 SQL Instance, because the database name is hardcoded to SUSDB. To use multiple WSUS servers on that same cluster will require the installation of an additional instance.
    If that additional server is destined to be a downstream server, though, I would recommend just using the native Windows Internal Database on the local system.
    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

  • One big report, multiple views

    is it ok (as a good practice) in OBIEE Answers, when dealing with a complex BM, to build a big report with lots of dimensions and measures involved , and then create many views for that report, each using a limited number of dimensions / measures available in the report ?
    I have experienced a few cases when a complex report with multiple views displays incorrect results , while if creating simpler reports for each of the views the results are correct.
    and that seems to me because, on each of the small simple reports a correct sql query is generated, while on the big report OBIEE tries to achieve the requirements using just one or two much more complex (and with lower granularity) queries ( the result of which are are used by presentation layer to further compute -sometimes incorrectly- the values for each of the report views).
    sometimes even when I exclude a dimension column from all views (while is still present in the report) the sql query generated still use it.
    is this a normal behavior ? have anyone experienced similar issues ? I'm having some hard time explaining these to the users that create reports.
    thank you.

    Couldn't find anything in the documentation to support that , though. How to explain this to the report writers ? many times it is more convenient to them to just create a big report with lots of views...instead of many reports.

  • Query multiple rows

    Hi, need some help on XML and XSD.
    say I have a table in the database with 3 columns: a, b, c
    on my XDP form, I have a table, like a spreadsheet, with 3 columns too: x, y, z
    and it has 10 rows.
    I want to pre-fill the form with 10 rows of data,
    so, in my Process's action profile,
    I use JDBC's query multiple rows to get the first 10 records of my database table.
    how do I put these 10 rows of data into the table on my form?
    TIA for helping me.
    Happy New Year!

    Step1: Use SQL Query Multiple results as XML activity
    Step2: Define the output of SQL activity to look similar to
    <table>
        <row>row1 value</row>
        <row>row2 value</row>
        <row>row3 value</row>
        <row>row4 value</row>
        <row>row5 value</row>
        <row>row6 value</row>
        <row>row7 value</row>
        <row>row8 value</row>
        <row>row9 value</row>
        <row>row10 value</row>
    </table>
    Step3: arrange your forms fields (Table and rows) in the same way as mentioned above.
    Nith

  • Query to view the support group of a generated ticket in the Database, not the Data Warehouse

    Hi,
    I need a query to view the support group of a generated ticket, but the query must be useful in the only Database (I don't know what happened in the DW, could be a issue).
    Please help me,
    Greetings! 

    it's "possible", in the same way that low temperature fusion and space elevators are "possible". There's nothing conclusively ruling it out, but not something you want to attempt on your own under a time constraint. 
    The "Active" ServiceManager database is a 5th or 6th normal form dynamic software defined snowflake schema representitive object database. Updating the database directly is strictly unsupported, and
    Travis has discouraged people from even trying to read from it. a college of mine does service manager and operations manager databases at a 400+ level full time, and after 2+ years of doing it, he
    almost understands the operational database. it's WELL beyond me, and I do Service Manager basically full time. 
    That being said, if you are brave and only looking for some basic data, you might be able to tease some things out with the SQL management studio and a good grasp of SQL syntax.
     for a production environment, you're much better off fixing the DW. 

  • SQL query or view used internally by Discoverer Open Workbook from Database

    Hi Experts,
    I am involved in developing a web application wherein I have to display the 'All Workbooks' similiar functionality in the 'Open Workbook from Database' dialog box of Discoverer. Can anybody provide me with the background query or view that Discoverer uses to retrieve this data for workbook listing? Please let me know if my question is confusing and requires more details.
    Thanks
    Thomas

    Hi,
    If you just need the list of workbooks then you need to use the EUL_DOCUMENT table:
    SELECT u.User_Name          Owner_Name
    *,Doc.Doc_Name Workbook_Name*
    *,Doc.Doc_Updated_Date Last_Update_Date*
    FROM   Eul_Us.Eul5_Documents Doc
    *,Eul_Us.Eul5_Eul_Users Own_Usr*
    *,Fnd_User u*
    WHERE  Own_Usr.Eu_Id = Doc.Doc_Eu_Id AND
    To_Char(u.User_Id(+)) = Substr(Own_Usr.Eu_Username
    *,2*
    *,10);*
    If you want the exact same list then you need to do the above along with the sharing :
    SELECT DISTINCT
    case when instr(disco_docs.doc_created_by,'#')=0 then disco_docs.doc_created_by
    when instr(disco_docs.doc_created_by,'#')>0 and instr(disco_docs.doc_created_by,'#',2)=0 then (select fu.user_name from fnd_user fu where fu.user_id=substr(disco_docs.doc_created_by,2,5))
    else NULL
    end "Workbook Owner/Creator",
    disco_docs.doc_name "Workbook Name",
    disco_docs.Doc_Updated_Date  "Last Update Date",
    case when instr(disco_users.eu_username,'#')=0 then disco_users.eu_username
    when instr(disco_users.eu_username,'#')>0 and instr(disco_users.eu_username,'#',2)=0 then (select fu.user_name from fnd_user fu where fu.user_id=substr(disco_users.eu_username,2,5))
    else (select resp.responsibility_name from fnd_responsibility_tl resp where resp.responsibility_id=substr(disco_users.eu_username,2,5))
    end as "Shared Name / Responsibility"
    FROM
    eul_us.eul5_documents disco_docs,
    eul_us.eul5_access_privs disco_shares,
    eul_us.eul5_eul_users disco_users
    WHERE
    disco_docs.doc_id = disco_shares.gd_doc_id (+)
    and disco_users.eu_username(+) NOT IN ('EUL5', 'PUBLIC')
    AND disco_users.eu_id(+) = disco_shares.ap_eu_id;
    * Change the EUL_US to your discoverer schema...
    Then you will need to compare the current user with the sharing list or creator
    Good luck
    Tamir

  • HOW CAN I USE MULTIPLE VIEWS IN ONE BLOCK

    What I need to do is based on a selection, I have a detail block that shows the results. My selection would determine which view to display in the detail block.
    So for example, my selection is:
    Source: A
    Year 2005
    I would then display the details by querying A_2005_VIEW
    I can query a view dynamically using the QUERY_DATA_SOURCE_NAME however, my problem is, each view has different column names. How do I show different columns based on specific views?

    You could use a "From Clause Query" as the block data source. You can change that dynamically.
    Create generically named database items on the block COL1, COL2, ... COLn
    Then depending on the users choice in the selection criteria, use the WHEN-NEW-BLOCK-INSTANCE trigger on the query block to
    set_block_property(..., query_data_source_name,
    '(SELECT viewcol1 COL1, viewcol2 COL2, .... , viewcoln COLN
    FROM <whichever view>)');
    This will work because Forms constructs the block query thus:
    SELECT COL1, COL2, ..., COLN
    FROM <blocks query_data_source_name>
    so you are using the aliases in your query to match the forms database items names.

  • How can I have multiple views for my question

    When I posed a question on a forum, it indicates that I have one (1) view. How can I have multiple views on the same question?

    I believe the number you are looking at is the number of times a particular thread has been looked at (viewed) by different users. When someone else opens your question, the view count should increase.
    Justin

  • Can Numbers Display Multiple Views of the Same Table

    Hi,
    Excel and Appleworks both have a pull down tab on the vertical bar allowing multiple views into the same spreadsheet (table). Can Numbers do this?
    I have a set of calculations at the top of a spreadsheet that are based on years and years worth of data under the calculations (same column). I add data for each new event (the rows) and watch the calculations at the top of the data. Easy to do in Excel or Appleworks, but, I can't figure out how to do this in Numbers.
    Example:
    Spot1 Spot2
    Total 15 36
    Avg 5 12
    Jan 09 5 10
    Feb 09 6 20
    Mar 09 4 6
    Apr 09
    So... does Numbers allow the view "split" or multiple views that Excel and Appleworks allow?
    Thanks!
    Tom

    Question asked and responded several times:
    feature unavailable.
    For multiple views of a table there is an easy workaround as we may build a table whose every cells grab their contents from the 'master' one.
    _Go to "Provide Numbers Feedback" in the "Numbers" menu_, describe what you wish.
    Then, cross your fingers, and wait _at least_ for iWork'10
    Yvan KOENIG (VALLAURIS, France) mardi 1 septembre 2009 21:56:42

  • Is it possible the query in view object is dynamic?

    Is it possible the query in view object is dynamic?
    Generally, make the column list dynamic.
    I think this is related to whether view object can be assembled at runtime based on a dynamic cursor in a procedure?
    I ask this because I would like to know how we can use OA framework to simulate crosstab workbook in Discoverer?
    Anybody has some clues, please advise.
    Thanks.

    Hi Shay,
    Let me tell you briefly... I am sending input as customerId,customerNumber,CustomerName to the web service, if the record is available i am getting the response and i am displaying those records on page as a table. Now when i click a row i need to populate another table with all sale orders of that customer. From webservice datacontrol i have only customer object, I dont have Sales Order Object. For this i need master detail relation. In this case how to proceed. Thats why i am thinking to create a vO and EO object for sales orders table and i want to create view link for this sales order and customers. As i don't have customer VO and EO object to create view link.

  • How to build sql query for view object at run time

    Hi,
    I have a LOV on my form that is created from a view object.
    View object is read-only and is created from a SQL query.
    SQL query consists of few input parameters and table joins.
    My scenario is such that if input parameters are passed, i have to join extra tables, otherwise, only one table can fetch the results I need.
    Can anyone please suggest, how I can solve this? I want to build the query for view object at run time based on the values passed to input parameters.
    Thanks
    Srikanth Addanki

    As I understand you want to change the query at run time.
    If this is what you want, you can use setQuery Method then use executeQuery.
    http://download.oracle.com/docs/cd/B14099_19/web.1012/b14022/oracle/jbo/server/ViewObjectImpl.html#setQuery_java_lang_String_

  • I have been working on a book and have 418 photos already in my book.  All of a sudden I cannot access the book format to see the multiple view, spread view, or single view.  I can no longer see my book although I still see the collection with 418 photos

    I have been working on a book and have 418 photos already in my book.  All of a sudden I cannot access the book module and clicking on the multiple view, spread view, or single view does not take me back to the book I have been working on.  I can no longer see my book although I still see the collection with 418 photos under collections.  What I do see is a blank template for a new book and I can't find the unfinished book I started with 418 photos.  It is like the new empty template is somehow covering it up.  How do I get back to the book I have been working on?

    Is it possible you mistakenly clicked on a [Clear Layout] button?
    But a great hint is- Always click on the [Create a Saved Book] button, early in your new book design.
    Then you have a permanent link to the book in the Collections panel. (In addition to the standard collection of your selected images)
    Note: a Book Collection shows an icon that looks like a book.
    Every time you come back to edit the book, open the Book Module by clicking on the white arrow that appears on the end of your Book Collection title. (The title as saved)
    Re-opening a book without using the "Saved Book" option can have unpredictable results.
    A "Book" Collection is like a "Smart Collection" because anything you do to the book design, change pages, change images, etc,  is automatically updated in the Saved Book collection.

Maybe you are looking for

  • How to display a char as most detailed node of a hierarchy?

    Hi specialists, BEx 7.0 knows a function "Display the Row Hierarchically and Expand Till" (Query-Properties --> Data Formating) This function positions a characteristic instead in an own column as further node in the hierarchy - tree. I know that sim

  • Managing Tasks on Ethernet cDAQ - Best Practice

    Hi all, I'm currently working on a multi-station machine to perform functional product tests using an NI cDAQ 9188. Each station in the machine performs the same function but is intended to run independently. Basically a given station is loaded with

  • CC Booklet Printing

    Hello. I am having trouble printing a 20-page document as a Postscript file into spreads. The Setup option is grayed out. I have 8.5x11 pages set up but need to print to 11x17 for saddle stitch printing. Any help would be appreciated!

  • Picture with dynamic size?

    Hello, I post a Picture (OLE) on an CR Page. Depending on the parameters in the report, differnt pictures with different Sizes are selected. Now I want to fix the maximal hight and width of the space I reserve for the picture but keep the ratio betwe

  • MobileMe not is not sync with iCal

    i desperatly need help. My iCal information is stored in the MobileMe clud and in my iPod Touch. But when i make syncronisation it just doesent appear in my iCal on mi iMac. I already deleted all the ical forlders and done some testings but have not