Use of  ( * ) prefix before the table name

Friends,
Can anybody clear me the importance of prefixing the *(asterik) before the table name in the program.
Eg. Tables: *mara,
            *cstk.
Many Thanks,
Albert.

When you need two distinct work areas of the same database table in your program, you can use two tables declarations like
Tables: mara, *mara.
Typical use is on a screen, that has a table control. Here same table fields may appear on the main screen as well as in the table control. You use normal work area ( mara) to refer to main screen fields and the other work area ( *mara) for table control fields.

Similar Messages

  • Prefixing the schema owner to the table name

    I have entity objects in my JClient app that were created from tables owned by USER1. When I connect to my JClient app as USER2 the DML fails because the table names are not prefixed by the table owner (USER1). I don't want to use public synonyms and I don't want to customize my view objects just to prefix the table names with the table owner. How could I prefix all of the table names with the table/schema owner by default?

    We have been using another approach. We change the "current schema" at the db session level. This avoids having to define public synonyms and having to fully qualify names. It also allows us to have the same application schema defined multiple times in a db instance, which is useful for testing.
    While our real code is bit more complicated, basically we implement the afterConnect() and prepareSession() methods on an appication module with a call to our utility method:
    protected void afterConnect() {
    super.afterConnect();
    setupSession('hr');
    protected void setupSession(String currentSchema) {
    try {
    log.debug("Setting current schema to: " + currentSchema +
    " via: call alter session set current schema " + currentSchema);
    Statement stmt =
    getDBTransaction().createStatement(DBTransaction.DEFAULT);
    stmt.execute("alter session set current_schema=" + currentSchema);
    stmt.close();
    } catch (SQLException e) {
    if (e.getErrorCode() == 1435) {
    log.info("Couldn't set the current_schema to " + currentSchema +
    " because it doesn't exist in the target db.");
    } else {
    log.error("Error setting current_schema in DB context!", e);
    } catch (Exception e) {
    log.error("Error setting current_schema in DB context!", e);
    }

  • Using column value is it possible to find the table name in the database?

    Hi all,
    using column value is it possible to find the table name in the database?
    guys i need the table value
    Note:
    oracle-9i
    for example:
    i don't know NIC(column value) in which table in the database.
    Thank you,
    with regards,
    JP.
    Edited by: Guest on Feb 27, 2012 5:42 AM

    Hi,
    As far as I understand what you are asking for I would suggest 4 data dictionaries that will help you to know the table name from the column names
    1. USER_TAB_COLS
    2. ALL_TAB_COLS
    3. DBA_TAB_COLS
    4. COLS
    These can give you detail information about the columns and respective tables at user, schema, dba level. Further information on the table can be found by querying ALL_OBJECTS table giving table_name as Object_name, or you can join the data dictionaries too.
    To know about various data dictionaries avalible in Oracle please query select * from cat;
    Let us know if you need further assistance.
    Twinkle

  • To find the table name using field name

    Hi,
    Do we have any transaction code using field name to find out the table name
    Regards,
    P.Arunkumar.

    Hi Arun,
    The best way to find out table from field is,
    Use SE15 Transaction->dictionary fields ->table fields->goto table field columns
    Enter ur fields..
    or you can use ST05
    Reward points if it is useful
    Regards,
    R.Brahmankar

  • How to pass the table name dynamically in xml parsing

    Hi All,
    I have created one procedure for parsing xml file which is working perfectly.
    FORALL i IN t_tab.first .. t_tab.last
             INSERT INTO Test_AP VALUES t_tab(i);Now I want to put the table name dynamically+. For that I have added one query and modify above code as follow:-
    I have already declare dml_str varchar2(800) in declaration part.
    Query is as follows:-
    select table_name into tab_name from VERSION_DETAILS where SUBVERSION_NO=abc;  -- here abc is variable name which contains values.
    FORALL i IN t_tab.first .. t_tab.last
              dml_str := 'INSERT INTO ' || tab_name || ' values :vals';
              EXECUTE IMMEDIATE dml_str USING t_tab(i);But it's not working. How I will resolve this or through which way I achieved the intended results. Anyone can guide me on this matter.
    Thanks in advance for your help...

    Hi,
    But it's not working.Don't you think it would help to give the error message?
    Put the assignment before FORALL.
    FORALL only accepts one subsequent DML statement (static or dynamic SQL) :
    dml_str := 'INSERT INTO ' || tab_name || ' values :vals';
    FORALL i IN t_tab.first .. t_tab.last          
    EXECUTE IMMEDIATE dml_str USING t_tab(i);

  • 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

  • Creating a Mat View having the same name with that of the table name

    Hi everyone,
    After dropping the mat view name "QQ.TRDLN_DIM_MV", I'm trying to re-create it by having the same name as that of the table but I got an error stating that "name is already used by an existing object". How can create a mat view to look like the object owned by schema "GQ", having a name that is the same as that of the table name, without dropping the table?
    OWNER_O OBJECT_TYPE CREATED LAST_DDL_ TIMESTAMP STATUS OBJECT_NAME
    ===
    GQ MATERIALIZED VIEW 05-NOV-08 13-DEC-08 2008-11-05:06:31:46 VALID TRDLN_DIM_MV
    GQ TABLE 05-NOV-08 15-DEC-08 2008-11-05:06:31:00 VALID TRDLN_DIM_MV
    QQ TABLE 17-AUG-07 16-MAR-09 2007-08-17:17:05:21 VALID TRDLN_DIM_MV
    SQL>CREATE MATERIALIZED VIEW QQ.TRDLN_DIM_MV
    2 TABLESPACE FPLC01S
    3 NOCACHE
    4 NOLOGGING
    5 COMPRESS
    6 PARALLEL ( DEGREE 2 INSTANCES 1 )
    7 BUILD IMMEDIATE
    8 REFRESH FORCE ON DEMAND
    9 WITH PRIMARY KEY
    10 AS
    11 select /*+ NO_REWRITE */ trdln_id,
    12 trdln_skid,
    13 trdln_end_date,
    14 first_value(trdln_end_date) over (partition by trdln_id order by trdln_end_date DESC) as MaxDate
    15 from QQ.trdln_dim;
    from QQ.trdln_dim
    ERROR at line 15:
    ORA-00955: name is already used by an existing object
    I appreciate your help. Many thanks in advance!
    Regards,
    Radic

    You'd have to rename the table (using ALTER TABLE tablename RENAME TO othername; ) before you create the MV.
    You can't have both existing with the same name in the same schema.
    What you see in the GQ schema is that the "table" is the underlying table for the Materialized View.
    When you do a CREATE MATERIALIZED VIEW MY_MV AS ...
    Oracle creates two objects with the same name, one being the Materialized View MY_MV and the other being the table MY_MV which is the physical storage. {Remember that a Materialized View is a means of getting a physical representation of a View}.
    In the QQ schema what you have is either
    a. a real Table
    or
    b. an improperly dropped MV, resulting in the underlying Table still present.

  • To Get all the Table Names

    Hi All
    I have nearly 70 procedures in my database.
    I want to get all the distinct table names used in the 70 procedures.
    Is it possible?
    Note:
    All the table names are prefixed by schema name like DEVSRC.table_name.
    Please advice
    Thanks
    Jo

    Johney  wrote:
    Hi VT
    One doubt.
    This query will give the table names of only select stmt used in the procedure
    or
    List of table names that are with in any DML operations inside the procedure?
    Thanks
    JoIt will give all the table either used in select or in any DML..
    You can also check by creating a temp proc
    SQL> drop procedure proc_test;
    Procedure dropped.
    SQL> select name, referenced_name, dependency_type from user_dependencies
      2  where type = 'PROCEDURE' and referenced_type = 'TABLE' and name='PROC_TEST';
    no rows selected
    SQL> create or replace
      2  PROCEDURE proc_test
      3  IS
      4  v_ID    number;
      5  v_PRID  number;
      6  v_PRLID number;
      7  v_DATERECEIVED date;
      8  Cursor C1 is
      9  select * from table_c;
    10   BEGIN
    11   open c1;
    12     LOOP
    13      FETCH c1 INTO v_ID,v_PRID,v_PRLID,v_DATERECEIVED;
    14      EXIT WHEN c1%NOTFOUND;
    15      insert into table_b values(v_ID,v_PRID,v_PRLID,v_DATERECEIVED);
    16      Commit;
    17     END LOOP;
    18   CLOSE C1;
    19   END;
    20  /
    Procedure created.
    SQL> select name, referenced_name, dependency_type from user_dependencies
      2  where type = 'PROCEDURE' and referenced_type = 'TABLE' and name='PROC_TEST';
    NAME
    REFERENCED_NAME                                                  DEPE
    PROC_TEST
    TABLE_B                                                          HARD
    PROC_TEST
    TABLE_C                                                          HARD
    SQL> Regards
    Umesh

  • 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 look for the Table Name

    Hi Friends,
    Sometimes we need to download the table for the desired information if the same is not available from a particular report. How to look for the table name? Is there a report or a particular feild, where we can find the name of the particular table?
    Thanks for the assistance.
    Regards

    Hi Friend,
    If you want to see the structures then go to SE11. Sometimes it happens that you cannot find the table names but only fields. In such case, if you want to find the Table names which is not available, then go to SE90.
    Abap Dictionary > Fields > Table Fields.
    Now Enter the Field name in Right Hand Side of the screen then Execute. You will see the all tables by which that Fields are used.
    Regards,
    Jigar

  • How can I get the table name of a field..

    Hi,
    If we know the table name we can find all the fileds from it
    using desc <tablename>.
    But, I would like to find table name of a known field's name.
    Where all these fields are storing in the database.
    THanks in Advance,
    Srinivasulu.

    ALL_TAB_COLUMNS
    rgds, APC

  • Using i-prefix in an app name

    Hello,
    1- Can I use i-Prefix in an app name like in iGame or iSaw?
    2- Is it allowed to put an unknown coach's name in the app "Mr. John's Tips"?

    1.) You wouldn't be the iFirst....just know that there is no one here that can promise what will and won't be accepted.
    2.) Do you have legal rights to use another person's name? Apple may ask...
    App Store Review Guidelines:
    https://developer.apple.com/appstore/resources/approval/guidelines.html
    Prepare for App Submission
    App Store Submission Tips

  • MySQL - In a Query, Using a Variable as a Table Name

    Hello,
    The code I have attached works. However, I would like to
    replace the table name "tractors" with the variable "$result". How
    do I do this? (It doesn't work if I just type "$result" where
    "tractors" is.)
    Thanks,
    John

    ArizonaJohn wrote:
    > The code I have attached works. However, I would like to
    replace the table
    > name "tractors" with the variable "$result". How do I do
    this?
    You can't. In the code you have given $result is a MySQL
    database result
    resource. You need to extract the actual value from the
    result resource
    in the same way as you have done by using
    mysql_fetch_array().
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS4",
    "PHP Solutions" & "PHP Object-Oriented Solutions"
    http://foundationphp.com/

  • What are the table names for CRM and APO?

    hi friends,
    what are the table names for CRM and APO?
    Regards
    suneel.

    hi Suneel,
    check in crm forum
    Re: SAP-CRM Tables
    BUT051 BP Relationship: Contact Person Relationship
    Similar to BUT050 , additionally contains Contact Person’s Address data
    BUT0BK Business Partner: Bank Data & Details
    BP Number, Bank Key, Bank Country Key, Bank Account Number
    BNKA Bank Master Data
    BUT100 BP: Roles
    ADR2 Telephone Numbers (Business Address Services)
    ADR6 SMTP Numbers (Business Address Services)
    Contains Email – Id of the BP.
    ADRC Addresses (Business Address Services)
    BP’s Complete Address Details- City, Country, Post Code, District, Street, Title No Etc
    TSAD3T Table containing the Title text against a Title No.
    COMM_PRODUCT Master Table for Product
    CRMM_BUAG Master table for Business Agreement
    CRMM_BUAG_H Header Data for Business Agreement such as Tax Category, Tax Characteristic, Form key, Business Agreement Class. Data in this table correspond to ISU CRMD_ORDERADM_H Contains the Header Information for a Business Transaction.
    Note:
    1. It doesn’t store the Business Partner
    responsible for the transaction. To
    get the Partner No, link it with
    CRM_ORDER_INDEX.
    2. This table can be used for search
    based on the Object Id(Business
    Transaction No).
    CRMD_CUSTOMER_H Additional Site Details at the Header Level of a Business Transaction
    CRMC_PROC_TYPE Master table Business Transaction Type
    CRMC_PARTNER_FCT Definition of Partner Functions
    SCPRIOT Priorities for Activities with priority text.
    CRMC_PROC_TYPE_T Text for a transaction type
    CRMC_ACT_OBJ_T Objective Number and Text for Activities
    TJ30T All the status code and text
    CRMC_PR_ASSIGN : Transaction Type and its Transaction Type Object.
    IBIB : Installed Base/Ibase
    IBIN : Installed Base Components
    COMM_PRODUCT : Products
    CRMC_T077D : customer account groups
    CRMD_ORDERADM_H (for header) CRMD_ORDERADM_I (Item data)
    CRMD_ORDERADM_H Business Transactions CRM
    CRMD_ACTIVITY_H Activity
    CRMD_OPPORT_H Opportunity
    BUTOO : Customer details
    BUT001 BP: General data II
    BUT100 BP: Roles
    BUT150 BP relationship: Attribute table (test
    different
    BUT_HIER_TREE Business Partner Group Hierarchy
    CDBC_T_PRODUCTID Mapping: Product Id
    CDBD_ORGMAN Business transaction - organizational unit -
    set
    COMC_PRODUCT General Product Settings
    COMC_R3_FIELDS Assignment of R/3 material master fields to
    CFOP
    COMM_CATEGORY Category
    COMM_CFGMAT Basic Data for Materials
    COMM_HIERARCHY Category Hierarchy
    COMP_TYPES Hierarchy Tool: Comparison Type Check
    Table
    CRMC_CPRICPROC Customer Pricing Procedures
    SMOKVBEZ15 Assignment employees to positions
    CRMMLSGUID: GUID entry (should match GUID in CRMPRLS)
    CRMM_BUT_CUSTNO : Also GUID table (GUID here should match GUID in R/3 table CRMKUNNR)
    SMOFSUBTAB : Mapping & Parameters
    SMOFDSTAT : Download Monitor (R4AM1)
    SMOFFILTAB : Filters (Should match filters in R3AC1 & R/3 Table CRMFILTAB)
    SMOFOBJECT Definition of Objects for Download
    SMOFOBJPAR Parent Objects of an Object in Table
    SMOFPARSFA Middleware Parameter
    SMOFQFIND Queue Finder Table for MW-Queue finder
    SMOFTABLES Definition of Tables for Download

  • How do I list all of the table names in my excel database

    I am writing code for an electronic sales board display in my
    office. unfortunatly the datasource that is available to me is an
    excel file that is updated by the sales manager every day. each
    sales persons information is listed in a different tab and the tabs
    name is the same as the corrosponding sales person. unfortunatly we
    hire and fire many sales people every month so I need to loop
    through a list of the tab names outputing the results as the table
    name for my detail query for each sales rep.
    anyone have this query information?

    Yet another creative use of Excel as something which it's
    not, i.e. a database.
    COM it is if your access must be real-time.

Maybe you are looking for

  • How do I identify an iTunes Library that isn't named on my WAN?

    You'd think people wouldn't be so secretive! we have 800 employees at work and about 1/2 have iTunes ( mix of Macs and PCs). They all share their libraries up for others to listen, but many of them do not have their libraries named. Is there a way to

  • Satellite Pro A200: XP + Vista installed/dual boot possible?

    Hi, I am not sure if I am right here at XP OS but I post it as it is OS related. My Satellite Pro A200 (PSAE7) runs smoothly with XP but I want to create a sandbox (partition) for/with Vista. Basically I know that it is possible to run XP and Vista o

  • OS X Tiger - Help!!!!!!

    Hi I've got an old G4 Powerbook which I don't use anymore and I'm planning to give it to my Dad to mess about on now he's retired. Thing is this: I bought it from my bro 4 years ago without any discs, he bought it from someone without same. An old fr

  • How to run RWRUN.exe and RWCLIENT.exe in Linux

    Our reports (11G R2) output desformat is PDF. We howerver, need to embed some fonts in the PDF when it is generated. So, we need to add the parameter PDFEMBED in the command line of RWRUN, RWCLIENT or RWSERVLET. However, the application server is Lin

  • While Deploying and running the application

    Dear all, While deploying and running the application, after importing the relevant files into my local amchine workspace from another machine, i am facinf exception/error message as below: 'Service call exception; nested exception is: com.sap.engine