Get the size of the table as per row wise.( Rows in group by clause)

Hello,
I am using ORACLE 11g Standard edition and RHEL 4.
I have a situation in which i want to know the size of the limited rows of the table.
I am moving table's rows from one table(one tablespace) to another table(another tablespace) While moving the rows I want to be sure that the size of the rows is good enough to fit in the another table's tablespace free size. So before inserting rows in another table i will check the size of rows and the free space in tablespace and perform the action as per.
Here is the senario with example :-
I have a table called MAIN_TAB which has a column as DATE_TIME which stores the systimestamp when the data was inserted. See the code below ...
select * from main_tab;
ID     VALUE DATE_TIME
1     DATA      18-MAY-11 12.00.00.000000000 AM
2     DATA      18-MAY-11 12.00.00.000000000 AM
3     DATA      17-MAY-11 12.00.00.000000000 AM
4     DATA      17-MAY-11 12.00.00.000000000 AM Now i will fire a group by date_time query to know how many rows for each systimestamp.
select trunc(date_time),count(id)
from MAIN_TAB
group by trunc(date_time)
DATE_TIME     COUNT(ID)
17-MAY-11               2
18-MAY-11               2So now you can see i have 2 rows for 17th and 18th May. I want to know what is the size of the data for 17th and 18th May in MB. I know how to get the size of the whole table but i want only the limited rows size as per date.
So the question is how can i get the size of a table's 2 rows data ???
Provide me some guidance.
If the question is not clear to you , let me know ....
Thanks in advance ...

Thanks Pravan for your reply. But Its still not so usefull for me. Can you please give some clear idea about what you wanna say ??
I fired the DBA_TABLES view for my table i.e. 'MAIN_TAB' The AGV_ROW_LEN column showed 0 but that does not mean that my table has no data it, for sure it has 4 rows in it and consists of some data . . . . .
Please clarify what i can do to get the size of rows related to that particular date ......
thanks.

