Query for Empty Tables.

Hi All,
Can someone tell me a Query to find out "EMPTY TABLES i.e. Tables having no Rows" in Oracle 8i ?
I tried on Google, but results are not satisfactory, may be due to 8i version.
Please guide me.
Regards.

982164 wrote:
Hi Hoek,
Actually we upgraded our database to 11g.
We imported our data from 8i to 11gr2 by the utility IMP successfully.
It imported our data 100% i.e. when we import 8i dmp data into 11g, there is never problem.
Problem is arises now when we further use IMP/EXP utility in 11g.So everything in Oracle 8 is working the way you expect. The fact that you also have an Oracle 8 database has nothing to do with this problem. Is that what you're saying?
When we run EXP utlity in 11g, it doesn't export empty tables.If the problem is entirely in Oracle 11, then you should be able to use something like XMLQUERY to find the 0-row tables, if you really need to. (I think you don't.)
EXP can export tables with 0 rows. I just tried it in Oracle 11, and part of the feedback I got was:
. . exporting table                       ZIPCODES          0 rows exported
. . exporting table                  ZONEORDER_TBL          5 rows exported
. . exporting table                       ZONE_TBL          6 rows exported
. . exporting table                            ZOO          2 rows exported
. . exporting table                    Z_HIERARCHY          3 rows exported
. . exporting table                         Z_TEST          3 rows exported
. . exporting table                        Z_TEST4          0 rows exportedIf it's not exporting 0-row tables for you, find out why, and fix that problem. Post your exp control file.
Someone told me to insert atleast 1 row in the empty tables, then they will be exported.And then, after importing them, TRUNCATE those tables? That's a lot of work.
That's why I m searching of the Empty Tables.
Am I going right way ?I don't think so.
Find and fix the problem with exp.
If you can't get exp to work, then look into data pump.

