How to delete the data loaded into MySQL target table using Scripts

Hi Experts
I created a Job with a validation transformation. If the Validation was failed the data passed the validation will be loaded into Pass table and the data failed will be loaded into failed table.
My requirement was if the data was loaded into Failed database table then i have to delete the data loaded into the Passed table using Script.
But in the script i have written the code as
sql('database','delete from <tablename>');
but as it is an SQL Query execution it is rising exception for the query.
How can i delete the data loaded into MySQL Target table using scripts.
Please guide me for this error
Thanks in Advance
PrasannaKumar

Hi Dirk Venken
I got the Solution, the mistake i did was the query is not correct regarding MySQL.
sql('MySQL', 'truncate world.customer_salesfact_details')
error query
sql('MySQL', 'delete table world.customer_salesfact_details')
Thanks for your concern
PrasannaKumar

Similar Messages

  • How to update transaction data automatically into MySQL database using PI

    Dear All,
    With reference to subject matter I want a sincere advice regarding how to update transaction data automatically into MySQL database using PI. Is there any link available where I can get step-by-step process.
    Ex: I have a MYSQL database in my organization. Whenever a delivery created in SAP some fields like DO Number, DO quantity, SO/STO number should get updated in MYSQL database automatically.
    This scenario is related to updation of transactional data into MYSQL DB and I want your suggestions pertaining to same issue.
    Thanks and Regards,
    Chandra Sekhar

    Hi .
    Develop a sceanrio between SAP to Database system,When the data updates in SAP Tables read the data and update it in DATA Base using JDBC adapter,but there will be some delay in updating data in MySQL.
    serach in sdn for IDOC-TOJDBC sceannario,many documents available for the same.
    Regards,
    Raja Sekhar

  • How to delete the data from partition table

    Hi all,
    Am very new to partition concepts in oracle..
    here my question is how to delete the data from partition table.
    is the below query will work ?
    delete from table1 partition (P_2008_1212)
    we have define range partition ...
    or help me how to delete the data from partition table.
    Thanks
    Sree

    874823 wrote:
    delete from table1 partition (P_2008_1212)This approach is wrong - as Andre pointed, this is not how partition tables should be used.
    Oracle supports different structures for data and indexes. A table can be a hash table or index organised table. It can have B+tree index. It can have bitmap indexes. It can be partitioned. Etc.
    How the table implements its structure is a physical design consideration.
    Application code should only deal with the logical data structure. How that data structure is physically implemented has no bearing on application. Does your application need to know what the indexes are and the names of the indexes,in order to use a table? Obviously not. So why then does your application need to know that the table is partitioned?
    When your application code starts referring directly to physical partitions, it needs to know HOW the table is partitioned. It needs to know WHAT partitions to use. It needs to know the names of the partitions. Etc.
    And why? All this means is increased complexity in application code as this code now needs to know and understand the physical data structure. This app code is now more complex, has more moving parts, will have more bugs, and will be more complex to maintain.
    Oracle can take an app SQL and it can determine (based on the predicates of the SQL), which partitions to use and not use for executing that SQL. All done totally transparently. The app does not need to know that the table is even partitioned.
    This is a crucial concept to understand and get right.

  • How to find the data loaded from r/3 to bw

    hi
    how to find the data loaded from r/3 to bw is correct . i am not able to find which feild in the query is connected to which feild in the r/3 . where i am geting the data from r/3 . is there any process to find which feild  and table the data is comming from . plz help
    thanks in advance to u all

    Hi Veda ... the mapping between R/3 fields and BW InfoObjects should take place in Transfer Rules. Other transformation could take place in Update Rule.
    So you could proceed this way: look at InfoProvider Data Model and see if the Query does perform any calculation (even with Virtual keyfigures / chars). Than go back to Update Rules and search for other calculation / transformation. At least there are Tranfer Rule and eventually DataSource / Extraction Enhancements.
    As you can easily get there are many points where you have to look for ... it's a quite complex work but very usefull.
    Once you will have identified all mappings / transfromation see if BW data matchs R/3 (considering calculations ...)
    Good job
    GFV

  • How to automate the data load process using data load file & task Scheduler

    Hi,
    I am doing Automated Process to load the data in Hyperion Planning application with the help of data_Load.bat file & Task Scheduler.
    I have created Data_Load.bat file but rest of the process i am unable complete.
    So could you help me , how to automate the data load process using Data_load.bat file & task Scheduler or what are the rest of the file is require to achieve this.
    Thanks

    To follow up on your question are you using the maxl scripts for the dataload?
    If so I have seen and issue within the batch (ex: load_data.bat) that if you do not have the full maxl script path with a batch when running it through event task scheduler the task will work but the log and/ or error file will not be created. Meaning the batch claims it ran from the task scheduler although it didn't do what you needed it to.
    If you are using maxl use this as the batch
    "essmsh C:\data\DataLoad.mxl" Or you can also use the full path for the maxl either way works. The only reason I would think that the maxl may then not work is if you do not have the batch updated to call on all the maxl PATH changes or if you need to update your environment variables to correct the essmsh command to work in a command prompt.

  • How shall I delete the data from R/3 setup tables

    Hi Experts,
    How shall I delete the data from R/3 setup tables
    Regards
    Sailekha

    Hi Sailekha , to delete the set up table in r/3 either u can go to tcode LBWG as already mentioned or u can also delete the same from tcode SBIW
    Settings for Application-Specific DataSources (PI)  -
    Logistics -
    Managing Extract Structures -
    Initialization -
    Delete the Contents of the Setup Tables .
    Just click the clock there then u hace toi juct give the application component name like for Inventory 3 , then execute it , it will delete the set up table for inventory ..
    Regards..

  • How to transpose the data records (rows) to column(lists) using apd

    Hi,
      how to transpose the data records (rows) to column (lists) using apd  in sap bw.
    I do not want to use abap routine.only use the transpose rows to list  transformation .
    Pls provide the step by step procedure .
    thanks,
    Nimai

    Save youe file to transpose as a csv and in the header row of your file for the columns you want to transpose you need to put some soer of a tag before the column name (ie your colum header was for a period budget will be something lie 2011001:ZFIBDD)
    1. You will need to create a new apd process (rsanwb)
    2. Insert a "Read from Data File" data source object and map it file (,csv)
    3. insert a transpose object into your apd process (middle row 4th one over in the transformations section)
    4. under the definition tab in the transformation object select all the columns that are to be transposed into rows and move them to the transformed area, the grouping fields section should contain the rows that you want to now be columns
    5.under the transformation tab enter in the seperator you selected  under the Field Name/Infoobject area (ie. ZFIBDD)
    6. under the details tab  you need to enter in all the fields to be transformed and tner the transposition field (ie ZFIBDD)
    7. Then you can insert a set of transformations and a DSO and link the newly transposed fields into that.
    hope that helps

  • How to delete master data of materials from sap tables

    how to delete master data of materials from sap tables...its needed now.
    i know its not recommended but still we need to do this. give me the best possible approach.
    regards,
    suneetha

    Hi,
    I would suggest you not to write your own code to delete the entries.
    BAPI_MATERIAL_DELETE, this would mark all materials selected for deletion. But still the material would exist in SAP.
    Another solution: Delete a material manually and in another session execute the transaction SM04. This would display the tables which get locked when you do the operation, Then you can write your own code to delete the material numbers from all the related tables.
    Regards
    Subramanian

  • APD process is active, How to trigger the data from BI to CRM table

    Hi All,
    I want to send data from BI system(using APD method) to CRM table (ADS method).
    I am able to see the table for e.g ABCD in CRM system , i can open using SE11 , but data is 0.
    In BI , i have data in DSO and i have mapped it in APD process to data Target to CRM system and APD is active.
    Now i want to know how to trigger the data from BI to CRM table? (e.g ABCD).
    Please let me know the steps.
    Regards.
    Nithi.

    Hi
    Just create a Process Chain to execute this APD method, if the process Chain is already available, then just insert this Process in to the process Chain and execute the Process Chain by normal process, by hoe we do in general.
    Hope it solves...

  • How to delete the data in a table using function

    hi all,
    i need to delete the data in a table using four parameters in a function,
    the parameters are passed through shell script.
    How to write the function
    Thanks

    >
    But the only thing is that such function cannot be used in SQL.
    >
    Perhaps you weren't including the use of autonomous transactions?
    CREATE OR REPLACE FUNCTION remove_emp (employee_id NUMBER) RETURN NUMBER AS
    PRAGMA AUTONOMOUS_TRANSACTION;
    tot_emps NUMBER;
    BEGIN
    SELECT COUNT(*) INTO TOT_EMPS FROM EMP3;
    DELETE FROM emp3
    WHERE empno = employee_id;
    COMMIT;
    tot_emps := tot_emps - 1;
    RETURN TOT_EMPS;
    END;
    SQL> SELECT REMOVE_EMP(7499) FROM DUAL;
    REMOVE_EMP(7499)
                  12
    SQL> SELECT REMOVE_EMP(7521) FROM DUAL;
    REMOVE_EMP(7521)
                  11
    SQL> SELECT REMOVE_EMP(7566) FROM DUAL;
    REMOVE_EMP(7566)
                  10
    SQL>

  • How to delete the data in the compressed  infocube

    hi, bi gurus
    we are facing a problem in inventory management the info cube in BW production
    normally every time inventory cube gets compressed that means the data will be moving to F fact table to E fact table
    now the problem is we are having some bad data for latest five requests in this cube as we all know compressed data
    can't be delete by deleting request in the request tab the only way is go for selective deletion but i don't find any selective
    option in the cube we are PSA data for that five request which having correctdata please help how to delete the bad data in the
    info cube and load the correct data which we are having in PSA
    Thanks
    Joe

    Hi André
    Thanks you for ur answer
    what i am telling is their is an option for selective deletion for inventory cube
    but i don't find any specific option to delete the data that means like calendar day like that
    i hope you got my question.
    hi Saveen Kumar,
    Thank you again
    we are using 3.xx flow if we do the request reverse posting for all the 5 requests which has updated incorrect data
    next we need to do compression also or not
    and how to reload the data from PSA to Infocube becuse if request still avaliable in info cube it will not allow me to do that
    can you please tell me detail how to proceed in step by step this is first time i am doing request reverse post and i have to do it production please tell me
    Thanks in adavance
    Thanks,joe

  • How to delete the dat afrom the Ztable in GRP

    Hello Experts,
                             How we can delete the data from the Ztable created by the developer , in the Production server ,please give a brief idea  about it , thanks in advance.

    see this:
    to delete data from z table
    also follow this mentioned by jagadish in above thread:
    start tr. se16n
    type the table name and press ENTER.
    Then type the string "&sap_edit" into the command line and strike Enter
    again.
    enter your selection criteria.
    run.(F8)
    now you can easily delete the lines you want (and then save)
    All Changes are noted in the tables
    SE16N_CD_DATA and
    SE16N_CD_KEY.

  • How to Delete the Data in Cube and in ODS

    Hi ALL,
            I have a cube and an ODS both the data targets have data from the year 2002 to 2005.now i want to delete the data from both the data targets with respect to data related to the year 2003 only,how can it be done. Any Help Appreciated with rewarding points.
    Regards,
    BW Seeker.

    Hi
    Generally we can delete the data in the request for the data of year 2003 from request tab in manage screen of datatarget. This can be done only when we are sure that that particular request/s belongs to 2003 year data.
    This can be better handled with selective deletion of data for year 2003 with some keyfields like 0CALMONTH etc..
    This is infact only way when you have already compressed the data in Infocube.
    Hope it helps...
    Best Regards,
    DMK
    *Assign points if it helps...

  • How to delete the date in podcast or blog page?

    Hi,
    I would like to delete the dates showing on the first page of my podcast and blog pages - how do i do this in iWeb?
    Thank you for your help!
    Boaz

    You don't want to delete that date as it will affect RSS feeds, etc. However you can hide the date.  See this topic:  How to make the 'date' disappear on the...: Apple Support Communities
    OT

  • How to delete the data in P,Q and S table

    Hi All,
    I want to delete the data in /BIO/PCOSTCENTER, /BIO/QCOSTCENTER AND /BIO/SCOSTCENTER. Since we have transported the costcenter infoobject from 3.0B to BI 7. But the 3.0B doesnot contain the ALPHA conversion. So we need to delete the infoobject and install from BI content.
    When I am trying to activate the BI 7 obj, It is giving the error message the above tables are containing the data.
    Pls suggest how to delete them and activate the 0COSTCENTER with BI 7 version.
    Points will be awarded.
    Thanks
    Sathiya

    Program RSDMD_DEL_BACKGROUND is the appropriate choice to delete master data.   You should be able to search OSS notes on te pgm to get a little more info on it.
    It insures referential integrity by checking all InfoProviders to make sure a master data value for that InfoObject does not exist in any InfoProviders.  This might not be an issue in your case if you are dealing with a newly activated object that you have don't have in any Infoproviders, but is the only the best way to delete master data.

