Copy the structure of a table to another with another table name.

how to copy the structure of a table to another with another table name.
ie. i want a emp table with same values/structure to be copied to another table called my_employee.
how can this be done?

create table my_emp as select * from emp;
If you do not want the data to be copied then do the following:
create table my_emp as select * from emp
where 1=2;
Avanti.

Similar Messages

  • Copy the structures in a query

    hi,
      Can we copy the structure of one query to another query ?
       If so, please let me know how to do it.
    Thanks in advance.

    Hi,
    If the queries in question are on the same Infoprovider, then you can save the structure as a global structure and use it in both the queries.
    If the queries will be on different InfoProviders, then you would need to copy at the query level using RSZC.
    Hope this helps...

  • How to copy the Pricing conditions from one Distribution Channel to another

    Generally we use VK11 transaction to create conditional records .
    but I Need to Know whether is it Possible to copy the Pricing conditions from one Distribution Channel to another with same name and same internal Characteristics .
    Since we have around 70+ of Condition type with different parameter Sequence.So Instead of Going for BDC whether is there any standard Funct Modules/programs/BAPIs to do this?
    How to make a copy Condition types from One Distribution Channel to another.
    since SAP has already provided to copy conditions from Customer to customer.
    Likewise i need to know whether SAP is facilitating for these feature also.
    Iam Dubious in this issue.
    Hope Fully looking for the answers.
    Harish.N

    - IDOC_INPUT_COND_A (you can create IDOC, but also call directly)
    - call transaction / batch input (use transaction XK15, as used by LSMW)
    - use group of function modules RV_CONDITION_COPY, RV_CONDITION_SAVE, RV_CONDITION_RESET + commit.
    if you search SDN on 'RV_CONDITION_COPY' you'll find more info I believe.
    Someone mentioned BAPI_PRICE_CONDITIONS as well.

  • How can I copy the format of one sentence or paragraph onto another sentence or paragraph?

    When I copy and paste a section from one article to another, I want to change the format of the imported section to match the rest of the article. In Outlook or eM Client, I would use the paintbrush icon for this. How do I copy the format of a section in Thunderbird to another section?
    Many thanks.

    I'd be using Stationery to assert my preferred styles, and then use "Paste without formatting" to allow the formatting that is currently in force to be applied to pasted text, ignoring any already attached to the imported text. A weakness of Thunderbird in its native form is that it tends to forget to insert your chosen default font etc. The Stationery add-on cures this by making your requirement explicit.
    Messages sent by Thunderbird users often appear in (IMHO) ugly serif text, which is Outlook's default, because Thunderbird forgets to say you chose a sans-serif font when composing.
    Without Stationery, all your efforts at harmonizing your text may come to naught.

  • I bought a MAC for the first time and plugged my Itouch into it to download my music on it, but is says The iPod "Rick's IPOD" is synced with another iTunes library. An iPod can be synced with only one iTunes library at a time. What should I do?

    I bought a MAC for the first time and plugged my Itouch into it to download my music on it, but is says The iPod “Rick's IPOD” is synced with another iTunes library. An iPod can be synced with only one iTunes library at a time. What should I do?

    Same as you would if you bought a pc; copy everything from your old computer to your new one.  Then you can just sync everything from the new computer, as you did with the old one.

  • TS1702 I'm not able to update Smurf's Village. Tried most of the things proposed on the net including restarting the iPad and trying syncing with the computer. Had a similar issue with another application. Had to delete and reinstall it, with all history

    I'm not able to update Smurf's Village. Tried most of the things proposed on the net including restarting the iPad and trying syncing with the computer. Had a similar issue with another application. Had to delete and reinstall it, with all history lost.
    Tried following up with the developer's instruction. Didn't help. Developer suggested contacting Apple if their instruction didn't work. Tried the various methods recommended on the Apple site. Same result.

    Telling is that you tried most of the things on the net doesn't tell us exactly what you did try, so we are all still left to guess .....
    Sign out of your account, restart the iPad and then sign in again.
    Settings>Store>Apple ID. Tap your ID and sign out. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Go back to Settings>Store>Sign in and then try to update again
    If that doesnt work - go to Settings>General>Date and Time - set the date ahead by a few months. Try to update again. If you get an error message of any kind - go back and change the date and time to automatic again. Then try again.
    If that doesn't work, restart your router and reboot the iPad.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.

  • I lost my iPhone recently. It has since disappeared from support profile. Does this suggest that the phone has been restored and synced with another account?

    I lost my iPhone recently. It has since disappeared from support profile. Does this suggest that the phone has been restored and synced with another account?

    See:
    What to do if your Apple ID has been hacked
    (Fair disclosure: The Safe Mac is my site, and contains a Donate button, so I may receive compensation for providing links to The Safe Mac. Donations are not required.)

  • My iPhone 5 doesn't send any text messages or i messages and the problem isn't with the sim card as i tried it with another iPhone 5 and it worked fine.

    my iPhone 5 doesn't send any text messages or i messages and the problem isn't with the sim card as i tried it with another iPhone 5 and it worked fine.

    OK. Thanks for sharing.
    Have a nice day.

  • Needed to copy the share from one server to share in another server

    Hi ,
    Needed to copy the data from one share named as xyz in the server 1 to the another share abc in another server 2.
    Share xyz data should be copied to the share abc which has already different data in it .We need to copy all the data from the share xyz to the share abc  without deleting any existing data in the destination share.
    I know that /MIR option will replace the destination same as source
    Can anybody help us in the Robocopy command & switches for this activity?
    Any help is greatly appreciated!
    Thanks & Regards S.Swaminathan Live & let others live!!!

    Hi Mandy,
    Thanks for your reply.
    I have done many robocopy for the share movements from the one server joined in a domain to another server joined in the same domain.In that instances, the destination server will not be having any share of the old server name and just I robocopy the share
    from the old server to the new server after creating a new share .The usual command is as follows:
    "\\server1\oldshare" \\server2\newshare" *.* *.* *.* /ZB /E /COPY:DATO /XJ /R:0 /W:0 /TEE /dcopy:T /NP /log:c:\robocopy.txt
    And after the copy , during the cutover of the standalone DFS pointing to the new share , the domain users in the corresponding access groups (name of the groups based on the old server name) of Full,Modify,Read will be appropriately copied to the respective
    new  groups (name of the groups based on the new server name) of the new share and the access is ensured by the users.
    But in this case , the destination server is already having a share with existing data in it and to be added with the old share data
    My question is shall I use the same command as before by copying all the data to the newly created subfolder inside the existiing destination share through the following command
    "\\server1\oldshare" \\server2\newshare\new sub-folder" *.* *.* *.* /ZB /E /COPY:DATO /XJ /R:0 /W:0 /TEE /dcopy:T /NP /log:c:\robocopy.txt
    You have already mentioned /E without purge options will do.
    Just asking one more time for the safer side
    Thanks & Regards S.Swaminathan Live & let others live!!!

  • Regarding Copying the structure

    Hi All,
    I have designed a custom cube based on standard cube. Now i have to design the queries based on that InfoCube. In the standard Cube, we have a strcuture which I want in the query designer for the custom cube. How to get that structure into that InfoCube??
    Regards
    Jay

    No, you are correct. A global structure is tied to a cube, not available for all cubes. But if you copy even one query from Cube 1 to Cube 2, even if it is not using the structure, the structure and other global elements will get copied too. Open a query for cube 2 and you will find then with _1 added on the left hand side.
    Hope this helps...

  • How to perform this?by copying the IE URL of successfully logged in to another IE Browser and the user still logs in which is wrong.

      I have a problem. the user had successfully logged in in an IE Browser. Then I copy the URL of the IE
      to another IE Browser. The output must be, the browser will ask the user to log in again which is correct.
      In my application, the output was still logged in which is wrong.
      Kindly help

    I have the Application.cfm
    I dont use parameter such as CFID and CFTOKEN for my code.
    Is it possible to do it without using this parameter?
    Can
    you give me simple code that if it is successfully logged in, then it
    will perfom that the browser will ask you to log in again.
    Thank you for the reply and knowledge.
    jepoy1

  • Copying the negative value from 1 base entity to another base entity

    I am trying to copy the negative value from 1 entity to another base entity in rules.
    I am not sure if this can be done
    Example Paris has netinc of 100 dollars I want the other entity ParisNeg to receive the negative value or netinc -100
         If pov_scenario = "Actual" then
              'If pov_entity = "ParisNeg" Then
              If pov_year > "2012" Then
                   If pov_Value = "<Entity Currency>" or pov_Value = "<Entity Curr Adjs>" Then
                        For Each Acc In HS.Account.List("","(Base)")
         HS.EXP "E#Paris" ="E#ParisNeg"
         End If 'default_currency
         End If 'Year
         'End If 'Entity
    End If 'pov_Scenario

    This might work:
    If pov_scenario = "Actual" then
    If pov_year > "2012" Then
    If pov_Value = "<Entity Currency>" or pov_Value = "<Entity Curr Adjs>" Then
    If right(pov_entity, 3) = "Neg" Then
    HS.EXP "A#ALL = -E#" & Left(pov_entity, Len(pov_entity)-3) & ".A#ALL"
    End If 'pov_entity
    End If 'default_currency
    End If 'Year
    End If 'pov_Scenario
    *Did not test this.  You might need a member list or loop to roll through the accounts instead of all.  Another thing to consider would be changing the consolidation percent to -100% or something.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to copy the structure of a Field Symbol?

    Hi,
              I have a requirement where in a dynamic Internal table is supposed to be created. I have created that dynamic table using the class method cl_alv_table_create=>create_dynamic_table. Here I have a structure in the field symbol. My requirement is how do I create a internal table with the structure that is there in the field symbol?...
    and i'm unable to refer to the field that is dynamically created in the field symbol.
    Like,
    <gfs_tab>-pernr = itab-pernr.
    in the above stmt the field pernr is created in the field symbol dynamically.
    Thanks,
    Deepak.

    Hi Matt,
                my objective is to create an internal table with structure that i have obtained in <gfs_tab> .
    other than the pernr, there are many fields dynamically generated.
    say if I have generated the following structure in <gfs_tab> :
    pernr            ename1            day1             day2                 day3
    then I want to create an internal table with the above structure so that my internal table will have fields:
    1) pernr
    2) ename1
    3) day1
    4) day2
    5) day3
    for each execution of the report there will be different structure generated in <gfs_tab> depending upon the inputs that I give.
    Thanks,
    Deepak.

  • What is the best approach to handle multiple FK with single table.

    If two tables are joined with each other with more than one ways, for example
    MAIN table is (col1, col2,....coln, person_creator_id, person_modifier_id)
    PERSON table is (person_id, name, address,........ phone) etc
    At database level PERSON_CREATOR_FK and PERSON_MODIFIER_FK are defined.
    Objective is to create a report that shows
    col1, col2...coln, person creator name, person modifier name
    If above two objects are imported with FKs in a EUL and discoverer plus is used to create above report. On first inclusion of person name discoverer plus will ask you to pick the join (provided the checkbox to disable this feature is not checked). Once you pick 'person creator' join it will never allow you to pick person modifier name.
    One solution is two create a custom folder with query like
    select col1, col2,...coln,
    pc.name, pc.address,.... pc.phone
    pm.name, pm.address,.... pm.phone
    from main m,
    person pc,
    person pm
    where m.person_id_creator = pc.person_id
    and m.person_id_modifier = pm.person_id
    Second solution is to import the PERSON folder twice in EUL (optionally named one as perosn_creator and other as person_modifier) and manually define one join per table. i.e. join MAIN with PERSON_CREATOR on person_creator_fk and join MAIN with PERSON_MODIFIER table using person_modifier_fk.
    Now discoverer plus will let you drag Name from each person folder without needing to resolve multiple joins.
    Question is, what approach is better OR is there a better way?
    With solution 1 you will not be able to use functions on folder items.
    With solution 2 there is a EUL design overhead of including same object multiple times and then manually defining all join (or deleting unwanted joins), and this could be a problem when you have person_modifier and person_creator in nearly all tables. It could be more complicated if person table is further linked other tables and users want to see that information too. (for instance, if person address is stored in LOCATION table joined with location_id and user want to see both creator address and modifier address....now you will have to create multiple LOCATION folders).
    A third solution could be to register a function in discoverer that return person name when person_id is passed. This will work perfectly for above requirement but a down side is the report will run slower if they need filters on person names (then function will be used in where clause). Also, this solution is very specific to above scenario, it will not work if you want the report developer the freedom to pick any attribute from person table (lets say, person table contain 50 attributes then its not a good idea to register 50 functions).
    Any comments/suggestion will be appreciated.
    thanks

    Hi
    In a roundabout way you have really answered your own question :-)
    In my opinion, the best approach, although by all means not the only approach - see below) would be to have the object loaded as two folders with one join going to the first folder and the second join to the other folder. You would of course name the folders appropriately.
    Here's a workflow that I use all of the time and one that I teach when I'm giving Discoverer Administrator training. It might help you:
    1. Bring in the PERSON folder to begin with
    2. Make all necessary adjustments to bring it up to deployment standard. These adjustments would be: folder name (E.g PERSON_CREATOR), item names, item placement, default positions, default aggregation and so on.
    3. Create or assign the required lists of values
    4. Create any required calculations
    5. Create any required conditions
    6. Create the first join from this folder to MAIN.
    7. Click on the heading for the folder and press CTRL-C.
    8. Click on the heading for the business area and press CTRL-V. A second copy of the folder, complete with all of the adjustments you made earlier will be inserted into the business area.
    Note: joins are not copied, everything else is.
    9. Rename this folder to say PERSON_MODIFIED
    10. Rename the items as appropriate
    11. Add a join from this folder to MAIN - you're done
    Other ideas that I have used and work well would be to use a database view or create a complex folder. Either will work, In both cases you would need to join on some other column other than the ones you referred earlier.
    I hope this helps
    Best wishes
    Michael

  • Getting list of items from one table indirectly associated with another

    I have a database containing 3 tables. One is a list of employees, one is a list of companies that are clients and another is the projects each employee is working on. The projects table is the only connection between the employee and the company. An employee is working on a project for a specific company. I need to find a list of companies someone is working for given the employee's ID. How would I do this? I've done direct queries before, but never anything that involves going through another table. I have an explanation of my tables below.
    Employee ------------- Project ----------- Company
    Name ------------------ Name --------------- Name
    ID -------------------> EmployeeID
    ------------------------ CompanyID ----------> ID

    I did something like this..It works for MS Access 2000 but not SQL Server 2000. (http://forum.java.sun.com/thread.jsp?forum=48&thread=270102)
    What I have is one main table, joined to 3 other tables, and each one of them have one category in common, and they are in a many-to-one relationship with the main table.
    The Function category in the main table is the same as the Function_Name category in the others
    For ex)
    Main Table
    Function Description Context Actions Notes
    sample blah blah blah blah
    Table 1
    Function_Name ArgName ID
    sample x 1
    sample y 2
    Table 2
    Function_Name Return_Codes ID
    sample z 1
    sample m 2
    sample n 3
    Table 3
    Function_Name Function_Called ID
    sample t 1
    What i needed to do was retrieve all these records from the different tables if I only had the value to the Name field.
    This is the code I used:
    <code>
    String dataSourceName = "<fill in your dataSourceName>";
    String dbURL = "jdbc:odbc:" + dataSourceName;
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    }catch (Exception e){System.out.println("Couldn't connect to driver.");}
    try{
    Connection con = DriverManager.getConnection(dbURL, "","");
    Statement stmt = con.createStatement();
    //gui3.staticName is the data in the Function or Function_Name Field
    ResultSet result = stmt.executeQuery("SELECT * FROM function_description WHERE (((Function)='"+ gui3.staticName + "'));");
    while(result.next()){
    function.setText(result.getString("Function"));
    description.setText(result.getString("Description"));
    notes.setText(result.getString("Notes"));
    actions.setText(result.getString("Actions"));
    context.setText(result.getString("Context"));
    ResultSet result2 = stmt.executeQuery("SELECT Return_Codes FROM return_code_description WHERE (((Function_Name)='"+ gui3.staticName + "')) ORDER BY Return_Codes ASC;");
    while(result2.next()){
    rCodes.addElement(result2.getString("Return_Codes"));
    ResultSet result3 = stmt.executeQuery("SELECT ArgName FROM Arg WHERE (((Function_Name)='"+ gui3.staticName + "')) ORDER BY ArgName ASC;");
    while(result3.next()){
    args.addElement(result3.getString("ArgName"));
    ResultSet result4 = stmt.executeQuery("SELECT Function_Called FROM Function_Called WHERE (((Function_Name) = '"+ gui3.staticName + "')) ORDER BY Function_Called ASC;");
    while (result4.next()){
    fcall.addElement(result4.getString("Function_Called"));
    }catch (SQLException e) {System.out.println(e.getMessage());}
    </code>
    So when you get the ID can't you Select the data from the products table that matches it, and then take the Name field for that and search for it in the Company table? I think you can do embedded search statements. another way would be
    Select <blah>
    while(result.next)
    Select <blah>
    hope this helps

Maybe you are looking for

  • Flickering Problem in external Facing Portal

    Hey     we had some problems developing our external facing portal mainly because of general flickering of the web page ( the page height is set to automatic and it causes the borders to adjust constantly to the current content height).   we have a p

  • How to create bulk user ids in the FIM 2010 using powershell

    i have the below powershell script but which will create only one user at time in the FIM. Can somebody help me with powershell scripit which will help us to create a bulk users .  set-variable -name URI -value "http://localhost:5725/resourcemanageme

  • Non Cumulative Key Figures Simple

    Please Help me with this. I have the measurement Amount "0meas_value" non cumulative key figure and aggregation properties Sum and Last value and other key figure is 0meas_chg cUMULATIVE KEY FIGURE. aggregation properties Sum and summation. Now my qu

  • Cant add music on my computer to iphone six

    Having a difficult time adding music to my Iphone 6

  • Wireless printer is offline and I can't get it back online

    I have a HP Envy 700-414 Desktop PC operating with Windows 8.1 (64-bit) system that was connected wirelessly to a HP Officejet Pro 8600 Plus printer.  It worked fine for the first couple of days.  Now it says that my printer is offline.  I've tried s