Transfer data from a table to another table

Hello
I want to transfer data from a table in one server to another table in a different server, I want to do this on a nightly job, what will be the best way, please advise, thank you.

Multiple options
1. Create linked server  and use INSERT..SELECT * FROM [Server].[DB].dbo.Table
2. Use OPENROWSET
http://searchsqlserver.techtarget.com/tip/Using-the-OPENROWSET-function-in-SQL-Server
3. Use export import wizard
http://www.leniel.net/2011/07/import-export-data-sql-server-database.html#sthash.l4fgNNdV.dpbs
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Similar Messages

  • Transfer data from one database to another without identities but keep the relation b/w PK and Foreign key

    Hi,
    I need to transfer data from one database to another database (both are identical databases). 
    1. Not transferring identity columns (primary keys). the destination table might have the same key.
    2. keep the PK's and FK's relation b/w parent and child table
    3. I have 4 levels 
    Example: tableA (col1 int identity(1,1) , col2, col3)
    tableB (col1 int identity(1,1) ,
    col2 , col3) -- col2 has the foreign key relation with tableA.col1
    tableC (col1 int identity(1,1) ,
    col2, col3) -- col2  has the foreign key relation with tableB.col1
    tableD (col1 int identity(1,1) , col2, col3) -- col2  has the foreign key relation with tableC.col1
    please advise me.
    Thanks in advance

    Try the below:
    /********************************SAMPLE TARGET***************************************************************/
    Use MSDNSamples
    create table TableA(LevelValueId int identity(1,1) primary key, name varchar(100))
    Insert into TableA(name) Select 'R1'
    Insert into TableA(name) Select 'R2'
    create Table TableB(ChildId int identity(100,1),name varchar(100), LevelValueID int references TableA(LevelValueId))
    Insert into TableB(name,LevelValueID) Select 'Childname1',1
    /********************************SAMPLE TARGET***************************************************************/
    /********************************SAMPLE SOURCE***************************************************************/
    Use Sample
    create table TableA(LevelValueId int identity(1,1) primary key, name varchar(100))
    Insert into TableA(name) Select 'C1'
    Insert into TableA(name) Select 'C2'
    create Table TableB(ChildId int identity(100,1),name varchar(100), LevelValueID int references TableA(LevelValueId))
    Insert into TableB(name,LevelValueID) Select 'Kidname1',1
    /********************************SAMPLE SOURCE***************************************************************/
    USe MSDNSamples
    /********************************MIGRATION INTERMEDIATE TABLE***************************************************************/
    --Migration table
    Create table Mg_TableA(LevelValueId int, NewValueId int)
    /********************************MIGRATION INTERMEDIATE TABLE***************************************************************/
    /********************************ACTUAL MIGRATION FOR MASTER TABLE***************************************************************/
    MERGE INTO TableA
    USING sample.dbo.TableA AS tv
    ON 1 = 0
    WHEN NOT MATCHED THEN
    INSERT(name) Values(tv.name)
    Output tv.levelValueId ,inserted.LevelValueid INTO
    Mg_TableA;
    /********************************ACTUAL MIGRATION FOR MASTER TABLE***************************************************************/
    /********************************ACTUAL MIGRATION FOR CHILD TABLE***************************************************************/
    Insert into TableB (name,LevelValueID)
    Select A.name,B.NewValueId From sample.dbo.TableB A
    Inner join Mg_TableA B on A.LevelValueID = B.LevelValueId
    /********************************ACTUAL MIGRATION FOR CHILD TABLE***************************************************************/
    /********************************TEST THE VALUES***************************************************************/
    Select * From TableA
    Select * From Mg_TableA
    Select * From TableB
    /********************************TEST THE VALUES***************************************************************/
    Drop table TableB,Tablea,Mg_TableA
    Use Sample
    Drop Table TableB,Tablea

  • How can you transfer data from one ipod to another ?

    How can you transfer data from one ipod to another ipod ?

    The geniusbar told me what to do, I understood but there is still a problem for me >:/ It's not showing up though. Like "device."  Nothing is happening, and I tried as soon as I got home. Then after half an hour, then an hour, then 3 hours. My problem is that it's not showing up! It's stuck in recovery mode! There's still like 25% battery. So I have no idea why.

  • How do I transfer data from one iPhone to another?

    How do I transfer data from one iPhone to another?

    If your old device is an Apple using iOS 5 or later, and you have an iCloud account, you can transfer all your saved messages, email accounts, photos, notes, and other personal settings to your new iPhone.
    Here's how...
    Connect your old Apple device to WiFi and to a power source.
    Back it up to iCloud by going to Settings > iCloud > Storage & Backup and toggling iCloud Backup on. The time it takes to ba ckup depends on how much data you have and on the speed of your internet connection.
    iCloud backs up your device once a day. If it needs backing up before you transfer to your new iPhone 5, tap Back Up Now in Settings > iCloud > Storage & Backup. Do not start transferring before the backup is finished.
    Turn on your new iPhone and complete the setup by selecting your language and country, and choose whether to enable Location Services. When prompted, choose your WiFi network.
    When prompted to set up, choose Restore from iCloud Backup, tap Next, and enter your Apple ID and password.
    Select the backup of your old device and tap Restore. Wait until the device has finished restoring from the backup.
    When the restore process is complete, your iPhone will restart and be ready to use.
    Connect your iPhone 5 to iTunes to sync data not contained in the backup (such as music, videos, apps, and so on). You can choose the data that are synced by clicking the syncing tabs in iTunes.

  • How to transfer data from one macbookpro to another

    how to you transfer data from one macbookpro to another. the other one was stolen.

    If your computer was stolen and you don't have a data backup, you can't transfer data from the stolen computer to your new one. If you have a data backup, restore the data to the new computer.

  • How to transfer DATA from one machine to another using  DBlink

    I want to transfer data from one machine to another both having oracle 8.0.5 with AIX operating system using DB link. CAn any one help me in this task

    Step one - Create and test SQLNet connections between the databases.
    Step two - Create at least on database like from one database to the other:
    CREATE DATABASE LINK linkname
    CONNECT TO user identified by password
    USING 'tnsnamesentry';
    Step three - use the dblink linkname in dml statements eg:
    insert into emp@linkname
    (select * from emp);

  • How  to transfer data from one system to another by datamart please give de

    how  to transfer data from one system to another by datamart please give details

    Hi Deba,
    Find the below SAP help doc which may help u...
    http://help.sap.com/saphelp_nw70/helpdata/en/12/43074208ae2a38e10000000a1550b0/frameset.htm
    Also find the below threads...
    Loading data from one cube to another cube.
    data copy from infocube to infocube in two different BW systems
    Delta when loading from ODS to ODS
    reg datamart
    Data mart flag
    Regards,
    KK.

  • Different ways to Transfer data from one database to another database

    Hi all,
    What are the ways to transfer data from one database to another database. With the following options, i Can transfer data as far as i know. Please
    correct me if i am wrong or tell me if there is any other options are available.
    1) Create database link/connection string and using this string and COPY command, we can transfer data.
    2) By using Export and Import utilities.
    I told first one to my interviewer, he told, its strange, by using, COPY command also can we transfer data ? As far as i know, we can transfer data. Am i right ?
    Thanks in advance,
    Pal

    transfer data from one database to another database.You mean store the data of one to another?
    1) Create database link/connection string and using this string and COPY command, we can transfer data.every SELECT on a DB-link is transfering data. And you can have all kind of transfers and store on the e.g CTAS of materialized views or.... the SQL*PLUS COPY :
    The COPY command is not being enhanced to handle datatypes or features introduced with, or after Oracle8i. The COPY command is likely to be made obsolete in a future release.
    But there are many others. Check for ORACLE Streams, and the "COPY" your interviewer was mentioning is about the operating file system COPY right? That's transportable tablespaces.
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17120/tspaces013.htm#ADMIN11403
    -- andy

  • Can I use flash drives to transfer data from one MBP to another at a differ

    I've looked and cannot find any info on the use of flash drives. Can I use a flash drive to transfer data from one MBP to another one at a different location? (ie; school Apple and home MBP) Grade tests and papers at home, enter data into home computer, then put it on flash drive and carry flash drive to school, transferring data to school desk top? Are certain flash drives preferrable over others, name brands, size, etc?

    Yep, you sure can. Just about any drive will work as mentioned above. But I'm partial to SanDisk and PNY. I've used both and they work great! Currently I carry both a 2GB SanDisk Micro Cruzer and a retractable 2GB SanDisk Cruzer, both really nice. Replaced my oldie but goodie 256MB PNY drive that I've been using since they first came out.

  • Transfer data from MS Excel to Oracle table

    Hello,
    hope someone can help: What is the easiest way to transfer data from Excel sheet to a Oracle table and how ?
    An example of a row to transfer is given below
    Date Time Value 1 Value 2
    2004-02-02     03:47:39     9,62     3,62     
    Thanks in advance
    Regards
    Roar

    From Microsoft access , import data from Excel to an Access table.
    Format that Access Table properly in Design mode.
    Create a table as per your specification in oracle Database.
    Then export to oracle from access using approppriate ODBC driver.
    --Sayan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to transfer data from excel files into z-tables

    Please help me with a code which transfers data from excel file to z-table.
    Thanks in advance
    Shuvir

    Hi Daniel,
    Export Data
    Purpose
    Use this procedure to export SAP data to a local file such as Microsoft Excel.
    Menu Path
    Use the following menu path to begin this process:
    ·         SystemèListèSaveèLocal File
    Helpful Hints
    When reviewing fields, R = Required,  O = Optional and C = Conditional.
    Procedure
    1.       Start the transaction using the menu path or transaction code.
          Whatever Data You Want to Export
    2.       Select SystemèListèSaveèLocal File.  This works well for any data in SAP.  This is the only option for the top-level (first page) of a report. 
    In a drill-down view within a report the Local File button  on the toolbar may be used and has the same options.
          Choose File Format
    3.       Click  .
    4.       Click  to continue.  If prompted for a format after choosing Spreadsheet, select Excel Table to get an Excel file that can be modified more easily.
          Choose File Save Location Step 1
    5.       Click  to the right of the Directory field to choose a different location.
          Choose File Save Location Step 2
    6.       Click  or browse your computer to locate the directory where you want to save your file.
    7.       Complete the following field:
    ·         File name:
        You must add the proper file extension to the name of your file (.xls for Excel, .rtf for Rich Text, .html for HTML).  The file extension tells your computer what program to open the file with.  If you do not have the file extension at the end, you may not be able to open it.
    8.       Click  to continue.
          Generate File in Location and Format Selected
    9.       Click  to create the file in the location and format selected.  In this example the file was named "example.xls" and saved on the desktop.
    Result
    You have completed the export process.
    thanks
    karthik

  • Transfer data from one server to another server using idocs

    hi,crm
       i have a data in crm system, i want to download this data and upload into another crm system by using idocs.
      please any one explain.

    Hi Ravi,
          my senario is i have to transfer  data from  crm 5.0 to 7.0.
          i have marketing attributes
        t-code: bp----> marketing attributes
       i want to transfer marketing attributes from A to B.
           i created one structure for marketing attributes around 160. and i added this structure fields into custom segments.
          i created custom idoc type and i added segments into idoc.
        i created one function module for getting data from structure and passing to segments and idoctype.
       check the code below.
    FUNCTION ZCRMXIF_MKT_DATA.
    *"*"Local Interface:
    *"  IMPORTING
    *"     REFERENCE(EV_MKT_ATTR) TYPE  ZCRMXIF_MKT_STR
    Data : c_segment type ZE101CRMXIF_MKT_ATTR_DATA,
           c_segment1 type ZE101CRMXIF_MKT_ATTR_DATA1,
           c_segment2  type ZE101CRMXIF_MKT_ATTR_DATA2,
           c_segment3 type  ZE101CRMXIF_MKT_ATTR_DATA3,
           c_segment4 type  ZE101CRMXIF_MKT_ATTR_DATA4.
    data:  c_messagetype type c value'zcrmxif_partner_save',
           c_idoc_type type c value'zcrmxif_partner_save_mkt',
           idoc_control like edidc,
           t_comm_control like edidc occurs 0 with header line,
           idoc_data like edidd occurs 0 with header line.
    data: lt_mkt_attr type Zcrmxif_mkt_str occurs 0 with header line,
           ls_mkt_attr like zcrmxif_mkt_str.
    loop at lt_mkt_attr.
                c_segment-PARTNER = lt_mkt_attr-partner.
                c_segment-PARTNER_GUID = lt_mkt_attr-partner_guid.
                  idoc_data-segnam = 'ZE101CRMXIF_MKT_ATTR_DATA' .
                  idoc_data-sdata = c_segment.
                 append idoc_data.
               c_segment1-ADHAR_NUM = lt_mkt_attr-ADHAR_NUM.
               c_segment1-ADULTS = lt_mkt_attr-ADULTS.
               c_segment1-AGEGROUP = lt_mkt_attr-AGEGROUP.
               c_segment1-AG_CODE = lt_mkt_attr-AG_CODE.
               c_segment1-AMERICANEXPRESS = lt_mkt_attr-AMERICANEXPRESS.
               c_segment1-ANNUALINCOME = lt_mkt_attr-ANNUALINCOME.
               c_segment1-AUTO_TYPE_1 = lt_mkt_attr-AUTO_TYPE_1.
               c_segment1-AUTO_TYPE_2 = lt_mkt_attr-AUTO_TYPE_2.
               c_segment1-AUTO_TYPE_3 = lt_mkt_attr-AUTO_TYPE_3.
               c_segment1-A_HOMEDEL = lt_mkt_attr-A_HOMEDEL.
               c_segment1-BANKNAME = lt_mkt_attr-BANKNAME.
               c_segment1-BLOODPRESSURE = lt_mkt_attr-BLOODPRESSURE.
               c_segment1-BPRELATION = lt_mkt_attr-BPRELATION.
               c_segment1-BRAND = lt_mkt_attr-BRAND.
               c_segment1-CC1001 = lt_mkt_attr-CC1001.
               c_segment1-CC1002 = lt_mkt_attr-CC1002.
               c_segment1-CCCLASSIC = lt_mkt_attr-CCCLASSIC.
               c_segment1-CCGOLD = lt_mkt_attr-CCGOLD.
               c_segment1-CCOTHERS = lt_mkt_attr-CCOTHERS.
               c_segment1-CCPLAT = lt_mkt_attr-CCPLAT.
               c_segment1-CCREDIT = lt_mkt_attr-CCREDIT.
               c_segment1-ccsilver = lt_mkt_attr-ccsilver.
               c_segment1-CCTITA = lt_mkt_attr-CCTITA.
               c_segment1-CDEBIT = lt_mkt_attr-CDEBIT.
               c_segment1-CHILDREN = lt_mkt_attr-CHILDREN.
               c_segment1-CITIBANK = lt_mkt_attr-CITIBANK.
               c_segment1-CNAPP = lt_mkt_attr-CNAPP.
               c_segment1-CNC_PRINT = lt_mkt_attr-CNC_PRINT.
               c_segment1-CNC_SIZE = lt_mkt_attr-CNC_SIZE.
               c_segment1-CNC_SIZE_NEW = lt_mkt_attr-CNC_SIZE_NEW.
               c_segment1-CNC_STATUS = lt_mkt_attr-CNC_STATUS.
               c_segment1-CNC_TIME_ZONE = lt_mkt_attr-CNC_TIME_ZONE.
               c_segment1-CNC_TIME_ZONE_NEW = lt_mkt_attr-CNC_TIME_ZONE_NEW.
               c_segment1-CONDFIRSTZ = lt_mkt_attr-CONDFIRSTZ.
               c_segment1-COMPANY = lt_mkt_attr-COMPANY.
               c_segment1-CONDSECOND = lt_mkt_attr-CONDSECOND.
               c_segment1-CONDTHIRD = lt_mkt_attr-CONDTHIRD.
               c_segment1-CUSTOMERTYPE = lt_mkt_attr-CUSTOMERTYPE.
               c_segment1-CUST_BUSINESS_NAME = lt_mkt_attr-CUST_BUSINESS_NAME.
               c_segment1-DECL_DATE = lt_mkt_attr-DECL_DATE.
               c_segment1-DED = lt_mkt_attr-DED.
               c_segment1-DIST = lt_mkt_attr-DIST.
               c_segment1-DNC = lt_mkt_attr-DNC.
               c_segment1-DNCEMAIL = lt_mkt_attr-DNCEMAIL.
               c_segment1-DNCPHONE = lt_mkt_attr-DNCPHONE.
               c_segment1-DNCPOST = lt_mkt_attr-DNCPOST.
               c_segment1-DOB_FAM_2 = lt_mkt_attr-DOB_FAM_2.
               c_segment1-DOB_FAM_3 = lt_mkt_attr-DOB_FAM_3.
               c_segment1-DOB_FAM_4 = lt_mkt_attr-DOB_FAM_4.
               c_segment1-PLANG = lt_mkt_attr-PLANG.
    *           c_segment1-APPL_SNAME = lt_mkt_attr-APPL_SNAME.
                 idoc_data-segnam =  'ZE101CRMXIF_MKT_ATTR_DATA1'.
                idoc_data-sdata = c_segment4.
                 append idoc_data.
                c_segment2-DTPCARDGIVCOU = lt_mkt_attr-DTPCARDGIVCOU.
                c_segment2-DTPCARDOFF = lt_mkt_attr-DTPCARDOFF.
                c_segment2-DTPCARDOTHSTORE = lt_mkt_attr-DTPCARDOTHSTORE.
                c_segment2-DTPCARDRETCOU = lt_mkt_attr-DTPCARDRETCOU.
                c_segment2-DTPCARDSHREDDED = lt_mkt_attr-DTPCARDSHREDDED.
                c_segment2-DTWELCOMCALL = lt_mkt_attr-DTWELCOMCALL.
                c_segment2-DUDZ = lt_mkt_attr-DUDZ.
                c_segment2-EDUDR = lt_mkt_attr-EDUDR.
                c_segment2-DTPCARDSTORE = lt_mkt_attr-DTPCARDSTORE.
                c_segment2-EDUER = lt_mkt_attr-EDUER.
                c_segment2-EDUG = lt_mkt_attr-EDUG.
                c_segment2-EDUHS = lt_mkt_attr-EDUHS.
                c_segment2-EDULAW = lt_mkt_attr-EDULAW.
                c_segment2-FOURWHEELER = lt_mkt_attr-FOURWHEELER.
                c_segment2-FULL_NAME = lt_mkt_attr-FULL_NAME.
                c_segment2-FWLT15KCC = lt_mkt_attr-FWLT15KCC.
                c_segment2-FAMILY_MEMBER_NAME = lt_mkt_attr-FAMILY_MEMBER_NAME.
                c_segment2-FAMILYMEMBERS = lt_mkt_attr-FAMILYMEMBERS.
                c_segment2-FAMILY_MEMBER_NAME_2 = lt_mkt_attr-FAMILY_MEMBER_NAME_2.
                c_segment2-FAMILY_MEMBER_NAME_3 = lt_mkt_attr-FAMILY_MEMBER_NAME_3.
                c_segment2-FAMILY_MEMBER_NAME_4 = lt_mkt_attr-FAMILY_MEMBER_NAME_4.
                c_segment2-FAMILY_MEMBER_NAME_5 = lt_mkt_attr-FAMILY_MEMBER_NAME_5.
                c_segment2-FWLT1KCC = lt_mkt_attr-FWLT1KCC.
                c_segment2-FWLT2KCC = lt_mkt_attr-FWLT2KCC.
                c_segment2-GEO_WING_LAT = lt_mkt_attr-GEO_WING_LAT.
                c_segment2-GEO_WING_LONG = lt_mkt_attr-GEO_WING_LONG.
                c_segment2-HDFCBANK = lt_mkt_attr-HDFCBANK.
                c_segment2-HSBC = lt_mkt_attr-HSBC.
                c_segment2-ICICIBANK = lt_mkt_attr-ICICIBANK.
                c_segment2-INCMTO = lt_mkt_attr-INCMTO.
                c_segment2-INCT2F = lt_mkt_attr-INCT2F.
                c_segment2-INCT2T = lt_mkt_attr-INCT2T.
                c_segment2-IND_SECTOR = lt_mkt_attr-IND_SECTOR.
                c_segment2-INTERNETCHATTING = lt_mkt_attr-INTERNETCHATTING.
                c_segment2-LICENSE_INFO = lt_mkt_attr-LICENSE_INFO.
                c_segment2-INTERNET_CONNECT = lt_mkt_attr-INTERNET_CONNECT.
                c_segment2-MFAM_INCOME = lt_mkt_attr-MFAM_INCOME.
                c_segment2-MODEL_1 = lt_mkt_attr-MODEL_1.
                c_segment2-MODEL_2 = lt_mkt_attr-MODEL_2.
                c_segment2-MODEL_3 = lt_mkt_attr-MODEL_3.
                c_segment2-MOTHERS_NAME = lt_mkt_attr-MOTHERS_NAME.
                c_segment2-MO_OF_P = lt_mkt_attr-MO_OF_P.
                c_segment2-MO_OF_P2 = lt_mkt_attr-MO_OF_P2.
                c_segment2-MO_OF_P3 = lt_mkt_attr-MO_OF_P3.
                c_segment2-MY_OF_P3 = lt_mkt_attr-MY_OF_P3.
                c_segment2-NOMINEES_NAME = lt_mkt_attr-NOMINEES_NAME.
                c_segment2-NONE = lt_mkt_attr-NONE.
                c_segment2-OCCU_OD_OTHR = lt_mkt_attr-OCCU_OD_OTHR.
                c_segment2-OCC_FAM_1 = lt_mkt_attr-OCC_FAM_1.
                c_segment2-OCC_FAM_2 = lt_mkt_attr-OCC_FAM_2.
                c_segment2-OCC_FAM_3 = lt_mkt_attr-OCC_FAM_3.
                c_segment2-OCC_FAM_4 = lt_mkt_attr-OCC_FAM_4.
                c_segment2-OCC_FAM_5 = lt_mkt_attr-OCC_FAM_5.
                c_segment2-OCC_NOM = lt_mkt_attr-OCC_NOM.
               idoc_data-segnam = 'ZE101CRMXIF_MKT_ATTR_DATA2'.
               idoc_data-sdata = c_segment4.
               append idoc_data.
               C_segment3-PLANG_OTHR = lt_mkt_attr-PLANG_OTHR.
               C_segment3-REF_MAILADD = lt_mkt_attr-REF_MAILADD.
               C_segment3-RELATION_FAM_1 = lt_mkt_attr-RELATION_FAM_1.
               C_segment3-RELATION_FAM_2 = lt_mkt_attr-RELATION_FAM_2.
               C_segment3-RELATION_FAM_3 = lt_mkt_attr-RELATION_FAM_3.
               C_segment3-RELATION_FAM_4 = lt_mkt_attr-RELATION_FAM_4.
               C_segment3-RELATION_FAM_5 = lt_mkt_attr-RELATION_FAM_5.
               C_segment3-REL_ACTIVE_STAT = lt_mkt_attr-REL_ACTIVE_STAT.
               C_segment3-REL_KISAN_MITRA_STAT = lt_mkt_attr-REL_KISAN_MITRA_STAT.
               C_segment3-REL_NOM = lt_mkt_attr-REL_NOM.
               C_segment3-REL_PLASTIC_CARD_STAT = lt_mkt_attr-REL_PLASTIC_CARD_STAT.
               C_segment3-REL_STAFF_STAT = lt_mkt_attr-REL_STAFF_STAT.
               C_segment3-REMARKS = lt_mkt_attr-REMARKS.
               C_segment3-ROCN = lt_mkt_attr-ROCN.
               C_segment3-ROCN_FAM_1 = lt_mkt_attr-ROCN_FAM_1.
               C_segment3-ROCN_FAM_2 = lt_mkt_attr-ROCN_FAM_2.
               C_segment3-ROCN_FAM_3 = lt_mkt_attr-ROCN_FAM_3.
               C_segment3-ROCN_FAM_4 = lt_mkt_attr-ROCN_FAM_4.
               C_segment3-ROOMS_PER_FLAT = lt_mkt_attr-ROOMS_PER_FLAT.
               C_segment3-SCH_NUM = lt_mkt_attr-SCH_NUM .
               C_segment3-SECONDARYEMAIL = lt_mkt_attr-SECONDARYEMAIL.
               C_segment3-SERIAL_NUM = lt_mkt_attr-SERIAL_NUM.
               C_segment3-SOCIETY_MEMBER = lt_mkt_attr-SOCIETY_MEMBER.
               C_segment3-SOC_CONTNO_LL = lt_mkt_attr-SOC_CONTNO_LL.
               C_segment3-SOC_CONTNO_MOB = lt_mkt_attr-SOC_CONTNO_MOB.
               C_segment3-SOC_CONT_DESIG = lt_mkt_attr-SOC_CONT_DESIG.
               C_segment3-SOC_CONT_PER_NAM = lt_mkt_attr-SOC_CONT_PER_NAM.
               C_segment3-STANCHART = lt_mkt_attr-STANCHART.
               C_segment3-ST_CODE = lt_mkt_attr-ST_CODE.
               C_segment3-ST_CODE_OLD = lt_mkt_attr-ST_CODE_OLD.
               C_segment3-ST_EMP_CODE = lt_mkt_attr-ST_EMP_CODE.
               C_segment3-TEENAGERS = lt_mkt_attr-TEENAGERS.
               C_segment3-SBI = lt_mkt_attr-SBI.
               C_segment3-ZLAT1 = lt_mkt_attr-ZLAT1.
               C_segment3-ZLONG1 = lt_mkt_attr-ZLONG1.
               C_segment3-ZWING_GEOCODE = lt_mkt_attr-ZWING_GEOCODE.
               C_segment3-ZNAMEPLATE_PHOTO = lt_mkt_attr-ZNAMEPLATE_PHOTO.
               C_segment3-ZLATITUDE = lt_mkt_attr-ZLATITUDE.
               C_segment3-ZLONGITUDE = lt_mkt_attr-ZLONGITUDE.
               C_segment3-ZLATITUDE_N_LONGITUDE = lt_mkt_attr-ZLATITUDE_N_LONGITUDE.
               C_segment3-ZWING_PHOTO = lt_mkt_attr-ZWING_PHOTO.
               C_segment3-ZCATEGORY_SHOPS = lt_mkt_attr-ZCATEGORY_SHOPS.
               C_segment3-ZNUM_OF_SHOPS = lt_mkt_attr-ZNUM_OF_SHOPS.
               C_segment3-ZELECT_SURVILL = lt_mkt_attr-ZELECT_SURVILL.
               C_segment3-ZBUILDING_TYPE = lt_mkt_attr-ZBUILDING_TYPE.
               C_segment3-ZFLATS_PER_FLOOR = lt_mkt_attr-ZFLATS_PER_FLOOR.
               C_segment3-ZBULDNG_FLOOR = lt_mkt_attr-ZBULDNG_FLOOR.
               C_segment3-ZSWIMMING_POOL = lt_mkt_attr-ZSWIMMING_POOL.
               C_segment3-ZGYM = lt_mkt_attr-ZGYM.
               idoc_data-segnam = 'ZE101CRMXIF_MKT_ATTR_DATA3'.
               idoc_data-sdata = c_segment4.
               append idoc_data.
              c_segment4-others = lt_mkt_attr-others.
              c_segment4-OCCU_OD = lt_mkt_attr-OCCU_OD.
              c_segment4-ZFLAT_TYPE = lt_mkt_attr-ZFLAT_TYPE.
              idoc_data-segnam = 'ZE101CRMXIF_MKT_ATTR_DATA4'.
               idoc_data-sdata = c_segment4.
               append idoc_data.
            ENDLOOP.
            IDOC_CONTROL-MESTYP = c_messagetype.
            IDOC_CONTROL-DOCTYP = c_idoc_type.
              CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
                EXPORTING
                  MASTER_IDOC_CONTROL                  = IDOC_CONTROL
    *             OBJ_TYPE                             = ''
    *             CHNUM                                = ''
                TABLES
                  COMMUNICATION_IDOC_CONTROL           = t_comm_control
                  MASTER_IDOC_DATA                     = IDOC_DATA
    *           EXCEPTIONS
    *             ERROR_IN_IDOC_CONTROL                = 1
    *             ERROR_WRITING_IDOC_STATUS            = 2
    *             ERROR_IN_IDOC_DATA                   = 3
    *             SENDING_LOGICAL_SYSTEM_UNKNOWN       = 4
    *             OTHERS                               = 5
              IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
              ENDIF.
    ENDFUNCTION.
    i implement a badi "CRMXIF_PARTNER_MAP"
    data ls_mkt_attr type zcrmxif_mkt_str.
      LOOP AT cs_data_mapped INTO  ls_data_mapped .
        lv_tabix = sy-tabix.
        loop at ls_data_mapped-ZZPARTNER-ZZMKT_ATTR into ls_mkt_attr.
          read table ls_data_mapped-zzpartner-ZZMKT_ATTR into ls_mkt_attr index 1.
           if ls_mkt_attr is not initial.
                   CALL FUNCTION 'ZCRMXIF_MKT_DATA'
                     EXPORTING
                       EV_MKT_ATTR       = ls_mkt_attr
                   endif.
         endloop.
         read table ls_data_mapped-zzpartner-ZZMKT_ATTR into ls_mkt_attr index 1.
             MODIFY  cs_data_mapped FROM ls_data_mapped INDEX lv_tabix.
      endloop.
    i ddn't get data into sructure.
    please explain how to doit.

  • Is there any mechanism available to transfer data from one AQ to another AQ

    Hi All,
    Is there any way , any api's available or any other real time mechanism available to transfer/move the data from one AQ to another AQ..
    Is this possible..could someone please advise/help us regards this..
    Thanks
    sachin.

    I dont think there is a standard business content datasource to extract data from NAST table. If you are going to use this data in some other LO modules based on the requirement enhance the datasource and append fields and write code to populate the message types.
    If you are going to use this as stand alone data, then you can go ahead and create a generic datasource based on table.

  • Transfer data from one database to another

    Hello,
    We have an application which uses an Oracle 9i server database. On this server we have two databases ( one for test and one for production ).
    From time to time it's required to transfer data from production database to test database.
    The steps followed by the ones which made the transfer are:
    a) drop the user schema ( the one which contains all data)
    b) recreate the user
    c) import the data ( using import utility )
    d) compile invalid object ( what this will mean I don't know)
    It's not possible to delete only the content of the tables and then import data from a dump file? In this way the steps c) and d) will no longer be required. If this is possible can you tell me if is there a command which will delete all data from all table ( almost 2000 tables)?
    Thank you fro your help!

    I think ..following a,b,c,d is the best way to maintain consistency. you are just thinking about the data in the tables, but what about the changes in views,procedures,functions etc....
    compile invalid object ( what this will mean I don't know)create a file xxx.sql with following code and execute it from sql*plus
    set echo off
    set head off
    set feedback off
    set timing off
    spool compile_invalid_obj.sql
    select 'ALTER '||DECODE(OBJECT_TYPE,'PACKAGE BODY','PACKAGE',OBJECT_TYPE)||' '||OBJECT_NAME||' '||DECODE(OBJECT_TYPE,'PACKAGE','COMPILE PACKAGE;','PACKAGE BODY','COMPILE PACKAGE;','COMPILE;')
    from user_objects
    where status = 'INVALID';
    spool off
    set feedback on
    set echo on
    set timing on
    @compile_invalid_obj.sql
    HTH
    --Chaitanya                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Transfer data from one DATASET to another DATASET

    Hi,
      Is there a way to transfer the data from one DATASET to another DATASET?
      I tried the following
      OPEN DATASET  DS1 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT .
      OPEN DATASET  DS2 FOR INPUT IN TEXT MODE ENCODING DEFAULT .
      TRANSFER DS2 to DS1.
      CLOSE DATASET DS1.
      CLOSE DATASET DS2.
      But it does not work.
      Thanks in advance.

    Hi Jason,
    This logic transfers data from one dataset to another....Kindly check..
    DATA fname(60) VALUE 'myfile'.
    DATA fname2(60) VALUE 'myfile1'.
    TYPES: BEGIN OF line,
             col1 TYPE i,
             col2 TYPE i,
           END OF line.
    TYPES  itab TYPE line OCCURS 10.
    DATA: lin TYPE line,
          tab TYPE itab.
    DO 5 TIMES.
      lin-col1 = sy-index.
      lin-col2 = sy-index ** 2.
      APPEND lin TO tab.
    ENDDO.
    "writing data to file fname.
    OPEN DATASET fname FOR OUTPUT IN BINARY MODE.
    LOOP AT tab INTO lin.
      TRANSFER lin TO fname.
    ENDLOOP.
    CLOSE DATASET fname.
    "reading data from fname and writing to fname1.
    OPEN DATASET fname2 FOR OUTPUT IN BINARY MODE.
    OPEN DATASET fname FOR INPUT IN BINARY MODE.
    DO.
      READ DATASET fname INTO lin.
      IF sy-subrc <> 0.
        EXIT.
      ELSE.
        TRANSFER lin TO fname2.
      ENDIF.
    ENDDO.
    CLOSE DATASET fname.
    CLOSE DATASET fname2.
    "displaying data from fname2.
    OPEN DATASET fname2 FOR INPUT IN BINARY MODE.
    CLEAR lin.
    DO.
      READ DATASET fname2 INTO lin.
      IF sy-subrc NE 0.
        EXIT.
      ENDIF.
      WRITE:/ lin-col1, lin-col2.
    ENDDO.
    CLOSE DATASET fname2.
    Mdi.Deeba
    Edited by: Mdi.Deeba on Feb 17, 2009 8:11 AM

  • How to transfer data from one phone to another

    my daughter got a new phone.  she is trying to transfer data from her old phone.  she cant remember her icloud password.  we can't have them email because the email uses the same password.  If i delete the account all the information we are trying to transfer will be lost.  Any idea how to retrieve the password?

    You transfer data to a new phone by backing up the old one, then restoring the backup to the new one (see http://support.apple.com/kb/ht2109).
    Also, deleting the account only deletes it from the phone, not from iCloud.  But if you're running iOS 7 with Find My iPhone turned on you'll need the password in order to delte the account.
    If you need to reset the password, contact Apple for assistance by going to https://expresslane.apple.com, then click More Products and Services>Apple ID>Other Apple ID Topics>Lost or forgotten Apple ID password.

Maybe you are looking for

  • How to change the default BC image that shows in the address bar?

    Does anyone know how to change the default BC image that shows in the address bar? I want to swap it out so the client logo shows next to their URL. Thank you!

  • IPFW not showing correct ip address

    I am trying to figure out where I might be going wrong. I move my server to a new colocation facility and updated all of the ip addresses. However, when I try to run an ipfw command such as: $ sudo /sbin/ipfw add 02010 deny ip from xxx.xxx.xxx.xxx to

  • Making some rows non-editable in ALV grid

    hi I am using reuse_alv _grid _display to display the output. I want to make some of the rows non-editable based on some conditions. please help.

  • Create slideshows in edge animate

    good afternoon. i am building a website for a web design company i work for. we want to be able to showcase the websites we have built for others by having an animation on our sites website design page that rotates through screenshots of all the site

  • Serious question, what on Earth is JavaFX for?

    This is a really serious inquiry, I am not taking the Mick, but what exactly is JavaFX??? Yes, I have seen the demos on the main FX site - and got to say I am completely underwhelmed. They are not only retro, but utterly pointless! Decent Javascript