Maybe you are looking for

  • Can GRC AC 10 be integrated with BOBJ ?? Is Plugin available for BOBJ

    Hello Gurus, We are currently implementing GRC AC 10 for ERP and EP , we have found the plugins for both . The client requirement is also to implement it in their BOBJ system . We tried to search the plugin in the marketplace but could not find one.

  • IPhoto won't upgrade with iLife 11

    I recently purchased iLife 11, and found I needed to upgrade my operating system to snow leopard. Once that was complete I uploaded iLife 11 and everything seems to have worked successfully except for my iPhoto Library. I receive the prompt upon open

  • Can't reinstall OS X (10.5.2) after Windows XP install failed

    My son tried to install Windows XP into a 50GB partition on a 13" black MacBook (2.4GHz, 250GB HD). The installation failed and now the MacBook wont boot. It gives a message "No bootable device insert....". The extended hardware test on the MacOS X I

  • No partition button in Disk Utility

    Scratchin my head a bit, I am booted from an external FW drive in Tiger and wanted to reformat and partition an internal drive on a G3 tower but I do not see a partition button in 10.5 Disk Utility, I erased the vol and formatted as exended but canno

  • Macbook pro has no sound

    I'm having a very strange thing happen on my Macbook Pro.  When I turn on the macbook, I get the opening chime and then after that, there is no sound at all.  When i increase the volume or decrease, the indicators go up and down, but still no sound.