Create table statement goes to hang state..in ODI.. in BI database

Our development team is trying to create an external tabe to another database's schema. ODI is creating the connection bridge inside. I don't know how. But whenever they fire this query it is going to hang state. where as same code is running fine from another database.
The users by which they are connceting to the source database to fire this query are having same privileges.
For one database it is working fine as the table is created at the target database and in proper schema but for another it is not working and hanging...(not giving any result)
Databases are used for BI work and having almost same configurations.
I have checked the Target database v$session view. It is giving me <enq: PS - contention> event
and three rows are returning with <PX Deq: Table Q Close> event for other two following rows....
can anybody throw some light on this? waht should I do now. as killing the blocking session is not solving the problems
Here is an example of the query executed :
CREATE TABLE SCHEMA_NAME.C$_0ODS_JDE_F0004
( C1_DTSY, C2_DTUCD1, C3_DTRT, C4_DTJOBN, C5_DTUPMJ_DT, C6_DTMRTY, C7_DTDL01, C8_DTPID,
C9_DTMRCT, C10_DTLN2, C11_DTCNUM, C12_DTUSEQ, C13_DTUSER, C14_DTCDL, JRN_SUBSCRIBER, JRN_FLAG, JRN_DATE )
ORGANIZATION EXTERNAL
( TYPE oracle_datapump
DEFAULT DIRECTORY DIR_SCHEMA_NAME
LOCATION ('X58030417C$_0ODS_JDE_F0004_1.EXP' , 'X58030417C$_0ODS_JDE_F0004_2.EXP')
PARALLEL 2 AS
SELECT
NVL(TRIM(F0004.DTSY), ' ') C1_DTSY, NVL(TRIM(F0004.DTUCD1), ' ') C2_DTUCD1, F0004.DTRT C3_DTRT,
TRIM(F0004.DTJOBN) C4_DTJOBN, J2DT(DTUPMJ, DTUPMT) C5_DTUPMJ_DT, NVL(TRIM(F0004.DTMRTY), ' ') C6_DTMRTY,
TRIM(F0004.DTDL01) C7_DTDL01, TRIM(F0004.DTPID) C8_DTPID, F0004.DTMRCT C9_DTMRCT, F0004.DTLN2 C10_DTLN2,
F0004.DTCNUM C11_DTCNUM, F0004.DTUSEQ/10 C12_DTUSEQ, TRIM(F0004.DTUSER) C13_DTUSER,
F0004.DTCDL C14_DTCDL, ' ' AS JRN_SUBSCRIBER, 'I' AS JRN_FLAG, SYSDATE AS JRN_DATE
FROM SCHEMA_NAME.F0004 F0004 WHERE (1=1)
-Regards,
Saha

Saha, did you ever get an answer to this? I have the same issue. I thought maybe it had to do with grants on the directory, but that hasn't helped anything.
Dan

Similar Messages

  • Z10 goes into hang state giving black display

    Hi,
    My Z10 goes into hang state very frequently. Any high graphic action and soon within a day's time system would crash and hang until reboot action is performed. 
    I am extremely dissapointed with the quality of z10 and from the forum it seems it is no different for z30 and other devices. 
    This is the second time I have started having trouble with the device and none of service centers can solve this issue. Infact they hardly understand the issue. All they do is reload software and return the device. 
    What is the maximum duration that a Z10 works without a reboot, be cause I see my device requiring a reboot every 3rd day. IS there a solution around?
    Thanks

    Another interesting observation: Post the device's reboot, PIM services takes up almost 30-60% of CPU time continuously. It starts draining up the battery.

  • Create table Physical attributes clause

    Guys,
    In my current project, I need to create the table (unfortunately, we recently lost the main DBA). I have been supplied a standard create table clause this people are using for transaction table :
    CREATE TABLE testtable
    CITY VARCHAR2(50),
    STATE VARCHAR2(2),
    ZIPCODE VARCHAR2(9),
    TABLESPACE space_DATA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 1M
    NEXT 1M
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    * I also need to create many Lookup kind of a table and need your help to find suggested values for: PCTUSED, pctfree, initrans, maxtrans, storage (initial, next, minextends, maxextends, pctincrease, buffer_pool) *
    Please let me know if I need to use the different values for the above suggested attributes for lookup table vs transaction table?
    Thank you soo much
    -Raj

    Hello,
    It depends on your Tablespace.
    If you use Dictionary Managed Tablespace (DMT), then you can use all these parameters.
    If you use Locally Managed Tablespace (LMT) without Automatic Segment Space Management (ASSM) then you
    may use the following parameters:
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE ( BUFFER_POOL DEFAULT )
    NB: PCTUSED = 0 is a very strange setting.
    If you use LMT with ASSM then you don't have to use the PCTUSED parameter (you still may use PCTFREE).
    About the BUFFER_POOL DEFAULT if you have just one Buffer it's not necessary the DEFAULT is always
    the default value.
    The BUFFER_POOL is useful when you have several Buffers (RECYCLE, KEEP and DEFAULT).
    Hope this help.
    Best regards,
    Edited by: Lubiez Jean-Valentin on Jan 28, 2010 8:29 PM

  • Create-tables problem

    hi,
    i've re-posted this into a new post.
    i'm following the java ee tutorial at sun.com and i'm having a problem with the bokstore1 example.
    i've set the password file correctly and when i go to the bookstore1 dir and type 'ant' everything seems ok.
    the problem i'm having is once i've started the server and DB server and then type ' ant create-tables' the build fails and i get this output-
    "Starting database it the background. log redirected to c:\SunAppserver\......\....\...db.log
    comand start-database failed
    delete-tables:
    BUILD FAILED
    C:\javaeetutorial5\bp-project\database-ant.xml:48: c:\sun\appserver\javadb\lib not found"
    can anyone help?
    thanks in advance
    mat

    Based on the info. provided, seems to me the value for 'javaee.home' in build.properties may not be correct. Make sure that the property javaee.home in build .properties pints to valid installtion of application server, for ex. if you do 'dir' or 'ls' you should see javadb directory at this location.
    Also check if you have a build.properties file under windows user directory (in addition to bp-project under tutorial) and if it points to a different application server installation.
    - sreeni

  • 'create table..' statement behaves differently when alone or in a SP

    hello
    sorry for the title, I just couldnt think of a better description of the problem in very few words...
    the problem I have is:
    I created a stored procedure into the oracle db, and this procedure has the following code inside it:
    auxsql := 'create table tmp (id smallint, name varchar2(256))';
    execute immediate auxsql;
    - now this procedure I call from a java class, using a callable statement
    when I call the stored procedure, I get this message:
    ORA-01031: insufficient privileges (at the line containing the execute instruction)
    my dillema arises from the fact that if I change my callable statement to execute a query of the form:
    auxsql := 'create table tmp (id smallint, name varchar2(256))';
    execute immediate auxsql;
    - but executed as is, not embedded in a sp or something;
    - so if I change to execute simply this, all goes well....
    I would much appreciate if anyone knew at least where to start looking.
    Thank you,
    Silviu Lipovan Oanca
    p.s. for any further details, just say.
    Message was edited by:
    silviulipovan

    In all probability, the user that owns the stored procedure has the CREATE TABLE privilege through a role, not granted directly. In PL/SQL blocks (assuming definer's rights), only direct privilege grants are "visible", whereas straight SQL statements also "see" privileges granted through a role.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Create table as select (CTAS)statement is taking very long time.

    Hi All,
    One of my procedure run a create table as select statement every month.
    Usually it finishes in 20 mins. for 6172063 records and 1 hour in 13699067.
    But this time it is taking forever even for 38076 records.
    When I checked all it is doing is CPU usage. No I/O.
    I did a count(*) using the query it brought results fine.
    BUT CTAS keeps going on.
    I'm using Oracle 10.2.0.4 .
    main table temp_ip has 38076
    table nhs_opcs_hier has 26769 records.
    and table nhs_icd10_hier has 49551 records.
    Query is as follows:
    create table analytic_hes.temp_ip_hier as
    select b.*, (select nvl(max(hierarchy), 0)
    from ref_hd.nhs_opcs_hier a
    where fiscal_year = b.hd_spell_fiscal_year
    and a.code in
    (primary_PROCEDURE, secondary_procedure_1, secondary_procedure_2,
    secondary_procedure_3, secondary_procedure_4, secondary_procedure_5,
    secondary_procedure_6, secondary_procedure_7, secondary_procedure_8,
    secondary_procedure_9, secondary_procedure_10,
    secondary_procedure_11, secondary_procedure_12)) as hd_procedure_hierarchy,
    (select nvl(max(hierarchy), 0) from ref_hd.nhs_icd10_hier a
    where fiscal_year = b.hd_spell_fiscal_year
    and a.code in
    (primary_diagnosis, secondary_diagnosis_1,
    secondary_diagnosis_2, secondary_diagnosis_3,
    secondary_diagnosis_4, secondary_diagnosis_5,
    secondary_diagnosis_6, secondary_diagnosis_7,
    secondary_diagnosis_8, secondary_diagnosis_9,
    secondary_diagnosis_10, secondary_diagnosis_11,
    secondary_diagnosis_12, secondary_diagnosis_13,
    secondary_diagnosis_14)) as hd_diagnosis_hierarchy
    from analytic_hes.temp_ip b
    Any help would be greatly appreciated

    Hello
    This is a bit of a wild card I think because it's going to require 14 fill scans of the temp_ip table to unpivot the diagnosis and procedure codes, so it's lilkely this will run slower than the original. However, as this is a temporary table, I'm guessing you might have some control over its structure, or at least have the ability to sack it and try something else. If you are able to alter this table structure, you could make the query much simpler and most likely much quicker. I think you need to have a list of procedure codes for the fiscal year and a list of diagnosis codes for the fiscal year. I'm doing that through the big list of UNION ALL statements, but you may have a more efficient way to do it based on the core tables you're populating temp_ip from. Anyway, here it is (as far as I can tell this will do the same job)
    WITH codes AS
    (   SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            primary_PROCEDURE       procedure_code,
            primary_diagnosis       diagnosis_code,
        FROM
            temp_ip
        UNION ALL
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_1    procedure_code,
            secondary_diagnosis_1    diagnosis_code
        FROM
            temp_ip
        UNION ALL
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_2    procedure_code ,
            secondary_diagnosis_2    diagnosis_code     
        FROM
            temp_ip
        UNION ALL
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_3    procedure_code,
            secondary_diagnosis_3    diagnosis_code
        FROM
            temp_ip
        UNION ALL
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_4    procedure_code,
            secondary_diagnosis_4    diagnosis_code
        FROM
            temp_ip
        UNION ALL
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_5    procedure_code,
            secondary_diagnosis_5    diagnosis_code
        FROM
            temp_ip
        UNION ALL
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_6    procedure_code,
            secondary_diagnosis_6    diagnosis_code
        FROM
            temp_ip
        UNION ALL
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_7    procedure_code,
            secondary_diagnosis_7    diagnosis_code
        FROM
            temp_ip
        UNION ALL
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_8    procedure_code,
            secondary_diagnosis_8    diagnosis_code
        FROM
            temp_ip
        UNION ALL
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_9    procedure_code,
            secondary_diagnosis_9    diagnosis_code
        FROM
            temp_ip
        UNION ALL
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_10  procedure_code,
            secondary_diagnosis_10    diagnosis_code
        FROM
            temp_ip
        UNION ALL
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_11  procedure_code,
            secondary_diagnosis_11    diagnosis_code
        FROM
            temp_ip    
        SELECT
            bd.primary_key_column_s,
            hd_spell_fiscal_year,
            secondary_procedure_12  procedure_code,
            secondary_diagnosis_12    diagnosis_code
        FROM
            temp_ip
    ), hd_procedure_hierarchy AS
    (   SELECT
            NVL (MAX (a.hierarchy), 0) hd_procedure_hierarchy,
            a.fiscal_year
        FROM
            ref_hd.nhs_opcs_hier a,
            codes pc
        WHERE
            a.fiscal_year = pc.hd_spell_fiscal_year
        AND
            a.code = pc.procedure_code
        GROUP BY
            a.fiscal_year
    ),hd_diagnosis_hierarchy AS
    (   SELECT
            NVL (MAX (a.hierarchy), 0) hd_diagnosis_hierarchy,
            a.fiscal_year
        FROM
            ref_hd.nhs_icd10_hier a,
            codes pc
        WHERE
            a.fiscal_year = pc.hd_spell_fiscal_year
        AND
            a.code = pc.diagnosis_code
        GROUP BY
            a.fiscal_year
    SELECT b.*, a.hd_procedure_hierarchy, c.hd_diagnosis_hierarchy
      FROM analytic_hes.temp_ip b,
           LEFT OUTER JOIN hd_procedure_hierarchy a
              ON (a.fiscal_year = b.hd_spell_fiscal_year)
           LEFT OUTER JOIN hd_diagnosis_hierarchy c
              ON (c.fiscal_year = b.hd_spell_fiscal_year)HTH
    David

  • Mass create table statement

    Hi,
    I am facing the following problem:
    Database A is running with a great number of tables.
    Database B should contain the same tables as A with different data (DB B is empty at the moment).
    Therefore I've collected all the 'create table'-statements and packed them into a script.
    Because there are several foreign key constraints in DB A (not all deferrable) it seems to be a problem to execute the script.
    I have searched the internet how to disable constraints before executing the statements, but I' ve only found solutions for disabling constraints for allready existing tables - not disabling constraint checks will creating.
    So, could you please give me a hint what keywords I should use for my further search?
    Thanks in advance.

    steve sastro wrote:
    Thanks to all of you.
    The point is: I don't really like tools (where I have to click in GUIs). I prefer to see what's going on - just to learn what's happening behind.
    As soon as I have tested all of your topics I will reward you with the forum-points. Thx again.
    EDIT: Version is 10g
    Edited by: steve sastro on 07.12.2009 11:28Being an old-fart command line guy myself, I can appreciate that -- up to a point. But eventually it gets to be simply re-inventing the wheel.
    Use exp at the command line. Then use the 'strings' command to examine the output .dmp file. That will give you the education you seek.

  • How to specify  tablespace for a primary key inde in create table statement

    How to specify the tablespace for a primary key index in a create table statement?
    Does the following statement is right?
    CREATE TABLE 'GPS'||TO_CHAR(SYSDATE+1,'YYYYMMDD')
                ("ID" NUMBER(10,0) NOT NULL ENABLE,
                "IP_ADDRESS" VARCHAR2(32 BYTE),
                "EQUIPMENT_ID" VARCHAR2(32 BYTE),
                "PACKET_DT" DATE,
                "PACKET" VARCHAR2(255 BYTE),
                "PACKET_FORMAT" VARCHAR2(32 BYTE),
                "SAVED_TIME" DATE DEFAULT CURRENT_TIMESTAMP,
                 CONSTRAINT "UDP_LOG_PK" PRIMARY KEY ("ID") TABLESPACE "INDEX_DATA"
                 TABLESPACE "SBM_DATA";   Thank you
    Edited by: qkc on 09-Nov-2009 13:42

    As orafad indicated, you'll have to use the USING INDEX clause from the documentation, i.e.
    SQL> ed
    Wrote file afiedt.buf
      1  CREATE TABLE GPS
      2              ("ID" NUMBER(10,0) NOT NULL ENABLE,
      3              "IP_ADDRESS" VARCHAR2(32 BYTE),
      4              "EQUIPMENT_ID" VARCHAR2(32 BYTE),
      5              "PACKET_DT" DATE,
      6              "PACKET" VARCHAR2(255 BYTE),
      7              "PACKET_FORMAT" VARCHAR2(32 BYTE),
      8              "SAVED_TIME" DATE DEFAULT CURRENT_TIMESTAMP,
      9               CONSTRAINT "UDP_LOG_PK" PRIMARY KEY ("ID") USING INDEX TABLESP
    ACE "USERS"
    10               )
    11*              TABLESPACE "USERS"
    SQL> /
    Table created.Justin

  • Create table statement in Dynamic SQL

    Hello,
    I am trying to create a table as a select query through a PL/SQL block using dynamic SQL. Following is the query,
    declare
    stmt varchar2(2000);
    begin
    stmt := '''CREATE TABLE output AS SELECT PATIENT_ID, FIRST_NAME FROM employee''';
    execute immediate stmt;
    end;
    it throws the following error.
    declare
    ERROR at line 1:
    ORA-00900: invalid SQL statement
    ORA-06512: at line 5
    I have tried to execute the statement without the variable and it executes fine. I mean,
    begin
    execute immediate ' CREATE TABLE output AS SELECT PATIENT_ID, FIRST_NAME FROM employee ';
    end;
    works flawlessly. Can you please help me with this.
    Thanks

    Hi,
    declare
    stmt varchar2(2000);
    begin
    stmt := 'CREATE TABLE output AS SELECT PATIENT_ID, FIRST_NAME FROM employee';
    execute immediate stmt;
    end;Nothing different from what Anurag has shown above.
    But you will have to consider a few things.
    1) Since it is possible it is not a must to use it
    2) It is considered a bad design where in you have to create tables on the fly.
    3) Consider if it is absolutely required.If u can give us an idea of your requirement.I am sure the Gurus here can give you suggestions
    4) this kind of design will lead you into trouble sooner or later for sure
    Regards,
    Bhushan

  • Generating Create Table As Statements

    Hi all - just after a bit of guidance on the following procedure:
    I have identified various columns that need their numeric values upgrading during a cutover. These are stored in the table FOR_UPGRADE which contains the columns TABLE_NAME, COLUMN_NAME, and FACTOR, (the factor is assigned depending on the object type being upgraded and is used in the calculation to create the new 'upgraded' value for that column).
    My problem is that I'm dealing with very large volumes, (TBs) of data and speed is a key factor here. As such I've been asked to upgrade these using create table statements rather than updates, (I believe this was down to being able to turn almost all the logging off during creates, but not updates). So the plan would be to use CTAS a select from the existing table, but apply the upgrades based on the factor during this, then rename these upgraded tables to match the original.
    Now I'd rather not manually create 200+ of these create table statements so I was hoping someone could advise as to how I could use a combination of FOR_UPGRADE table and ALL_TABLE_COLS to dynamically output all the statements required.
    Any help greatly appreciated.

    Write one script manually and use it as a template to create other scripts.
    The easiest way would be loop through FOR_UPGRADE table
    - as soon as the table name changes you know that next statement starts and previous end so you should do something different than for all other rows.
    - for each column generate its part of insert statement and oputput for example using dbms_output.
    Question remains would you really need user/all_tab_columns view because as I've understood you have already all column names in FOR_UPGRADE table.
    In case you need it (for example to check data type or whatever) you can simply join it to your base cursor.
    With one template already created and a bit of PL/SQL it should not be that hard :)
    Gints Plivna
    http://www.gplivna.eu

  • Create table as select statement.

    Hello Oracle Gurus,
    I am trying to create a table using select * from other table.
    The procedure that I am following is this:-
    I have a temp table whose signature is on commit delete rows.
    I insert records in this table.
    when I do select * from temp_table,perm_table I get some rows.
    then I try to create a result_table using this
    CREATE TABLE result_table
    AS SELECT * FROM temp_table,perm_table;
    I see the table in created but number of records in 0. Can anyone please explain where commit takes place while sequence in this query occurs.
    Thanks
    Edited by: user10696492 on Nov 10, 2009 8:47 AM

    Create table statement is a ddl - so an implicit commit is performed before the create statement begins. The implicit commit will delete all the rows from the temp table. If it is feasible change the definition of the temp table to on commit preserve rows.

  • Create table statement in stored procedures

    Hi,
    I am including the following statement in a stored procedure and receive the following error:
    STATEMENT:
    create table wrk_date (date date,
    qty smallint)
    tablespace temptabs;
    ERROR:
    PLS-00103: Encountered the symbol "CREATE" when expecting one of the following:
    begin declare exit for goto if loop mod null pragma raise
    return select update while <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> <<
    close current delete fetch lock insert open rollback
    savepoint set sql commit <a single-quoted SQL string>
    Is this statement not allowed or is there a possible syntax error above?
    I am using Oracle database version 8.0.5.
    Thanks.
    null

    Jimmy - You might want to buy the Following book from Oreilley Press Oracle Built in Pacakages it's very very good and came in handy when I has to write dynamic SQL (DBMS_SQL package).
    You might want to try www.bookpool.com which has technical books cheaper than amazon.
    Hope this helps.
    _Satish
    Oracle 8 Certified D.B.A.
    Sun Certified Sysadmin

  • Ora-907 during create table statement

    Customer is receiving an ora-907 error running this sql statement and I cannot determine where the problem is, if there is extra spaces or if it's truly missing the right parenthesis.
    SQL> set timing on
    SQL> set echo on
    SQL> set autotrace on
    SQL> @sr.sql
    SQL> create table tables_for_change_set (
    2 change_set_name varchar2(30),
    3 table_owner varchar2(30),
    4 table_name varchar2(30),
    5 column_names_0nf varchar2(4000),
    6 constraint tfcs_pk primary key (change_set_name, table_owner, table_name)
    7 )
    8 ;
    Table created.
    Elapsed: 00:00:00.13
    SQL>
    SQL>
    SQL> create table columns_for_change_set (
    2 change_set_name varchar2(30),
    3 table_owner varchar2(30),
    4 table_name varchar2(30),
    5 column_name varchar2(30),
    6 data_type varchar2(30),
    7 constraint cfcs_pk primary key (change_set_name, table_owner, table_name, column_name),
    8 constraint cfcs_tfcs_fk foreign key (change_set_name, table_owner, table_name) references tables_for_change_set (ch
    ange_set_name, table_owner, table_name)
    9 using index (create index cfcs_tfcs_fk on columns_for_change_set (change_set_name, table_owner, table_name))
    10 );
    using index (create index cfcs_tfcs_fk on columns_for_change_set (change_set_name, table_owner, table_name))
    ERROR at line 9:
    ORA-00907: missing right parenthesis
    Thanks,
    Lisa

    Welcome to the forum!
    So why did you use your second post to the forum to resurrect a thread that is over a year old?
    Hemant already provided the correct answer to the question and your reply to him that 'This contradicts the constraint documentation' doesn't specify what you mean by "this" but is wrong on any account.
    You certainly can't be referring to Hemant's statement
    >
    The syntax "constraint cfcs_tfcs_fk foreign key ...", using the key words "foreign key" is for an out-of-line constraint definition.
    >
    Since the diagram clearly shows his statement is correct.
    And you can't be referring to his statement
    >
    Furthermore, the "using index" clause is for Primary Key constraint , not for a Foreign Key. You should manually create the index separately.
    >
    Since the documentation states exactly what Hemant said.
    See 'Using Indexes to Enforce Constraints' in the SQL Language doc
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/clauses002.htm
    >
    Restrictions on the using_index_clause The following restrictions apply to the using_index_clause:
    You cannot specify this clause for a view constraint.
    You cannot specify this clause for a NOT NULL, foreign key, or check constraint.
    >
    Please check the dates in the threads before posting.

  • Best way to give tablename in create table statement

    hi all,
    what's the best way to give table name while "create statement" in case of performance.. 
    for eg:
    create table tablename(id int,name varchar(20))
    a.) tablename
    b.) [tablename]
    c.) (tablename)
    d.) "tablename"
    pls its urgent..
    thanks in advance..
    lucky

    >b.) [tablename]
    As Naomi pointed it out, the above is dangerous because unintentionally special characters or space can be included and accepted by SQL Server.
    Once you introduce special characters in the table name, you have to use [....] forever.
    Related QUOTENAME:
    http://technet.microsoft.com/en-us/library/ms176114.aspx
    a is the best choice.
    Kalman Toth Database & OLAP Architect
    SELECT Video Tutorials 4 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Question on Creating Table From Insert statement

    Hi,
    I want to create a table using a DBlink from another database using the create/insert statement. Will it also transfer the constraints or do I have to do it manually afterwards? Thanks.
    Create table T1
    SELECT a,b,c from T2 from DB@dblink;

    As discussed above, the constraints, indexes, triggers are not copied. Only NOT NULL constraints are copied.
    Look at this thread Re: Copying table structure.
    for copying triggers/indexes from source table to destination table.
    Thanks,
    Navaneeth