Similar Messages

  • Need Query for empty partitions

    I am having nearly 700 partitions for a table.Now i want to find out only the empty partitions.I need query for that.
    Thankx..

    Not the most elegant solution, but it works:
    declare
    rc number;
    str varchar2(200);
    begin
    for i in (select table_owner, table_name, partition_name from dba_tab_partitions) loop
    str := 'select count(*) from ' || i.table_owner || '.' || i.table_name || ' partition (' || i.partition_name || ')';
    execute immediate str into rc;
    if rc = 0 then
    dbms_output.put_line(i.table_owner || '.' || i.table_name);
    end if;
    end loop;
    end;

  • How to query for two tables

    Hi,
    I have this problem, How can query a two table?
    Table A ->  Table B
    id               table-a_id
    name          table_b_name
    the relationship is one-to-many
    How can I get the result?
    Hope my question make sense
    cheers.
    thanks a lot.

    I bet you have more luck looking for an answer in a SQL forum.

  • How to hide table header for empty table

    Hi,
    I wanna to hide table header for all tables which doesn't contain any data in my Adobe form. How can I do this? Helpful answers will be rewarded .

    HI Aliaksandr,
    You can use javascript to do this dynamically.
    For example, i used Adobe Designer 7.1 to add a table to a subform.
    Now, i have the object hierchy as:
    Level 1 - form1
    Level 2 - form2
    Level 3 - Table1
               -->HeaderRow
                    --> Cell1
                    --> Cell2
               -->Row1
                    --> Cell1
                    --> Cell2
    Now, i sleect the Table1 element, and write the javascript which is executed on Initialization, as
    if(this.Row1.Cell1.rawValue == "")
    this.HeaderRow.presence = "hidden" ;
    This will check that if the first row is empty, it will hide the header from the layout.
    You can use something similar for your requirement.
    Hope this helps,
    Siddhartha Jain

  • Tuning SQL Query for base tables

    Hi,
    Can any please help me to tune the below query...... there is full table scan for po_action_history table
    SELECT DISTINCT
         DECODE(hr.full_name,'Default Buyer, Purchasing','PCH',
    'Default Buyer, Travel','TRV',
    'Purchase Order, Rapid','RPO',
    'Data Interchange, Electronic','EDI',fuser1.user_name) BUYER_ID,
    poa.attribute1 BUYER_GROUP,
         poa.attribute2 BUYER_SUBGROUP
    FROM      po.po_action_history ac1,
         po.po_headers_all ph,
         po.po_agents poa,
         hr.per_all_people_f hr,
         applsys.fnd_user fuser1
    WHERE ph.po_header_id = ac1.object_id
    AND      ac1.object_type_code = 'PO'
    AND      ac1.action_code = 'APPROVE'
    AND      sequence_num =(SELECT MIN(ac2.sequence_num)
                   FROM po.po_action_history ac2,
                        applsys.fnd_user fuser2
    WHERE ph.po_header_id = ac2.object_id
    AND      ac2.object_type_code = 'PO'
    AND      ac2.action_code = 'APPROVE'
    AND      ac2.last_updated_by = fuser2.user_id)
    --AND  ac1.last_updated_by = fuser1.user_id
    AND      ph.agent_id = poa.agent_id
    AND      ph.agent_id = hr.person_id
    AND      hr.person_id = fuser1.employee_id
    AND      hr.effective_end_date > sysdate
    AND trunc(ac1.last_update_date) between '01-JAN-08' and '07-JAN-08'
    ORDER BY poa.attribute1
    Explain Plan
    PLAN_TABLE_OUTPUT
    Plan hash value: 3325319312
    Id Operation Name Rows
    Bytes Cost (%CPU) Time
    PLAN_TABLE_OUTPUT
    | 0 | SELECT STATEMENT | | 27 |
    2754 | 38963 (3) | 00:07:48 |
    | 1 | SORT UNIQUE | | 27 |
    2754 | 38962 (3) | 00:07:48 |
    |* 2 | FILTER | | |
    | | |
    |* 3 | HASH JOIN | | 37 |
    3774 | 36308 (3) | 00:07:16 |
    PLAN_TABLE_OUTPUT
    | 4 | TABLE ACCESS BY INDEX ROWID | FND_USER | 1 |
    13 | 2 (0) | 00:00:01 |
    | 5 | NESTED LOOPS | | 37 |
    3293 | 36303 (3) | 00:07:16 |
    | 6 | NESTED LOOPS | | 88 |
    6688 | 36180 (3) | 00:07:15 |
    | 7 | NESTED LOOPS | | 88 |
    PLAN_TABLE_OUTPUT
    3960 | 35916 (3) | 00:07:11 |
    |* 8 | TABLE ACCESS FULL | PO_ACTION_HISTORY | 2110 |
    71740 | 32478 (3) | 00:06:30 |
    | 9 | TABLE ACCESS BY INDEX ROWID | PO_HEADERS_ALL | 1 |
    11 | 2 (0) | 00:00:01 |
    |* 10 | INDEX UNIQUE SCAN | PO_HEADERS_U1 | 1 |
    | 1 (0) | 00:00:01 |
    PLAN_TABLE_OUTPUT
    | 11 | SORT AGGREGATE | | 1 |
    36 | | |
    | 12 | NESTED LOOPS | | 1 |
    36 | 6 (0) | 00:00:01 |
    |* 13 | TABLE ACCESS BY INDEX ROWID| PO_ACTION_HISTORY | 1 |
    31 | 6 (0) | 00:00:01 |
    |* 14 | INDEX RANGE SCAN | PO_ACTION_HISTORY_N1 | 5 |
    | 3 (0) | 00:00:01 |
    PLAN_TABLE_OUTPUT
    |* 15 | INDEX UNIQUE SCAN | FND_USER_U1 | 1 |
    5 | 0 (0) | 00:00:01 |
    | 16 | TABLE ACCESS BY INDEX ROWID | PER_ALL_PEOPLE_F | 1 |
    31 | 3 (0) | 00:00:01 |
    |* 17 | INDEX RANGE SCAN | PER_PEOPLE_F_PK | 1 |
    | 2 (0) | 00:00:01 |
    |* 18 | INDEX RANGE SCAN | FND_USER_N1 | 1 |
    PLAN_TABLE_OUTPUT
    | 1 (0) | 00:00:01 |
    | 19 | TABLE ACCESS FULL | PO_AGENTS | 183 |
    2379 | 4 (0) | 00:00:01 |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
    2 - filter(TO_DATE('01-JAN-08')<=TO_DATE('07-JAN-08'))
    3 - access("PH"."AGENT_ID"="POA"."AGENT_ID")
    8 - filter("AC1"."ACTION_CODE"='APPROVE' AND "AC1"."OBJECT_TYPE_CODE"='PO'AND
    TRUNC(INTERNAL_FUNCTION("AC1"."LAST_UPDATE_DATE"))>='01-JAN-08' AND
    TRUNC(INTERNAL_FUNCTION("AC1"."LAST_UPDATE_DATE"))<='07-JAN-08')
    10 - access("PH"."PO_HEADER_ID"="AC1"."OBJECT_ID")
    PLAN_TABLE_OUTPUT
    filter("SEQUENCE_NUM"= (SELECT MIN("AC2"."SEQUENCE_NUM") FROM "APPLSYS"."FND_USER"
    "FUSER2","PO"."PO_ACTION_HISTORY" "AC2" WHERE "AC2"."OBJECT_ID"=:B1 AND "AC2"."ACTION_CODE"='APPROVE'
    AND "AC2"."OBJECT_TYPE_CODE"='PO' AND "AC2"."LAST_UPDATED_BY"="FUSER2"."USER_ID"))
    13 - filter("AC2"."ACTION_CODE"='APPROVE' AND "AC2"."OBJECT_TYPE_CODE"='PO')
    14 - access("AC2"."OBJECT_ID"=:B1)
    PLAN_TABLE_OUTPUT
    15 - access("AC2"."LAST_UPDATED_BY"="FUSER2"."USER_ID")
    17 - access("PH"."AGENT_ID"="PERSON_ID" AND "EFFECTIVE_END_DATE">SYSDATE@!)
    filter("EFFECTIVE_END_DATE">SYSDATE@!)
    18 - access("PERSON_ID"="FUSER1"."EMPLOYEE_ID")
    Thanks

    Hi,
    any help for the above issue.

  • Join query for three tables

    Hi i have got this query that is a join of two tables but i need join for three tables i need the extended query
    select aauthlname aauthlnam aauthfname aauthfnam aisbn btitle
      from ( bsauthors as a inner join bsbook as b on aisbn = bisbn )
      into corresponding fields of table books
      where aauthlname like authorlname or aauthfname like authorfname
      order by aauthlname aauthfname a~isbn.

    Hi pavan
    Plz try the following querry for joins on three tables :
    " Customize it to ur requirements and tablenames
    Parameters : b type mara-matnr.
    select xmatnr xmtart xmatkl ywerks ylgort zmaktx
    into corresponding fields of table itab
         from (  ( mara as x inner join mard as y on xmatnr = ymatnr )
    inner join makt as z on xmatnr = zmatnr ) where x~matnr = a and
    y~werks
    = b .
    Plz see that there is atleast one field common between the three tables u want to use.
    Regards
    Pankaj

  • Need a query for export table data .....

    Hi,
    I need a query for exporting the data in a table to a file.
    Can anyone help me ?
    Thanking You
    Jeneesh

    SQL> spool dept.txt
    SQL> select * from dept;
        DEPTNO DNAME          LOC
            10 ACCOUNTING     NEW YORK
            20 RESEARCH       DALLAS
            30 SALES          CHICAGO
            40 OPERATIONS     BOSTON
    SQL> spool off
    SQL> ed dept.txt

  • SQL query for empty string

    I am trying to execute the following SQl query, SELECT * FROM Failure WHERE ID = '123' AND RepairAction = ' ';, using the DB Tools Execute Query.vi. This query never finds the record in my database. My database contains a record where the ID filed contains the value of '123' and the RepairAction field is an empty string. If I remove the 'AND RepairAction ' ';' text from my query statement, the record is found. I believe my problem is that I am not using the correct syntax to describe and empty string. I have tried the following: '', ' ', "", " ", and NULL as empty string arguments, and none of these work.
    I was hoping someone might be able to tell me what the correct syntax is for an empty string or if there is another approach I need to take.
    Thank you in advance for your help,
    Jim
    Solved!
    Go to Solution.

    Hi,
    While creating your table "Failure", was the column "ID" delclared as intiger or varchar? If it is intiger and you use '123' , it wont return the results. You will have to try without the inverted comas ' '.
    Regards,
    Nitzz
    (Giver Kudos to good Answers, Mark it as a solution if your problem is Solved)

  • Check for empty table row before adding date

    On the form below, when I click the green + button (far right), a new table row is created with today's date. the user can then enter more text to the right of the date. Problem is when the form is saved and reopened, the text the user enters is deleted and new today's date added because it is in the intialize event. How do I script to check and make sure each dated row is empty before adding today's date?
    https://acrobat.com/#d=qTINfyoXA-U6cDxOGgcSEw
    Thanks,
    ~Don

    Hi Don,
    One option would be to use the caption area of the textfield for the date and leave the value portion free for the user to input their data:
    if (xfa.resolveNode("this.caption.value.#text").value === "") {
              this.caption.value.text = util.printd("[mm/dd/yy] ", new Date() );
    See here: https://acrobat.com/#d=VjJ-YsXLKmV6QU84JrAAIw.
    Hope that helps,
    Niall

  • How to use dynamic query for Result table

    Hello Experts,
    I want to use dynamic query and then display the result in the assignment block.
    Using dynamic query BTQAct and BTQRAct and base on some search criteria i want tofilter and then append the result in the result table of that custom context node, and then it should display the result in the view in UI.
    SO can you please provide me the samplle code on how to use the dynamic query and append in the result table.
    Regards.

    Hi,
    Please find below sample code:
    data:  query         TYPE REF TO cl_crm_bol_dquery_service,
               result        TYPE REF TO if_bol_bo_col.
    DATA: lt_params       TYPE crmt_name_value_pair_tab,        
               lwa_params      TYPE crmt_name_value_pair.             
    query = cl_crm_bol_dquery_service=>get_instance( 'BTQAct' ). " Get instance of dynamic query
    Set general query parameter for maximum number of hits
          lwa_params-name = 'MAX_HITS' .
          lwa_params-value = '50'.
          APPEND lwa_params TO lt_params.
          query->set_query_parameters( it_parameters = lt_params ).
          query->add_selection_param( iv_attr_name = 'OBJECT_ID'
                                                    iv_sign      = 'I'
                                                    iv_option    = 'EQ'
                                                    iv_low       = <lv_objectid>
                                                    iv_high      = '' ). " Set your search criteria. Repeat this code if you have multiple parameters
    "You can find possible search options for a query object in  GENIL_BOL_BROWSER
    result ?= query->get_query_result(  ).   " Get result from your search query
    me->typed_context-> <your result context node>->set_collection( result ). 
    Here you will have to create a context node in your view which would refer to query result object like for BTQAct its BTQRAct                      
    Hope this helps.
    e Regards,
    Bhushan

  • Query for 3 tables.

    Hi,
    I need to write a SELECT statement that returns one row for each customer that has orders with the following columns:
    ======================================================================
    Email addresses from Customers Table
    Sum of the Item Price in the OrdersItems table multiplied by the quantity in the
    OrderItems table
    Sum of the discount amount column in the OrderItems table multiplied by the quantity in the OrderItems Table.
    Sort the results set in the descending sequence by the item price total for each customer.
    ===================================================================
    Customers table has no connection with Orderitems table, so it has to go through ORDERS table.  I have written the following query. Can someone check and give me a feed back? It is not giving me the correct output. This should be the output:
    Email address                                        
    ItemPriceTotal                                DiscountAmountTotal
    [email protected]                   4131.00                                             
    1830.30
    etc, etc........
    My code is not adding the above columns correctly. I have tried SUM for Total columns but gives me errors:
    SELECT EmailAddress, ItemPrice * Quantity AS ItemPriceTotal, DiscountAmount * Quantity AS DiscountAmountTotal
    FROM
    Customers
     JOIN ORDERS
    ON CUSTOMERS.CustomerID = Orders.CustomerID  ----Joins Orders with Customers
    JOIN OrderItems
    ON Orders.OrderID = OrderItems.OrderID; ------ Joins Orders with OrderItems
    ----ORDER BY EmailAddress,ItemPriceTotal;  ( tried Order by, but output is not correct)

    Thank you for your help. I really appreciate it. My output should look like this, but my query is not adding the ItemPriceTotal and DiscountAmountTotal:
    Results:
    EmailAddress
    ItemPriceTotal
    DiscountAmountTotal
    [email protected]
    4131.00
    1830.39
    [email protected]
    2398.00
    719.40
    [email protected]
    2198.98
    659.70
    [email protected]
    998.00
    209.70
    [email protected]
    799.99
    120.00
    [email protected]
    489.99
    186.20
    [email protected]
    299.00
    0.00

  • Oracle ADF - Refresh quick query for a table in the pop up.

    Hi,
    I am using Oracle jDev 11.1.1.4.0
    In my application I have a Find button in jspx.
    Onclick of Find button, a popup opens.
    When I search for a record by name in QuickQuery, suppose - I entered name as jon.
    It gives me the correct result.
    Now when I close the pop up and again click on Find button, that previous search remains as it is in the pop up
    and also the previous criteria in quick query search region as "jon".
    I have changed the refresh property of iterator(of table in popup) in pageDef
    But still not working...
    How to refresh that search region for every subsequent Find click.
    Appreciate your help.
    Thanks,
    Madhav

    do u changed refresh > ifneeded or always.
    user.
    r u luking for partially page rendering.
    by using ppr. we can refresh.
    if so.
    http://www.adftips.com/2010/10/adf-ui-refreshing-page-or-region.html
    http://biemond.blogspot.com/2007/11/how-to-refresh-region-in-jdeveloper-11g.html
    Re: ADF Region Interaction
    Edited by: Erp on Sep 27, 2011 4:37 AM
    Edited by: Erp on Sep 27, 2011 4:42 AM

  • SAP query for SPRO table

    HI experts, Im about to create a Sap query using SQVI tcode. I want to have listing of certain master data created in customizing(SPRO) like the catalogs and list of code groups and task codes in Service Notification. What is the best data source or the table should I use to capture this data? Or is this possible? If not, can you give me some ways how to have listing report for those information.

    Hi,
    Have you checked with t-code QS42 ?
    Tables - QPGR, TQ15.
    Regards,
    Vivek

  • Update Query For Hierarchy Table

    Hi All
    I have a Hierarchy table that has news categories. I want use a query than when user deactivate a category, all child category has been deactivated. For example
    1- Politics
    1-1- National Politics
    1-2- International Politics
    1-2-1- Asia
    1-2-2- Africa
    2- Economic
    If Politics has been deactivated, all child must be deactivate. (1-1, 1-2, 1-2-1, 1-2-2)
    Please help me
    With Best Regards

    This is table structure script:
    SET NUMERIC_ROUNDABORT OFF
    GO
    SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON
    GO
    IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE id=OBJECT_ID('tempdb..#tmpErrors')) DROP TABLE #tmpErrors
    GO
    CREATE TABLE #tmpErrors (Error int)
    GO
    SET XACT_ABORT ON
    GO
    SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
    GO
    BEGIN TRANSACTION
    GO
    PRINT N'Creating schemata'
    GO
    PRINT N'Creating [dbo].[Modules]'
    GO
    CREATE TABLE [dbo].[Modules]
    [Module_ID] [int] NOT NULL,
    [ModuleName] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [ModuleTitle] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [Status] [int] NULL
    GO
    IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
    GO
    IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
    GO
    PRINT N'Creating primary key [PK_Modules] on [dbo].[Modules]'
    GO
    ALTER TABLE [dbo].[Modules] ADD CONSTRAINT [PK_Modules] PRIMARY KEY CLUSTERED ([Module_ID])
    GO
    IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
    GO
    IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
    GO
    PRINT N'Creating [dbo].[Categories]'
    GO
    CREATE TABLE [dbo].[Categories]
    [Category_ID] [int] NOT NULL IDENTITY(1, 1),
    [Module_ID] [int] NOT NULL,
    [ParentID] [int] NULL,
    [Name] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [Title] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [Priority] [int] NULL,
    [ThumbnailImage] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
    [Status] [int] NULL
    GO
    IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
    GO
    IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
    GO
    PRINT N'Creating primary key [PK_Categories] on [dbo].[Categories]'
    GO
    ALTER TABLE [dbo].[Categories] ADD CONSTRAINT [PK_Categories] PRIMARY KEY CLUSTERED ([Category_ID])
    GO
    IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
    GO
    IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
    GO
    PRINT N'Adding foreign keys to [dbo].[Categories]'
    GO
    ALTER TABLE [dbo].[Categories] ADD CONSTRAINT [FK_Categories_Modules] FOREIGN KEY ([Module_ID]) REFERENCES [dbo].[Modules] ([Module_ID])
    GO
    IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
    GO
    IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
    GO
    IF EXISTS (SELECT * FROM #tmpErrors) ROLLBACK TRANSACTION
    GO
    IF @@TRANCOUNT>0 BEGIN
    PRINT 'The database update succeeded'
    COMMIT TRANSACTION
    END
    ELSE PRINT 'The database update failed'
    GO
    DROP TABLE #tmpErrors
    GO
    This is table data
    SET NUMERIC_ROUNDABORT OFF
    GO
    SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS, NOCOUNT ON
    GO
    SET DATEFORMAT YMD
    GO
    SET XACT_ABORT ON
    GO
    SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
    GO
    BEGIN TRANSACTION
    -- Pointer used for text / image updates. This might not be needed, but is declared here just in case
    DECLARE @pv binary(16)
    PRINT(N'Drop constraints from [dbo].[Categories]')
    GO
    ALTER TABLE [dbo].[Categories] DROP CONSTRAINT [FK_Categories_Modules]
    PRINT(N'Add 14 rows to [dbo].[Categories]')
    GO
    SET IDENTITY_INSERT [dbo].[Categories] ON
    INSERT INTO [dbo].[Categories] ([Category_ID], [Module_ID], [ParentID], [Name], [Title], [Priority], [ThumbnailImage], [Status]) VALUES (1, 1, NULL, 'News', N'اخبار', 1, NULL, 1)
    INSERT INTO [dbo].[Categories] ([Category_ID], [Module_ID], [ParentID], [Name], [Title], [Priority], [ThumbnailImage], [Status]) VALUES (2, 2, NULL, 'Article', N'مقالات', 2, NULL, 1)
    INSERT INTO [dbo].[Categories] ([Category_ID], [Module_ID], [ParentID], [Name], [Title], [Priority], [ThumbnailImage], [Status]) VALUES (3, 3, NULL, 'Galleries', N'گالری', 3, NULL, 1)
    INSERT INTO [dbo].[Categories] ([Category_ID], [Module_ID], [ParentID], [Name], [Title], [Priority], [ThumbnailImage], [Status]) VALUES (4, 1, 1, 'Politics', N'سیاسی', 1, NULL, 1)
    INSERT INTO [dbo].[Categories] ([Category_ID], [Module_ID], [ParentID], [Name], [Title], [Priority], [ThumbnailImage], [Status]) VALUES (5, 1, 1, 'Economic', N'اقتصادی', 2, '', 1)
    INSERT INTO [dbo].[Categories] ([Category_ID], [Module_ID], [ParentID], [Name], [Title], [Priority], [ThumbnailImage], [Status]) VALUES (6, 1, 4, 'NationalPilitics', N'سیاست داخلی', 1, '', 1)
    INSERT INTO [dbo].[Categories] ([Category_ID], [Module_ID], [ParentID], [Name], [Title], [Priority], [ThumbnailImage], [Status]) VALUES (7, 1, 4, 'InternationalPolitics', N'سیاست خارجی', 2, NULL, 1)
    INSERT INTO [dbo].[Categories] ([Category_ID], [Module_ID], [ParentID], [Name], [Title], [Priority], [ThumbnailImage], [Status]) VALUES (8, 1, 7, 'Asia', N'آسیا', 1, '', 1)
    INSERT INTO [dbo].[Categories] ([Category_ID], [Module_ID], [ParentID], [Name], [Title], [Priority], [ThumbnailImage], [Status]) VALUES (9, 1, 7, 'Europe', N'اروپا', 2, NULL, 1)
    INSERT INTO [dbo].[Categories] ([Category_ID], [Module_ID], [ParentID], [Name], [Title], [Priority], [ThumbnailImage], [Status]) VALUES (10, 1, 7, 'Africa', N'آفریقا', 3, NULL, 1)
    INSERT INTO [dbo].[Categories] ([Category_ID], [Module_ID], [ParentID], [Name], [Title], [Priority], [ThumbnailImage], [Status]) VALUES (11, 2, 2, 'Scientic', N'علمی', 1, NULL, 1)
    INSERT INTO [dbo].[Categories] ([Category_ID], [Module_ID], [ParentID], [Name], [Title], [Priority], [ThumbnailImage], [Status]) VALUES (12, 2, 2, 'Art', N'هنری', 2, NULL, 1)
    INSERT INTO [dbo].[Categories] ([Category_ID], [Module_ID], [ParentID], [Name], [Title], [Priority], [ThumbnailImage], [Status]) VALUES (13, 3, 3, 'Culture', N'فرهنگی', 1, NULL, 1)
    INSERT INTO [dbo].[Categories] ([Category_ID], [Module_ID], [ParentID], [Name], [Title], [Priority], [ThumbnailImage], [Status]) VALUES (14, 3, 3, 'Religion', N'مذهبی', 2, NULL, 1)
    SET IDENTITY_INSERT [dbo].[Categories] OFF
    PRINT(N'Add constraints to [dbo].[Categories]')
    GO
    ALTER TABLE [dbo].[Categories] ADD CONSTRAINT [FK_Categories_Modules] FOREIGN KEY ([Module_ID]) REFERENCES [dbo].[Modules] ([Module_ID])
    COMMIT TRANSACTION
    GO
    Thanks for your help

  • Update query for Advanced table.

    Hi,
    I am an newbie to OAF so need help for a simple task.
    I have an advanced table that has been created using expert mode query of VO. (as it contains data from more than one table).
    Now, i want to update the data for any row that is changed in the table,
    i followed the advanced table example in the tutorial and reached till the update method of AM. Now I am not able to update the table. When I searched the forum it said that I need to have a simple EO on the table to update it, but I want to update more than one table ( foreign key relationship), so can I do it using the same VO ? I have both the VO (one based on custom select query of Expert mode and other normal VO based on EO).
    Can someone please give me the query to update the table ?
    Thanks,
    VK

    Thanks Reetesh for your reply.
    As this is a simple task I wan't to do it via OAF query rather than writing PL/SQL procedure.
    I have two tables , say error table and interface table, (there is a foreign key relation ship between these tables, ie. i have to show the interface name present in the interface table via the foreign key in the error table). I used the following query to get the data
    SELECT xxgblErrorMasterEO1.ERROR_ID_NO,
    xxgblErrorMasterEO1.ERROR_CODE,
    xxgblErrorMasterEO1.ERROR_MESSAGE,
    xxgblErrorMasterEO1.CREATED_BY,
    xxgblErrorMasterEO1.CREATION_DATE,
    xxgblErrorMasterEO1.LAST_UPDATED_BY,
    xxgblErrorMasterEO1.LAST_UPDATE_DATE,
    xxgblIntfProgramMaster.INTERFACE_NAME,
    xxgblErrorMasterEO1.ERROR_TYPE
    FROM XXEEG.XXGBL_ERROR_MASTER xxgblErrorMasterEO1,
    XXEEG.XXGBL_INTF_PROGRAM_MASTER xxgblIntfProgramMaster
    where xxgblErrorMasterEO1.INTERFACE_ID_NO =
    xxgblIntfProgramMaster.INTERFACE_ID_NO
    I like the idea of Advanced table while going through the tutorial (example 2) and would want to show certain fields by expanding on the + mark ( just like in the explorer)
    now i want to update any of the fields that i show to the user (except the WHO fields). Say for example if the user updates the error_message and Interface_name, so how should i write the update method in the AM ?
    Pardon me if this sounds simple :(

Maybe you are looking for

  • ICal  syncing with iPOD touch wirelessly

    IPOD touch will no longer sync wirelessly with iCAL on my iMAC. No such issues previously.

  • New to iMovie - Slide Show project

    I've been lurking in the iMovie discussions for a couple of months now, and I'm trying to absorb the knowledge of the community. I'm also working my way through "The Missing Manual" which is invaluable. I have two projects in mind, so I'm starting tw

  • How to prepare API docs

    HI all I have some java beans. I just want to create my own api documentation for them. How can I do that? Please let me know the steps. Thank you. Regards, SSM

  • FI-MM info REQ???

    Hi I need to track the date for the payment made & cheque no. for a particular PO after its MIRO had been done. So I need the table name for FI to make a link b/w a PO no & its FI related data? Plz tell me the way to do this? Regds.

  • Oracle 9i JavaRE problem

    Hi, I am trying to install Oracle 9i but when it comes to Java Runtime Environment, it asks me path for it. I have JRE and J2SE installed in my Computer. What else do i need to proceed this installation? Thanks