Using Desc on Multiple tables

I am trying to find a way to run DESC (or similar) on every table belonging to a certain user. So far I have had no luck finding a way of doing this, other than brute force.
The problem with brute forcing it is that the user has ~250 tables that I would need to run this on. I was hoping to find a script or a query that would let me do this and output it to a file.
Any thoughts?
Jed

Maybe the objects belong to another schema. Try the
following:
SELECT table_name,
column_name,
data_type,
data_length,
data_precision,
nullable
all_tab_columns
WHERE owner = 'YOUR_OTHER_SCHEMA'
/code]
of course replace YOUR_OTHERS_SCHEMA with the actual
schema name.This finally worked for me, thank you so much. The Owner part at the bottom was the key. I just need to clever with the linespacing and grouping now.
Thanks again so much.

Similar Messages

  • Context index can't be used in complicated multiple tables join?

    hello
    thank you for view this page.
    i have a comlicated sql :
    SELECT count(*)
    from
    ((app_AssetBasicInfo left join app_AssetBasicInfoExt on
    app_AssetBasicInfo.id=app_AssetBasicInfoExt.id) left join
    (app_AssetCustominfo1 left join app_AssetCustominfoExt1 on
    app_AssetCustominfo1.id=app_AssetCustominfoExt1.id) on
    app_AssetBasicInfo.id=app_AssetCustominfo1.id) WHERE
    app_AssetBasicInfo.CategoryID=1 AND Del_tag=0 and contains(description,'department')>0;
    the table app_AssetBasicInfo and app_AssetBasicInfoExt have multiple columns and large recoord size. i create a context index on app_assetbasicinfoext(description) which description is 4000 varchar2.
    but the sql doesn't use context index. i suspect that the complicated multiple table join can't use context index? does it correct?
    thanks very much!

    Could you please post an explain plan? I'm not quite sure what is the issue.

  • Mapping an object using values from multiple tables

    Is it possible to use values looked up in other tables when mapping an object?
    For example: I have three tables. In table 1, I have fields for 'cityCode' and 'stateCode'. Table 2 is a state table which contains a list of stateCodes and corresponding stateIds. Table 3 is a city table with cityCodes listed by stateId (the city code is unique within the stateId but can be duplicated under other stateIds). Table 3 also contains the cityName for the matching cityCode/stateId pair.
    I am ultimately trying to match a cityName to a cityCode. I can't figure out how to tell toplink use the stateId returned when mapping Table 1 to Table 2 via stateCode when mapping cityCode in Table 1 to Table 3.
    Any help is greatly appreciated
    --matt                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    What does your object model look like, do you have a single object with data from all three tables in it?
    <p>
    In general because the cardinality of the tables and usage does not match, I would not recommend using multiple tables to map this. Instead define a CityNameManager class that preloads and stores all of the city names for each state, (possible lazy initializing each set of cities per state). Your getCityName() method in your class would then just use this manager.
    <p>
    You could map the multiple tables but it may be difficult, and would most likely need to be read-only because I don't think you want to insert into the table2 or 3. You basically have a foreign key table1.stateCode => table2.stateCode, (table1.cityCode, table2.stateId) => (table3.cityCode, table3.stateId). You probably cannot define this in the Mapping Workbench, so would need to use the ClassDescriptor code API and an amendment method. If you can't get the foreign keys to work you can always use the descriptor multipleTableJoinExpression and define the join directly.
    <p>
    You could also define a OneToOneMapping to the CityName from your object using the cityCode and using a selectionCriteria() on your mapping to provide an expression that uses the getTable() method to join to the intermediate table.
    <p>
    <p>---
    <p>James Sutherland

  • How to use multiple tables in DRIVING_SITE

    Hi All,
    I see very bad performance with my query having dblinks to remote database.
    How can I use DRIVING_SITE for multiple remote tables here?
    Does it it useful to use on DRIVING_SITE multiple tables?
    What is impact of using ORDER BY on local table column ( table A in below case) in the query?
    SELECT A.col1, B.col2 , C.col3
    FROM A, B@dblink1, C@dblink1, D@dblink2
    WHERE <few join conditions>
    ORDER BY A.col1 ;
    Join conditions in above query is taken care to have better performance. But from our analysis it is understood that poor performance is due to DB Links to remoate database. What is best approach to get good performance with DB Links?
    Regards,
    Ram

    http://download.oracle.com/docs/cd/E11882_01/server.112/e17120/ds_appdev004.htm#ADMIN12196
    Will give you an idea of where to start.

  • Merge or Union Multiple Tables to one big table

    Hi All,
    I am new to SQL and learning great. I have a use to merge multiple tables. Every table has different kind of data but BP ID is same in every table (but some table have more BP IDs and some are less). The below is sample…
    Table A
    BPID -  Cost – Profit
    0001 – 10 -4
    0002 -11 - 3
    Table B
    BPID - Name – Address
    0003 – John - Dallas
    0002 –Mark - Huston
    Table C
    BPID – Zip code – State
    0004- 74001 – TX
    0002-75008 – TX
    Output (after merging in Table A+B+C) would be like this…
    BPID – Cost – Profit – Name – Address- Zip Code – State
    0001 -10-      4      -    NULL      -- NULL – NULL – NULL
    0002 – 11 – 3      -     Mark -   Huston ---75008 – TX
    0003 – NULL – NULL – John – Dallas – NULL – NULL
    0004 – NULL – NULL – NULL – NULL – 75008 – TX
    Thanks for your help in this.

    I am including you a full example:
    create table TableA (BPID VARCHAR(4), Cost INT, Profit INT)
    create table TableB (BPID VARCHAR(4), Name VARCHAR(MAX), Address VARCHAR(MAX))
    create table TableC (BPID VARCHAR(4), ZipCode VARCHAR(5), State VARCHAR(2))
    INSERT INTO TableA VALUES('0001',10,4),('0002',11,3)
    INSERT INTO TableB VALUES('0003','John','Dallas'),('0002','Mark','Huston')
    INSERT INTO TableC VALUES('0004','74001','TX'),('0002','75008','TX')
    SELECT ISNULL(ISNULL(TableA.BPID, TableB.BPID), TableC.BPID) AS BPID,
    TableA.Cost, TableA.Profit, TableB.Name, TableB.Address, TableC.ZipCode, TableC.State FROM TableA
    FULL OUTER JOIN TableB ON (TableA.BPID = TableB.BPID)
    FULL OUTER JOIN TableC ON (TableB.BPID = TableC.BPID)
    And the results:

  • Join of Multiple Tables

    We are experiencing an unpredictable error in a simple form and have
    experimented it in different scenarios it behaves in the same way.
    The problem description is as under:
    We are using "Join of Multiple Tables" feature of Developer-6i. In our
    forms there are two tables e.g. Emp and Dept. We have set all the
    properties requiered to do this job inluding:
    1. "Query Data Source Name" is set to Emp,Dept.
    2. "Where Cluase" is set to Emp.Deptno = Dept.Deptno
    3. "DML Target Name" is set to EMP.
    4. Manullay created the columns for Dept.Dname.
    5. Set the Query-Only Property to Yes.
    6. Set the Primary Key Property to Yes for Empno
    When we execute this form it performs properly with the normal operations.
    It inserts, updates and delete records properly But in the scenario e.g.
    when we scroll to 5th or any other record greater this number and
    start changing employee name and committing on the each record going
    backward. It generates Primary Key Violation errors after updating
    4-5 records.
    When we locate the error in "Display Error" button it shows the update
    statement as "UPDATE EMP SET WHERE ROWID=:1" and there is no "Field=Value"
    cluase in the UPDATE statement.

    Hi, Mahesh,
    So you want only 1 row of output for each distinct combination of currentpress and lastpcirim?  That sounds like a job for GROUP BY.
    And you want that row to contain a delimited list of all the different typidcontainers?  That sounds like a job for the aggregate LISTAGG function.
    WITH  joined_data  AS
        SELECT DISTINCT
                    mst.curepress, mst.lastpcirim, inf.typeidcontainer
        FROM        betmaster mst
        LEFT JOIN   betinfo   inf   ON  TRIM (mst.curepress) = SUBSTR ( TRIM (inf.currentpress)
                                                                      , 1
                                                                      , 3
    SELECT    curepress, lastpcirim
    ,         LISTAGG (typeidcontainer, ', ')
                  WITHIN GROUP (ORDER BY  typeidcontainer)   AS container_list
    FROM      joined_data
    GROUP BY  curepress, lastpcirim
    Unfortunately, you can't say LISTAGG (DISTINCT ...), so you still have to get the distinct containers the way you're already doing it.  (Notice that the sub-query is just what you posted.)
    Thanks for posting the CREATE TABLE and INSERT statements; that's very helpful.  Don't forget to say which version of Oracle you're using.  LISTAGG was new in Oracle 11.2.
    Why not add CHECK constraints (and maybe triggers) to your tables, so that curepress and currentpress are not stored with leading or trailing spaces?  Then you wouldn't need to use TRIM in queries like this, and your code would be simpler and more efficient.

  • Adding data to multiple tables using one form in Access 2010?

    Hi All,
    I have a access database with two tables and I want to create a single form to enter data into that tables.
    How to adding data to multiple tables using one form in Access 2010?
    I don't have to much knowledge of access database?
    Please help me
    Thanks
    Balaji

    You really don't enter identical data into 2 tables.  You enter dat into one single table, and then you have an unique identifier that maps to another table (you have a unique relationship between two tables). 
    Maybe you need to read this.
    http://office.microsoft.com/en-001/access-help/database-design-basics-HA001224247.aspx
    Think about it this way...  What is you update data in 2 tables, and then the data in one of those tables changes, but the data in the other table does NOT change.  WHOOPS!!  Now, you've got a BIG problem.  For instance, you have a customer
    named Bill Gates.  In one Table you update Bill's address to 1835 73rd Ave NE, Medina, WA 98039 and in the other table you accidentally update Bill's address to 183 73rd Ave NE, Medina, WA 98039.  Now you have 2 addresses for Bill.  Why would
    you want that???  Which is right?  No one knows.  If you have one address, you just have to update one address and if there is a mistake, you just have to update one address, but you don't have to waste time trying to figure out which is right
    and which is wong...and then update the one that is wrong.
    Post back with specific questions.
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • How to use multiple table in single control file?

    Hi,
    How to use multiple table and data file in sigle control file? I have a four table and four csv file i mean data file for that. I am running concurrent program to load the data from csv file to custom table. based on my input data file name, it has to take automatically from one control file.
    Can anyone share with me how can i acheive this?
    Thanks

    Hi,
    Can't we acehive like below. I don't this exactly corrcect.
    OPTIONS (SKIP=1)
    LOAD DATA
    INFILE << file name 1 >>
    APPEND INTO TABLE XXCZ_VA_SAMPLE1
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
         PARENT_ITEM               "TRIM(BOTH FROM :PARENT_ITEM)"
    LOAD DATA
    INFILE << file name 2 >>
    APPEND INTO TABLE XXCZ_VA_SAMPLE2
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
         ITEM_NUMBER               "TRIM(BOTH FROM :ITEM_NUMBER)"
    )Edited by: orasuriya on Sep 14, 2009 3:03 AM

  • How to use multiple tables in developing one Graph in Endeca Integrator

    We have the requirement where we want to show the matrix for a particular entity which is coming from two separate table, there is a join which is possible on both the tables to get the correct data. But we are not able to find how to use data from two tables. We can create the SQL query with all the joining conditions but there are many tables which are involved so performance of query will be a problem. Is there any way in Endeca where I can create two data sources using two separate queries and while showing the matrix , I can join both the tables to get the matrix .

    You have not mentioned the version of Endeca that is used for your application. Joins are recently introduced in version 2.3 and could be used for avoiding complex DEFINE analytical statements. For this to work, the data should be present in the same dgraph and a single data source in Studio should point to data from both sources.
    These may not yet be the type of SQL joins that you may expect them to be as performing complex joins is also costly in Endeca. Hope you are not expecting to join huge data sets.
    The best possible solution I could think for addressing this problem is to load denormalized data (at least for now) into Endeca and do aggregations in queries. We can denormalize data in multiple ways even using ETL tools not just SQL queries as the above comment states.

  • Change the display of the multiple Table items using a single Drop-down

    I have created a Web Template in BEx WAD (BW 3.5) with 4 Tables assigned to 4 dfferent Queries. Now I want to change the display of the all the Four Tables based on the selection of display properties chosen in a single Dropdown item. The properties to be selected  in the dropdown are like changing the Alternate style display of Rows, Suppress Alternate Style, Display only 30 Rows or 60 Rows.
    Please help me in writing the script necessary to pass the command from the dropdown to all the Tables to get the desired output.
    Thanks,
    Krishna
    Edited by: Hari Krishna Velampalli on Oct 26, 2008 12:00 AM

    Dipika, Thanks for the response.
    I tried using that option but again since we cannot give custom options in a drop-down,
    I created a Form with a drop-down list of options like Suppress Result Rows, Suppress alternate style of rows, Display only 30 Rows, Display only 100 rows .. and so on.
    Now I am able to change the display of my first table by selecting the options in the drop-down list. But my intention is to apply that selection to Multiple Tables.
    How can I achieve that?
    HK

  • Using radio button selection in multiple tables

    Hello All,
    I've got a bit of a design issue and it being a Friday my brain is a bit foggy and I can't seem to figure out a solution.
    what I want to do is have 3 tables. The user should only be able to select one line from any of the three tables.
    I can do this by having events that clear down selection on the two other tables on any selection of the third, but the select buttons of tables don't really give the UI impression that only one row can be selected. To do this I'd like to use the radio button element.
    so
    table A
    choice - name
    (o) - Anne
    (o) - Bob
    (o) - Charlie
    Table B
    choice - name
    (x) - David
    (o) - Ellen
    (o) - Fran
    Table C
    choice - name
    (o) - George
    Here the entry in table B for David is selected. But any selection of any of the other options should deselected.
    My thoughts are to use a radio button ui element, bind the "selected" value to a unique id for each row/table (an attribute of the node element for each table) and the value to a common shared attribute (not table specific).
    Any better ideas - and certainly any which would mean I'm not going to have to maintain a lookup table of my unique ids and node elements to find out which one is selected?
    Cheers,
    Chris

    Ok - here's how I did it.
    I created another lookup table which had a guid and reference to the element.
    in the each elements I had a guid which I bound to the key for selection property of the radio button in the table.
    I then bound the selected key property to an attribute that was common to all elements.
    in my "processing" logic I read the selected key, read the lookup table - and therefore got the reference to the selected element.
    Would have been an awful lot easier if I could have used a reference to the element itself as the "key" - but that was required to be a character field.
    [image showing radio button selection working across multiple tables|http://i51.tinypic.com/bi79dx.jpg]
    End result works quite nicely.
    Cheers,
    Chris

  • SQL Loader : Loading multiple tables using same ctl file

    Hi ,
    We tried loading multiple tables using the same ctl file but the data was not loaded and no errors were thrown.
    The ctl file content is summarised below :
    LOAD DATA
    APPEND INTO TABLE TABLE_ONE
    when record_type ='EVENT'
    TRAILING NULLCOLS
    record_type char TERMINATED BY ',' ,
    EVENT_SOURCE_FIELD CHAR TERMINATED BY ',' ENCLOSED BY '"',
    EVENT_DATE DATE "YYYY-MM-DD HH24:MI:SS" TERMINATED BY ',' ENCLOSED BY '"',
    EVENT_COST INTEGER EXTERNAL TERMINATED BY ',' ENCLOSED BY '"',
    EVENT_ATTRIB_1 CHAR TERMINATED BY ',' ENCLOSED BY '"',
    VAT_STATUS INTEGER EXTERNAL TERMINATED BY ',' ENCLOSED BY '"',
    ACCOUNT_REFERENCE CONSTANT 'XXX',
    bill_date "to_date('02-'||to_char(sysdate,'mm-yyyy'),'dd-mm-yyyy')",
    data_date "trunc(sysdate)",
    load_date_time "sysdate"
    INTO TABLE TABLE_TWO
    when record_type ='BILLSUMMARYRECORD'
    TRAILING NULLCOLS
    RECORD_TYPE char TERMINATED BY ',' ,
    NET_TOTAL INTEGER EXTERNAL TERMINATED BY ',' ENCLOSED BY '"',
    LOAD_DATE_TIME "sysdate"
    INTO TABLE BILL_BKP_ADJUSTMENTS
    when record_type ='ADJUSTMENTS'
    TRAILING NULLCOLS
    RECORD_TYPE char TERMINATED BY ',' ,
    ADJUSTMENT_NAME CHAR TERMINATED BY ',' ENCLOSED BY '"',
    LOAD_DATE_TIME "sysdate"
    INTO TABLE BILL_BKP_CUSTOMERRECORD
    when record_type ='CUSTOMERRECORD'
    TRAILING NULLCOLS
    RECORD_TYPE char TERMINATED BY ',' ,
    GENEVA_CUSTOMER_REF CHAR TERMINATED BY ',' ENCLOSED BY '"',
    LOAD_DATE_TIME "sysdate"
    INTO TABLE TABLE_THREE
    when record_type ='PRODUCTCHARGE'
    TRAILING NULLCOLS
    RECORD_TYPE char TERMINATED BY ',' ,
    PROD_ATTRIB_1_CHRG_DESC CHAR TERMINATED BY ',' ENCLOSED BY '"',
    LOAD_DATE_TIME "sysdate"
    Has anyone faced similar errors or are we going wrong somewhere ?
    Regards,
    Sandipan

    This is the info on the discard in the log file :
    Record 1: Discarded - failed all WHEN clauses.
    Record 638864: Discarded - failed all WHEN clauses.
    While some of the records were loaded for one table.
    Regards,
    Sandipan

  • 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,

  • How to update flag in multiple tables using custom sql DB adapter

    hi all,
    I have a scenario: I want to update flags in multiple tables in DB2. I have used toplink update only to update all tabless after creating relationships between them. But that approach is not working as it couldnot detect emmisions with DB2 and update the complete record with blank values in other columns.
    So, i want to use custom sql now. Can anybody help in resolving the issue or in writing the custom sql.
    Regards
    Richa

    Dear SeánMacGC thanks for reply,
    But "a.changed" is not a field in GNMT_CUSTOMER_MASTER_CHG. what i am doing in this procedure is i am collecting bulck data and validating field by field from GNMT_CUSTOMER_MASTER_CHG with GNMT_CUSTOMER_MASTER table as their structure is same.. if v_name is not same as v_name_chg then i am setting changed flag to "Y" changed is "changed dbms_sql.varchar2_table" and updating GNMT_CUSTOMER_MASTER in bluck where changed flag ='Y'...
    type custRec is record
    n_cust_ref_no dbms_sql.number_table,
    v_name dbms_sql.varchar2_table,
    v_name_chg dbms_sql.varchar2_table,
    rowid rowidArray,
    *changed dbms_sql.varchar2_table*
    i cannot use simple SQL as i need to validate field for each records with GNMT_CUSTOMER_MASTER_CHG and insert into log file as well.....
    to run this procedure:
    execute DO_DC_NAME_UPDATE_OTHER_TAB.DO_NAME_UPDATE_OTHER_TAB;
    Thanks...

  • How to add multiple table when creating add on using b1de

    Hi all,
    Plz help me
    How to add multiple table when creating add on using b1de.
    Thanks

    Hi dns_sap,
    Can you explain a little better what you are trying to accomplish? Is it to create UserTables and UserFields in the database, when the addon runs the first time?
    If so, you can use the following code
    Add User Table
            Try
                Dim lRetCode As Long
                Dim oUDT As SAPbobsCOM.UserTablesMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
                oUDT.TableName = TableName
                oUDT.TableDescription = TableDescription
                oUDT.TableType = TableType
                lRetCode = oUDT.Add
                '// Check for error when adding the Table: if lRetCode = 0 the table was created; if lRetCode = -2035 the table already exisits
                If lRetCode <> 0 Then
                    oApplication.MessageBox("Error: " & lRetCode.ToString & ", " & oCompany.GetLastErrorDescription)
                End If
            Catch ex As Exception
                oApplication.MessageBox(oCompany.GetLastErrorDescription)
            Finally
                System.Runtime.InteropServices.Marshal.ReleaseComObject(oUDT)
                oUDT = Nothing
                lRetCode = Nothing
                GC.Collect()
            End Try
    Add User Field
    Try
                Dim lRetCode As Long
                Dim oUDF As SAPbobsCOM.UserFieldsMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
                oUDF.TableName = TableName
                oUDF.Name = FieldName
                oUDF.Description = FieldDescription
                oUDF.Type = FieldType
                lRetCode = oUDF.Add
                '// Check for error when adding the field: if lRetCode = 0 the field was created; if lRetCode = -2035, the field already exists
                If lRetCode <> 0 Then
                    oApplication.MessageBox("Error: " & oCompany.GetLastErrorCode & ", " & oCompany.GetLastErrorDescription)
                End If
            Catch ex As Exception
                oApplication.MessageBox(oCompany.GetLastErrorDescription)
            Finally
                System.Runtime.InteropServices.Marshal.ReleaseComObject(oUDF)
                oUDF = Nothing
                lRetCode = Nothing
                GC.Collect()
            End Try
    Regards,
    Vítor Vieira

Maybe you are looking for