Maybe you are looking for

  • Previously Purchased Movie on iTunes No Longer Showing Up Under Purchased Items

    I purchased a movie from iTunes in November 2012 (Coldplay: Live 2012) and it wasn't showing up on my AppleTV Purchased movies section (wanting to use the iTunes Extra feature on recent AppleTV 6.2 update). I've checked other threads and it was sugge

  • Post XML over HTTPS in a loop

    HI, I have a requirement to post XMLs over HTTPS. I also am supposed to retrieve the response XML, interpret it and do some processing based on the response status in the response XML. This has to be done for each XML. Currently I am establishing a n

  • Christmas,Transfer Music,Pictures from iPod to Computer

    I want to Transfer Music,Pictures from iPod to Computer,Can you tell me how to Transfer Music,Pictures from iPod to Computer?Thanks your help!!!

  • Application does not start during the engine restart.

    Hello all, after deploying a custom developed application to the engine the application works fine. However, when the J2EE is restarted the application page is not available with the following message: Application error occurred during request proces

  • CS2- CS4 upgrade, copy print presets?

    I recently upgraded to IDCS4 from IDCS2. While this may not have been the "preferred" method, I installed CS4,then uninstalled CS2. It seems the CS2 "Print Presets" didn't make the upgrade trip. Can anyone suggest where I might locate my CS2 Print Pr