Similar Messages

  • How to get the table name and bind columns names in an INSERT statement ?

    I have an INSERT statement with input parameters (for example
    INSERT INTO my_table VALUES (:a, :a, :a)) and I want to know
    without parsing the statement which is the name of table to
    insert to and the corresponding columns.
    This is needed to generate the SELECT FOR UPDATE statement to
    refetch a BLOB before actually writing to it. The code does not
    know in advance the schema (generic code).
    Thanks in advance,
    Joseph Canedo

    Once you have prepared your statement, you can execute the
    statement with the OCI_DESCRIBE_ONLY mode before binding any
    columns. Then you can use OCIParamGet to find out about each
    column (column index is 1-based). You should get OCI_NO_DATA or
    ORA-24334 if there are no more columns in the statement. Note
    that the parameter descriptor from OCIParamGet is
    allocated/freed internally by OCI; you do not need to manage it
    explicitly. The parameter descriptor is passed to OCIAttrGet in
    order to obtain for instance the maximum size of data in the
    column OCI_ATTR_DATA_SIZE. You can also get the column name in
    this way, although I do not remember the #define off the top of
    my head. Getting the table name appears to be much more
    difficult; I have never had to do that yet. Good luck. -Ralph

  • Not able to get the tables in crystal report 2008

    Hi,
    I am using crystal report 2008 and trying to connect MS SQL using OLE DB (ADO) connection. After giving all DB credentials data base tables are not appearing in the connection. how to get the tables for selection in crystal report 2008.
    Regards,
    Sree

    In the CR Designer, select the connection and press the right mouse button. Select Options in the context menu and check if there is an entry in the Table name fiel. Maybe you have a placeholder there that does not match the names of the tables in the database. Just remove it, close the window by pressing OK and refresh the connection browser (press F5). Unfold the connection again and check if you can see the tables now.
    Regards,
    Stratos

  • How to get the table name in the trigger definition without hard coding.

    CREATE  TRIGGER db.mytablename
    AFTER UPDATE,INSERT
    AS
        INSERT INTO table1(col1)
        SELECT InsRec.col1   
        FROM
        INSERTED Ins
       --Below i am calling one sp for which i have to pass the table name
       EXEC myspname 'tablename'
      In the above trigger,presently i am hard coding the tablename
      but is it possible to get the table name dynamically on which the trigger is defined in order to avoid hard coding the table name

    I really liked your audit table concept.  You inspired me to modify it so that, the entire recordset gets captured and added a couple of other fields.  Wanted to share my end result.
    USE [YourDB]
    GO
    /****** Object: Trigger [dbo].[iudt_AutoAuditChanges] Script Date: 10/18/2013 12:49:55 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER TRIGGER [dbo].[iudt_AutoAuditChanges]
    ON [dbo].[YourTable]
    AFTER INSERT,DELETE,UPDATE
    AS
    BEGIN
    SET NOCOUNT ON;
    Declare @v_AuditID bigint
    IF OBJECT_ID('dbo.AutoAudit','U') IS NULL BEGIN
    CREATE TABLE [dbo].[AutoAudit]
    ( [AuditID] bigint identity,
    [AuditDate] DateTime,
    [AuditUserName] varchar(128),
    [TableName] varchar(128) NULL,
    [OldContent] XML NULL,
    [NewContent] XML NULL
    ALTER TABLE dbo.AutoAudit ADD CONSTRAINT
    PK_AutoAudit PRIMARY KEY CLUSTERED
    [AuditID]
    ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    CREATE NONCLUSTERED INDEX [idx_AutoAudit_TableName_AuditDate] ON [dbo].[AutoAudit]
    ( [TableName] ASC,
    [AuditDate] ASC
    )WITH (STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    END
    Select * Into #AuditDeleted from deleted
    Select * Into #AuditInserted from inserted
    While (Select COUNT(*) from #AuditDeleted) > 0 OR (Select COUNT(*) from #AuditInserted) > 0
    Begin
    INSERT INTO [dbo].[AutoAudit]
    ( [AuditDate], [AuditUserName], [TableName], [OldContent], [NewContent])
    SELECT
    GETDATE(),
    SUSER_NAME(),
    [TableName]=object_name([parent_obj]),
    [OldContent]=CAST((SELECT TOP 1 * FROM #AuditDeleted D FOR XML RAW) AS XML),
    [NewContent]=CAST((SELECT TOP 1 * FROM #AuditInserted I FOR XML RAW) AS XML)
    FROM sysobjects
    WHERE
    [xtype] = 'tr'
    and [name] = OBJECT_NAME(@@PROCID)
    Set @v_AuditID = SCOPE_IDENTITY()
    Delete from AutoAudit
    Where AuditID = @v_AuditID
    AND Convert(varchar(max),oldContent) = Convert(varchar(max),NewContent)
    Delete top(1) from #AuditDeleted
    Delete top(1) from #AuditInserted
    End
    END

  • How to get the table of value field? and can we expand the technical limits

    Dear
    I have created value field in COPA with KEA6. And now, I need the table which the value fields are saved. Yet, I have tried a lot to find it and get failure? Can any guy help me? Please tell me how to get the table of a value field.
    And another question is that, can we extend the technical limits for the number of value field for ECC6.0?
    We have a note for R.4.x Please see below:
    OSS note 160892
    You can display the length of a data record using Transaction KEA0 ('Maintain Operating Concern'). After you have navigated to the 'Characteristics Screen' or to the 'Value field Screen' choose menu path 'Extras -> Technical Limits'.
    The maximum displayed here under 'Length in bytes on the DB' is the maximum length permitted by the Dictionary. The reserve required for the release upgrade must be subtracted from this value.
    To increase the allowed number of the value fields, increase the value that is assigned to field ikcge-bas_max_cnt (FORM init_ikcge_ke USING fm_subrc, approx. line 165) in Include FKCGNF20. It specifies the number of the possible value fields. The corresponding part of the source code is attached to the note as a correction.
    David Sun
    Regards!

    how to extend the limit of value numbers? please see the original question.

  • How do I get the table of contents to toggle? I opened it while reading one book I had checked out from my library, but it is still open when I start another book. I am using Adobe 4 and Windows 8.1 on my PC.

    How do I get the table of contents to toggle? It has remained open since I opened it while reading two books ago. Thanks for the help.

    Thank you for your advice. I followed your directions, but came up with the same results. However, I did discover that whenever I open up the iPhoto Library that is already existing on my MacBook a certain set of pictures shows up. But then when I open up the iPhoto Library from the Hard drive another set of pictures shows up. BUT not ALL of my pictures are showing up on the iPhoto Library from the hard drive. At least the last two years of pictures are not showing up?! Actually, it appears that all the pictures are there from when I started using iPhoto about 5 years ago up until around the time that I got my iMac desktop computer and started using that (2 years ago). I have noticed that more recent videos I have made are showing up in a folder on the hard drive, but will not appear when I open up iMovie?! Any ideas on how to access my pictures from the last 2 years off of the hard drive???

  • How to get the table name of a field in a result set

    hi!
    i have a simple sql query as
    select tbl_customerRegistration.*, tbl_customerAddress.address from tbl_customerRegistration, tbl_customerAddress where tbl_customerAddress.customer_id = tbl_customerRegistration.customer_ID
    this query executes well and gets data from the database when i get ResultsetMetaData from my result set (having result of above query) i am able to get the field name as
    ResultSetMetaData rsmd = rs.getMetaData();//rs is result set
    String columnName = rsmd.getColumnName(1);
    here i get columnName = "Customer_id"
    but when i try to get the tabel name from meta data as
    String tableName = rsmd.getTableName(1); i get empty string in table name....
    i want to get the table name of the respective field here as it is very important to my logic.....
    how can i do that.....
    please help me in that regard as it is very urgent
    thanks in advance
    sajjad ahmed paracha
    you may also see the discussion on following link
    http://forum.java.sun.com/thread.jspa?threadID=610200&tstart=0

    So far as I'm aware, you can't get metadata information about the underlying tables in a query from Oracle and/or the Oracle drivers. I suspect, in fact, that the driver would have to have its own SQL parser to get this sort of information.
    I'm curious though-- how do you have application logic that depends on the name of the source table but not know in the application what table is involved? Could you do something "cheesy" like
    SELECT 'tbl_customerRegistration' AS tbl1_name,
           tbl_customerRegistration.*
    ...Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Were I can get the table of PIKMG

    Dear Guru,
    I want to no from which table I can get the data of Pick Qty.
    When I go to VL02N Pick Qty, their I can find
    Structure : -  LIPSD
    Feild : -  PIKMG.
    But when I am searching in PIKGM I am not getting any data.
    So, will u help me to get the table name of PIKMG.
    Manoj Kumar

    go to tcode: se 11
    enter the name: LIPS (delivery: item data)
    click on display
    you can see the field name: LGMNG (actual qty del in stock keeping units)

  • How to get the table strucuture for multiple table

    I need to get the table structure for more than 40 table in a .txt file, is there any query to get this.
    I know how to get it individually but would be good if I can get it in one go
    Regards,

    You could write a procedure using DBMS_METADATA.GET_DDL + DBA|ALL|USER_TABLES
    or
    ask your DBA
    or
    get something like SQL Developer/PL/SQL Developer/TOAD...

  • Get the table or view where categorie's sequence order is store

    Hi,
    I manage to display some categories on a page. Some how I like to display the categories in a specific order. To be exact, I like to have the same order as we can define in the pagegroup properties > configure tab > Types and Classification > Categories section, when adding new categories.
    Portal stores that sequence order somewhere because when we return to pagegroup properties we have the same order as defined previously. I looked the Portal's tables and package trying get the table or view where sequence order is stored, but I can't get it.
    Anybody knows where I should get this sequence order? (table or view). I'm new to Portal and so I know little about it.
    Regards

    Here is the query to get the categories in the same order as specified for a page group :
    SELECT wwv_topics.title
    FROM wwv_topics,
    wwsbr_site_category$
    WHERE wwv_topics.id = wwsbr_site_category$.CATEGORY_ID
    AND wwv_topics.siteid = wwsbr_site_category$.CATEGORY_siteID
    AND wwv_topics.language = -- the language desired (eg frc)
    AND wwv_topics.siteid = -- the page group desired (eg 139)
    ORDER BY wwsbr_site_category$.id ASC
    David

  • To get the table data into a file in pl/sql developer

    Hi
    i have table with 90k rows, i want to get the table data into a file like excel....
    i executed the select statement it shows only 5k rows because of buffer problem.
    can u please help me any alternative way to get the table data into a file.
    using cursors like that

    Really? excel for 90K rows :)
    face/desk/floor/"Hi and sorry neighbours below, it's me again"
    Err, I see you point, thanks Dang, I completely missed the 90k recs part, I must be getting old or modern ;)
    @Ramanjaneyulu,
    can u please help me any alternative way to get the table data into a file.You can always dump a query to a file, check these:
    http://tkyte.blogspot.com/2009/10/httpasktomoraclecomtkyteflat.html
    How to create Excel file (scroll down when necessary)
    http://forums.oracle.com/forums/search.jspa?threadID=&q=export+to+excel&objID=f137&dateRange=all&userID=&numResults=15&rankBy=10001
    Depending on your database version ( the result of: select * from v$version; ) you might have some other options.

  • Is it possible to view/get the table data from a dump file

    I have dmp files generated using expdp on oracle 11g..
    expdp_schemas_18MAY2013_1.dmp
    expdp_schemas_18MAY2013_2.dmp
    expdp_schemas_18MAY2013_3.dmp
    Can I use a parameter file given below to get the table data in to the sql file or impdp the only option to load the table data in to database.
    vi test1.par
    USERID="/ as sysdba"
    DIRECTORY=DATA
    dumpfile=expdp_schemas_18MAY2013%S.dmp
    SCHEMAS=USER1,USER2
    LOGFILE=user_dump_data.log
    SQLFILE=user_dump_data.sql
    and impdp parfile=test1.par.

    Hi,
    To explain more about my situation.
    Target database has the dump files, where as the source database (cloud) doesn't have access to the target database.
    However, I can request the target DB DBA team to run the par files and provide me the output like a SQL file which I can take and run it in my source database.
    I got the metadata the same way, but is there any way I could get the data from the dump files on the target DB without actually accessing it? My question might sound weird, but please let me know.
    <
    1. export from the source into a dumpfile. You can do this on the source database and then copy the file over to your local database or you can do this from a local database if you have a database link defined on the local database that points to the source database.  In the second case, your dumpfile will be created on your local database.
    >
    How can i access the dump using the database link?

  • How to get the table with no. of records after filter in webdynpro

    Dear Gurus,
    How to get the table with no. of records after filter in webdynpro?
    Thanks in advance.
    Sankar

    Hello Sankar,
    Please explain your requirement clearly so that we can help you easily.
    To get the table records from your context node use method get_static_attributes_table()
    data lo_nd_mynode       type ref to if_wd_context_node. 
    data lt_atrributes_table  type wd_this->elements_mynode. 
    lo_nd_mynode = wd_context->get_child_node( name = wd_this->wdctx_mynode ). 
    lo_nd_mynode->get_static_attributes_table( importing table = lt_atrributes_table ). 
    Note: You should have already defined your context node as a Dictionary Structure.
    BR,
    RAM

  • Error getting the table form SQLdatabase

    Hi
    I am trying to get the table form database. Connection is fine but when i am trying to display tables:
    C  Thread ID:6388
    C  dbmssslib.dll patch info
    C    patchlevel   0
    C    patchno      72
    C    patchcomment MSSQL: Thread check in DbSlDisconnect (969143)
    C  Network connection used from ACDBD006 to 10.8.191.80 using tcp:10.8.191.80
    C  Connected to db server : [10.8.191.80] server_used : [tcp:10.8.191.80], dbname: Procurement_Test, dbuser: dbo
    C  pn_id:10.8.191.80_PROCUREMENT_TEST_BWD
    B  Connection 6 opened (DBSL handle 1)
    B  Wp  Hdl ConName          ConId     ConState     TX  PRM RCT TIM MAX OPT Date     Time   DBHost
    B  000 000 R/3              000000000 ACTIVE       NO  YES NO  000 255 255 20070830 111230 ACDBD006
    B  000 001 R/3*             000000023 DISCONNECTED NO  NO  NO  000 255 255 20070907 132307 ACDBD006
    B  000 002 R/3*BWMON        000000021 DISCONNECTED NO  NO  NO  003 255 255 20070907 130541 ACDBD006
    B  000 003 R/3*DTPLOG       000000022 DISCONNECTED NO  NO  NO  000 255 255 20070907 131807 ACDBD006
    B  000 004 TEST             000000044 DISCONNECTED NO  NO  NO  004 100 005 20070911 105027 10.8.191.80
    B  000 005 ACSCT001         000000042 DISCONNECTED NO  NO  NO  000 100 005 20070910 132555
    B  000 006 BUYIT_CONN       000000110 ACTIVE       NO  YES NO  004 100 100 20070911 143721 10.8.191.80
    C  DbSlBegRead[1]: ##Y4ACDBD006Procurement_Test00000011640000000001143721
    C  DbSlBegRead[1]: ##Y4ACDBD006Procurement_Test00000011640000000002143721
    B Tue Sep 11 14:38:16 2007
    B  6: name = BUYIT_CONN, con_id = 000000110 state = INACTIVE    , perm = YES, reco = NO , timeout = 004, con_max = 100, con_opt = 10
    B  6: name = BUYIT_CONN, con_id = 000000110 state = INACTIVE    , perm = YES, reco = NO , timeout = 003, con_max = 100, con_opt = 10
    C  DbSlBegRead[1]: ##Y4ACDBD006bwd00000011640000000017111230
    C  ParamStmtExec: line 13049. hr: 0x80040e2f The statement has been terminated.
    C<b>  DbSlModify - Error 26 (dbcode 2627)
    C  No statement!</b>
    C  ParamStmtExec: line 13049. hr: 0x80040e2f The statement has been terminated.
    C  <b>DbSlModify - Error 26 (dbcode 2627)
    C  No statement!</b>
    C  DbSlBegRead[1]: ##Y4ACDBD006bwd00000011640000131213111230
    C  DbSlBegRead[1]: ##Y4ACDBD006bwd00000011640000131213111230
    C  DbSlBegRead[1]: ##Y4ACDBD006bwd00000011640000000709111230
    C  DbSlBegRead[1]: ##Y4ACDBD006bwd00000070720000000061111230

    Hi
    try this
    F fact tables are
    created without a unique index. However, existing unique indexes are not
    deleted. This may sometimes cause a duplicate key during loading to the
    InfoCube and thus trigger the above-described short dump.
    Run the report SAP_DROP_UNIQUE_FACTINDEX_DB2 to replace the unique index on F fact tables with a non-unique index. Refer also to note 511170.

  • We are upgrading from 8.3 to 9.2. How can i get the table(record) structure changes between these 2 version

    We are upgrading from 8.3 to 9.2. How can i get the table(record) structure changes between these 2 versions. I am not able to find it in Oracle support.

    My guess is you want to upgrade HR8.3 to 9.2 - and that is not one jump upgrade. You will need to go HRMS 83 to 90
    (PeopleSoft Enterprise HRMS 8.3x to 9.0 Upgrade (Doc ID 747333.1) and then 90 to 92 (PeopleSoft Human Capital Management 9.0 to 9.2 Upgrade Home Page (Doc ID 1536087.1)
    Each these MOS pages contains the Demo to Demo Compare Reports that show the data structures changes between the releases.
    Hope it helps.

Maybe you are looking for

  • HT5622 Why, in the name of all that is good and Holy, can I not make my iCloud email address my Apple ID?

    I want to ELIMINATE Google. From my life. I don't need their mail, I don't need their maps. I don't need their productivity software, I don't need their apps. I don't want them crawling all my data when I search the web. I don't need their browser, I

  • Get file metadata with Reader API

    Hi It is possible to retrieve the metadata of a file with the Reader API? How? Thanks

  • HRMD_A Idocs sent to XI has status 39

    Hi, Our HRMD_A idocs used to have status 03, but after we started using XI , most of them have status 39 and they are being processed correctly. But some other programs are checking for status 03. How does this Idoc status gets changed or effected af

  • Ituns doesn't have music anymore, scared to sync ipod and loose all music

    I really could use some help, I have tried everything and don't know what happened. I plugged my Nano iPod into my computer as I have always done since I received it as a gift for Christmas, to create a new playlist and sync it. When I plugged it int

  • Hooking up PC to hotspot

    What equipment do I need to hookup an HP PC, not internal wireless capability, to be able to utilize the Galaxy tablet wireless hotspot? I do have a Netgear N300 wireless router at home. My laptop works fine utilizing the Galaxy wireless, since I am