Subquery referencing parent query table????

Well my problem ( which I hope has a solution :) ) is the following:
I work on a little OS Advertising project.
When an advertiser wants to start a campaign, he must see the list of the publisher websites where he can advertise.
::::SELECT [...] FROM website wsite[...]
With their places count
::::[...]COUNT(place.id) AS placeCnt[...]INNER JOIN place ON place.website_id = wsite.id[...]
-Yes but the websites that have at least 1 place
::::[...]GROUP BY wsite.id HAVING COUNT(place.id)>0[...]
-And here comes my big dead end problem:
I would like to remove the websites where the advertiser can't advertiser.
I mean by there > if every ads of the advertiser are blacklisted for the site "google.com", he can't see "google.com" in the list because he won't be able to advertiser on in anyway.
however, if the advertiser has 4 ads, and all of it are blacklisted excepted the 4th, he must see "google.com" because he can advertise with the ad #4.
There is 2 types of blacklisting :
targetted ( by defining a website id on the blacklist line )
global ( by setting the website id = null , so for example if ad#1 is globally blacklisted by user #1, ad#1 couldn't be able to advertise on every websites of user#1 )
I thought I found a solutoin put it doesn't seem to work:
::::WHERE 0< (
SELECT COUNT(DISTINCT ad.id)
FROM ad
LEFT OUTER JOIN blacklist bl ON bl.ad_id =ad.id AND (bl.website_id=wsite.id OR bl.site_id IS NULL)
WHERE ad.user_id= $userid
AND bl.id IS NULL
A concrete scenario example: ( SQL included at the end of the post )
the user [email protected] ( userid = 2 ) has 3 ads.
-"my forbidden ad" ( id = 1)
-"my ad" ( id = 2 )
-"my unappreciated ad" ( id = 3 )
the user [email protected] ( userid = 1 ) has 3 websites
-google.com ( id = 1 )
-yahoo.com ( id = 2 )
[email protected] has blacklisted the following ads:
-"my unappreciated ad" ON yahoo.com, type targetted, ( website_id = 2, ad_id = 3 , publisher_id = 1)
-"my forbidden ad" type global, ( website_id = null , ad_id = 1 publisher_id = 1)
so the publisher websites we'll see with the resulting query should be ( as the the advertiser, user 2 ) :
google.com
yahoo.com
lol.com
WHY?
-Because the advertiser can advertise thanks to ad 2 ( ad2 is allowed to be advertised on each website )
-Even if "forbidden ad" is blacklisted globally, unapprediated ad remains for google.com
NOW, if the publisher adds another blacklist restriction
-"my ad" , type global ( website_id = null, ad_id = 2 , publisher_id = 1)
the result would be ( as the the advertiser, user 2 )
google.com
WHY?
-Because the advertiser do not have any ad to put on yahoo.com. Ad 1 and Ad 2 are blacklisted globally, ad 3 is blacklisted for yahoo.com
WELL, I thought I found the solution by this query but mysql returns an error > unknown colum on the subquery
THe only thing I want to is to LINK the parent query WITH the subquery ON bl.site_id=psite.id
Enfin bon, tout ça pour un truc qui semblait être possible avec cette requête mais qui renvoie donc une erreur de unknown column:
SELECT wsite.*,COUNT(place.id) AS placeCnt
FROM website wsite
INNER JOIN place ON place.website_id = wsite.id
WHERE 0< (
SELECT COUNT(DISTINCT ad.id)
FROM ad
LEFT OUTER JOIN blacklist bl ON bl.ad_id =ad.id AND (*bl.website_id=wsite.id* OR bl.website_id IS NULL)
WHERE ad.advertiser_id= 2
AND bl.id IS NULL
GROUP BY wsite.id
HAVING COUNT(place.id)>0
WELL THANKS A LOT to have read this post, AND THANK YOU EVEN MORE IF SOMEONE FIND A TRICK!
PS :
( the only solution I can see for the moment is a loop like )
foreach($publisher_sites as $s){
if(advertiserCanAdvertiser($s['id'])) $sites[]=$s
but the performances are really bad
I think the following would help :)
MySQL Data Transfer
Source Host: localhost
Source Database: orads
Target Host: localhost
Target Database: orads
Date: 10/20/2009 1:02:03 PM
SET FOREIGN_KEY_CHECKS=0;
-- Table structure for ad
DROP TABLE IF EXISTS `ad`;
CREATE TABLE `ad` (
`id` int(11) NOT NULL auto_increment,
`title` varchar(32) NOT NULL,
`url` varchar(50) NOT NULL,
`advertiser_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
-- Table structure for blacklist
DROP TABLE IF EXISTS `blacklist`;
CREATE TABLE `blacklist` (
`id` int(11) NOT NULL auto_increment,
`ad_id` int(11) NOT NULL,
`website_id` int(11) default NULL,
`publisher_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-- Table structure for place
DROP TABLE IF EXISTS `place`;
CREATE TABLE `place` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(32) NOT NULL,
`website_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
-- Table structure for user
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(11) NOT NULL auto_increment,
`email` varchar(64) NOT NULL,
`password` varchar(16) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-- Table structure for website
DROP TABLE IF EXISTS `website`;
CREATE TABLE `website` (
`id` int(11) NOT NULL auto_increment,
`title` varchar(32) NOT NULL,
`url` varchar(32) NOT NULL,
`publisher_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
-- Records
INSERT INTO `ad` VALUES ('1', 'my forbidden ad 1', 'http://www.no.com', '2');
INSERT INTO `ad` VALUES ('2', 'my ad 2', 'http://www.lol.com', '2');
INSERT INTO `ad` VALUES ('3', 'my unappreciated ad 3', 'http://www.abc.com', '2');
INSERT INTO `blacklist` VALUES ('1', '1', null, '1');
INSERT INTO `blacklist` VALUES ('2', '3', '2', '1');
INSERT INTO `place` VALUES ('1', 'banner1', '1');
INSERT INTO `place` VALUES ('2', 'yahoo banner', '2');
INSERT INTO `user` VALUES ('1', '[email protected]', 'publisher');
INSERT INTO `user` VALUES ('2', '[email protected]', 'advertiser');
INSERT INTO `website` VALUES ('1', 'google', 'http://www.google.com', '1');
INSERT INTO `website` VALUES ('2', 'yahoo', 'http://www.yahoo.com', '1');
Edited by: user12086067 on Oct 20, 2009 4:51 AM

Hi,
Welcome to the forum!
Interesting problem!
Here's one way to do that in Oracle:
SELECT DISTINCT     w.*
FROM     website     w
JOIN     place     p  ON     p.website_id     = w.id
JOIN     ad     a  ON     w.publisher_id     NOT IN (
                                SELECT     b.publisher_id
                                FROM     blacklist     b
                                WHERE     b.ad_id     = a.id
                                AND     COALESCE ( b.website_id
                                                , w.id
                                         ) = w.id
WHERE     a.advertiser_id     = 2     -- parameter
;Thanks for posting the CREATE TABLE and INSERT statements. Since this is an Oracle forum, you should post statementts that will work in Oracle.
I don't know anything about MySQL, so I don't know if you'll need to change query above or not.
This doesn't quite produce the output you requested, since lol.com isn't in the website table. Do you need to get lol.com from the user table somehow?

Similar Messages

  • Loading to Parent -Child Tables simultaneously

    I have a requirement to populate parent-child tables in a single interface simultaneoulsy. I couldnt find anyway to add multiple targets and am wondering why this key feature is absent in ODI. The same thing is easily achievable in BPEL.
    Could some one please advice a work around for this.
    Your help is much appreaciated

    ODI 11g does come with a new IKM 'IKM Oracle Multi Table Insert'. This does allow multi table inserts, but will require more than one interface.
    Oracle Multi-Table Inserts
    A new Integration KM for Oracle allows populating several target tables from a single source, reading the data only once. It uses the INSERT ALL statement.
    COMPONENT NAME: IKM Oracle Multi Table Insert
    COMPONENT VERSION: 11.1.2.4
    AUTHOR: Oracle
    COMPATIBILITY: ODI 11.1.1.3 and above
    DESCRIPTION:
         - Integrates data from one source into one to many Oracle target tables in append mode, using a multi-table insert statement (MTI).
    REQUIREMENTS:
         - Oracle Database 9iR1 or above
         - See BASIC CONFIGURATION section
    BASIC CONFIGURATION
         - This IKM must be used in integration interfaces that are sequenced in a Package:
              - The first interface of the Package must have a temporary target and the KM option DEFINE_QUERY set to YES.
              This first interface defines the structure of the SELECT clause of the multi-table insert statement (that is the source flow).
              - Subsequent integration interfaces must source from this temporary datastore and have the KM option IS_TARGET_TABLE set to YES.
              - The last interface of the Package must have the KM option EXECUTE set to YES in order to run the multi-table insert statement.
              - Do not set "Use Temporary Interface as Derived Table(Sub-Select)" set to true on any of the interfaces.
         - If large amounts of data are appended, consider to set the KM option OPTIMIZER_HINT to /*+ APPEND */.
    OPTIONS (Refer to the Option descriptions for more information on each option)
         - DEFINE_QUERY: Set to Yes if this interface describes the source query (SELECT clause of the statement). This interface must have a temporary target.
         - IS_TARGET_TABLE: Set to Yes this interface using the source query to load one of the target tables. This interface must source from an interface with a temporary target using this IKM and having the KM option DEFINE_QUERY set to YES.
         - EXECUTE: Set to Yes for the last interface in the Package. This interface will run the multi-table insert statement.
         - COMMIT: Commit transaction. This applies only to the last interface in the Package.
         - TRUNCATE: Set to Yes to truncate this interface target table.
         - CREATE_TARG_TABLE: Create target table? May only be used on target interfaces, but not on source interfaces (defining the source data).
         - OPTIMIZER_HINT: Hint for the multi-table insert statement.
    RESTRICTIONS:
         - This KM can only be used in integration interfaces that are part of a Package.
         - All source and target datastores need to reside on same data server.
         - Journalized source data is not supported.
         - Temporary indexes are not supported.
         - Flow/static control is not supported.
         - The TRUNCATE option cannot work, if the target table is referenced by another table (foreign key).

  • How to identify all the child tables referencing a master table

    Hi,
    How to identify all the child tables referencing a master table.
    Could you please help me...
    Thanks in advance...

    Hi!
    You may use this query:
    SELECT master.table_name, child.table_name
    FROM   user_constraints master, user_constraints child
    WHERE  master.table_name IN ('REGIONS')
      AND  master.constraint_name = child.r_constraint_name
    /yours sincerely
    Florian W.

  • REFERENCING PARENT clause of CREATE TRIGGER

    Hi All-
    I have a mystery. Create Trigger, described in my "Oracle 8i: The Complete Reference" (Pg 1046-7 in my) book includes a syntax diagram which shows
    REFERENCING OLD AS ...
    REFERENCING NEW AS ...
    REFERENCING PARENT AS ...
    All as valid referencing clauses. OLD and NEW are discussed in the text, but PARENT is not.
    What does this do? I am trying to solve a problem and this may apply.
    Thanks for any advice!!!
    David
    luked(at--no spam please)bigfoot.com

    Hi
    'If the trigger is defined on a nested table, OLD and NEW refer to the row of the
    nested table, and PARENT refers to the current row of the parent table.'
    This sentence is from SQL Reference. I never used parent in my practice.
    Regards
    null

  • How to create olap cube using Named Query Table in Data source View

     I Create on OLAP Cube using Existing Tables Its Working Fine But When i Use Named Query Table with RelationShip To other Named query Table  It Not Working .So give me some deep Clarification On Olap Cube for Better Understanding
    Thanks

    Hi Pawan,
    What do you mean "It Not Working"? As Kamath said, please post the detail error message, so that we can make further analysis.
    In the Data Source View of a CUBE, we can define a named query. In a named query, you can specify an SQL expression to select rows and columns returned from one or more tables in one or more data sources. A named query is like any other table in a data source
    view (DSV) with rows and relationships, except that the named query is based on an expression.
    Reference:Define Named Queries in a Data Source View (Analysis Services)
    Regards,
    Charlie Liao
    TechNet Community Support

  • Dbms_sql  in a different schema from query table-error  ** ORA-00942

    Oracle Experts,
    I think I am having problems with using DBMS_SQL in which the function was created in one schema and the query table was created in a different schema.
    We have 2 schemas: S1, S2
    We have 2 tables:
    T1 in Schema S1
    T2 in Schema S2
    We have a function F1 created by DBA in schema S1 that uses the dbms_sql as:
    CREATE OR REPLACE FUNCTION S1.F1(v1 in VARCHAR2) return NUMBER IS
    cursor1 INTEGER;
    BEGIN
    cursor1 := dbms_sql.open_cursor;
    dbms_sql.parse(cursor1, v1, dbms_sql.NATIVE);
    dbms_sql.close_cursor(cursor1);
    return (0);
    EXCEPTION
    when others then
    dbms_sql.close_cursor(cursor1);
    return (1) ;
    END;
    I am using jdeveloper 11G. We have an Oracle DB 11g.
    We have a java program which uses jdbc to talk to our Oracle DB.
    Basically, in my java program, I call function F1 to check if the query is valid.
    If it is, it returns 0. Otherwise, returns 1:
    oracle.jdbc.OracleCallableStatement cstmt = (oracle.jdbc.OracleCallableStatement) connection.prepareCall ("begin ? := S1.F1 (?); end;");
    cstmt.registerOutParameter (1, java.sql.Types.INTEGER);
    cstmt.setString(2, "Select * from S2.T2");
    cstmt.execute ();
    Since the table that I run the query is T2, created in different schema than F1 was created in, I have the error:
    ** ORA-00942: table or view does not exist
    So my questions are these:
    - I am using Oracle DB 11g, if I run the query on a table that created in a different schema from the one that the function (which uses dbms_sql) was created in, I would get the error ORA-00942?
    - If I runs the query on table T1 in the same schema as the function F1, would I have the same problem(The reason I ask is I cannot create any table in schema S1 because the DBA has to do it; I am not a DBA)
    - This is not a problem, but a security feature because of SQL injection?
    - How to resolve this issue other than creating the table in the same schema as the function that utilizes DBMS_SQL?
    Regards,
    Binh

    Definer rights (default) stored objects run under owner's security domain and ignore role based privileges. So regardless what user you are logged in as, function S1.F1 always executes as user S1 and ignores user S1 roles. Therefore exeuting statement within S1.F1:
    Select * from S2.T2requires user S1 to have SELECT privilege on S2.T2 granted to S1 directly, not via role.
    SY.

  • Dynamic query table for report based on LOV selected

    Hi,
    Need some suggestion and guidance how to dynamically query table via lov for report .
    Scenario:
    Table, TABLE_LIST, has tablename (table in DB) and filter (for where clause) column. The TABLENAME_LOVE is derived from table TABLE_LIST.
    SELECT TABLENAME D, TABLENAME R FROM TABLE_LIST
    In Page 2,a page select list item,P2_TABLENAME to use TABLENAME_LOV
    All data in tables in the table_list have identical structure (columns, triggers, primary key, and so on).
    I want to have the report region query from the table based on selected LOV.
    Example,
    Tablename Filter
    TB1
    CD2 ACTIVE='Y'
    When select TB1, the report regin will query based on TB1.
    When select CD2, the report regin will query based on CD2 WHERE ACTIVE='Y'
    Question:
    How can I query based on &P2_TABLENAME. WHERE &P2_FILTER.
    Like
    select col1, col2 from &P2_TABLENAME WHERE &P2FILTER
    Greatly appreciate any suggestion and some guidance.
    Tigerwapa

    Hi,
    You should always post your Apex version, DB version and other information as suggested in the FAQ.
    And the moment you talk report you should state whether it is IR or Classic.
    As for your query, have you explored the Report type "SQL Query (PL/SQL function body returning SQL query)" ?
    That might be a good fit for what you are trying to achieve.
    Regards,

  • Best way to keep parameters associated with Listobject query table?

    I'm working to establish a standard approach to retrieving data from SQL server databases into Excel based applications.  My current proposed structure allows for exactly one Listobject with a query table per sheet in a workbook.  The connection
    strings and SQL texts for all queries in the workbook are kept in a single table on its own (hidden) sheet.  Each "Datasheet" then has a table and named cells QueryName, ConnectionString and SQLText which are scoped at the sheet level.  The
    connection string and raw SQLText are retrieved from the table using QueryName as an lookup value into the QueryTable.  There are a series of parameter cells whose values are inserted into the SQL text using =Substitute() formulas, where the raw query
    text has #P1#, #P2#, etc, which are subsituted with the parameter values from the parameter cells to assemble the final query text in the named cell SQLText.  To refresh the application, a simple VBA Sub iterates through all the sheets in the workbook.
     If the sheet contains a ListObject with a Querytable, then ConnectionString and SQLText are written to the .Connection and .CommandText properties of the QueryTable and the table is refreshed.
    This works great, but I have a developer who has asked to be able to put multiple Listobjects with querytables on a single sheet so he doesn't need so many sheets in the workbook.  My first though was why do you care how many sheets you have, but on
    the other hand a single sheet can certainly handle more than one ListObject, so... 
    If you're still with me, THANKS!  Here's the question.  If I have more than one ListObject on a sheet, I'll need a ConnectionString and SQLText cell for each one.  How do I keep them associated?  I could require the developer to name
    them ConnectionString1/SQLText1, ConnectionString2/SQLText2, etc. and then expect that ListObject(1) goes with ConnectionSTring1/SQLText1, etc. but I'm not sure that the ListObject index numbers will stay constant.  I could somehow link to the table name,
    but that can be changed...  Any ideas?  If this is too general a question, feel free to ignore.
    Thanks,
    J

     I could somehow link to the table name, but that can be changed...  Any ideas?
    Not sure if this will help or not but maybe a little from several areas might point you in the right direction.
    If you are concerned about users changing the table name then you can define a name to reference the table and then if the user changes the table name then the Refers to automatically changes to the new table reference but your defined name remains the same.
    However, if users want to break a system even when you think you have it bullet proof the users come along with armour piercing bullets.
    Example:
    Insert a table (say Table1)
    Go to Define a name and insert a name of choice (eg.  ForMyTab1)
    Then click the icon at the right of the Refers to field and select the entire table including the column headers and it will automatically insert something like the following in the Refers to field.
    =Table1[#All]
    Now if a user changes the table name then Table1 will also automatically change.
    Example code to to reference the table in VBA.
    Sub Test()
        Dim wsSht1 As Worksheet
        Dim lstObj1 As ListObject
        Set wsSht1 = Worksheets("Sheet1")
        Set lstObj1 = wsSht1.ListObjects(Range("ForMyTab1").ListObject.Name)
        MsgBox lstObj1.Name
    End Sub
    Regards, OssieMac

  • How can we archive Partioning in parent child tables in Normalised way.

    Hi Friends.
    Could you please suggest me
    How can we archive Partioning in parent child tables in Normalised way.
    Bill_parent(
    Bill_no number,
    Bill_date date .-- I want to create Partition on this column
    customer_id
    Bill_Child{
    bill_no number,
    Bill_c_no number,
    Item_code number
    Qty number
    Bill_Acsry{
    Bill_c_no number,
    acsry_it_code number,
    qty number
    Now for there Child Table I have also create a Bill_date column that is against Normalization
    i.e
    Bill_parent(
    Bill_no number,
    Bill_date date.
    customer_id
    ) Partion by Range (Bill_date).......................
    Bill_Child{
    bill_no number,
    Bill_c_no number,
    Item_code number
    Qty number,
    Bill_Date date,-- against normalisation
    }Partion by Range (Bill_date).......................
    Bill_Acsry{
    Bill_c_no number,
    acsry_it_code number,
    qty number,
    Bill_Date date,-- against normalisation
    }Partion by Range (Bill_date)....
    with regards
    Siddharth Singh([email protected])

    Looks like the new Reference Partitioning feature in 11g is what you want. In previous versions I think you're stuck with the denormalisation.

  • How to Access DB2 MQT (Materialized Query Table) in Crystal 10

    DB2 V8 has a new construct called a Materialized Query Table (MQT) that is essentially a table containing the data represented by a view. This MQT does not appear in the Database List in Crystal under Table, View or Synonym. I assume it is due to the Database Type in DB2 (M). How can I make Crystal recognize the MQT so I can use it in a report?

    Hi Linda,
    This question was posted internally and OLE dB is the work around but no version of CR was noted so not sure if this will work for you. If it doesn't work in CR 10 then you'll have to upgrade to a more current version.
    Because MQT is new to DB2 Crystal 10 OLE dB driver may not know how to handle them.
    Thank you
    Don

  • Selecting from Materialized Query Tables (DB2 UDB database)

    When selecting what objects I wish to view in my Reports, I am unable to see any Materialized Query Tables in the list.  I am able to see the "normal" Tables and Views, just not any Materilized Query Tables.
    Please let me know what I need to set or customize in-order to see and then select fields from these.

    Thanks everyone.
    I was able to find the answer.
    For the new report, in the "Create New Connections"...choose "OLE DB (ADO)" --> then "Microsoft OLE DB Providers for ODBC Drivers"  --> click on the "Next" button --> choose the database --> then user/password details (..and so forth).

  • Treat one power query table as source for another

    Hi,
    I have a Power Query Table named as Final Table - this table has inturn been loaded to the Data Model.  I would like to use this Table (Final Table) as a source for creating another Power Query Table (I want to perform further actions on the
    Final Table to create yet another Table).  So I just want to know what I should specify in the Source (the first line after the Let statement) in the Advanced Editor.
    I do not see any option in the Power Query Ribbon to create an existing Power Query Table as a source.
    Thank you.
    Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com

    You can just use the query name in your new expression. Since it has a space, write #"Final Table" whenever you refer to it.
    (Note that you probably don't need to load this table to the Data Model, but only the one which includes all your transformations. To unload the first table, open Workbook Queries pane select Final Table and after right click, select "Load To".
    In the Load To dialog uncheck the Load to Data Model option).
    Example:
    let
    source=#"Final Table"
    in source

  • Navigation block and the Query Table Side by side in output

    Hi
    I am unable to get the navigation block and the query table side by side when i execute the WAD .Is it possible to place those 2 objects next to each other in the WAD output.In the WAD design those 2 are placed side by side.
    Regards,Pra

    I meant Html Table:
    In WAD in menu you can choose Insert -> Table -> Insert Table
    You need 1 row, 2 columns. In one of the column you should put navigation block and in the other table.
    Regards
    Erwin
    Edited by: Erwin  Buda on Feb 5, 2009 2:06 PM

  • Cannot query tables in remote database

    Hi, I have looked around for similar topics but have not found anything that would be close to my problem. I created a public link to a remote database from my portal database, it is a public link and I can query tables in the remote database just fine when I am on the sqlplus prompt. When I try to create a report, or a dynamic page, it lets me go through the wizard steps ok, however when I run it as a portlet or just run it as a report/page it does not seem to be able to see the query. Below is the response I get from running it as a portal. I am logged in as portal30.
    ORA-01017: invalid username/password; logon denied
    ORA-02063: preceding line from C2K (WWV-11230)
    Failed to parse as PORTAL30_PUBLIC - select * from populate@c2k (WWV-08300)
    The preference path does not exist:
    ORACLE.WEBVIEW.PARAMETERS.1320061995 (WWC-51000)
    The preference path does not exist:
    ORACLE.WEBVIEW.PARAMETERS.1320061995 (WWC-51000)
    Error: Unable to execute query (WWV-10201)
    Please help, I have tried everything from public to private synonyms for the linked tables and it just does not work. I am using the most recent version of portal that came with ias 1.0.2.2.0

    Actually I solved my problem, it looks like I should have used the db link utility with the portal, I linked the databases on the sqlplus command line and it seems like that was the issue.

  • SQL*PLUS help to query tables

    Is it possible to query tables of other users from a dba account?
    My problem is that when i connect to sqlplus using:
    sqlplus system/manager@mymachine
    I can only see my tables... I cannot see the tables of other users of the same database... What is the correct syntax of doing it? (Is there a good newbie doc about sqlplus?)

    Yes.
    select owner, table_name from dba_tables;
    (for example)
    OWNER TABLE_NAME
    XYZ123 MYTABLE
    desc XYZ123.MYTABLE;
    select * from xyz123.mytable;
    If you get tired of prefixing the table name with the owner, you can do the following:
    alter session set current_schema=xyz123;
    select * from mytable;

Maybe you are looking for

  • Does anyone know how to use Retropect back soft ware - I need help with it

    Is there anyone familiar with Retrospect Backup software here who might be able to help me with the following problem ? My 2007 iMac  with the tiger 10.4.11 OS suddenly crashed exactly two weeks ago when I told the trash to empty. The reason was that

  • [FIXED] No video thumbnails in File Manager (Thunar or PCManFM)

    Hello, I have a problem of video thumbnails in my file manager. I browse the web a lot to found a answer. The only solution I found are: - install tumbler - remove all cache: .thumbnails, .cache/Thunar and .config/Thunar - try the svn version of ffmp

  • Unable to read lsmw.conv file.

    Hi, While performing the step in LSMW: display converted data, I am getting the error " Unable to read file 'c:\CDD203_SRCLST.lsmw.conv'". Please Help. thanks in Advance, Rajeev

  • When opening a new tab, can i set a homepage that it will automatically open to?

    For a long time, whenever I opened a new tab it just became a blank tab. Recently it has changed to a Babylon Search and I was wondering if and how I am able to change this setting. Even if I can get it changed back to to a blank tab it would be bett

  • OIM - OIA integration documentation

    hi, i am facing some issues in OIM-OIA integration. version used: OIM ( Version: 9.1.0.1866.47 ) OIA 11gR1 where we have applied bundle patch 11.1.1.3_bp04 can anyone please share with me the link or guide for integrating OIM ( Version: 9.1.0.1866.47