Giving error

GO
SET
ANSI_NULLS
ON
GO
SET
QUOTED_IDENTIFIER
ON
GO
ALTER
  PROCEDURE [dbo].[SearchSubsubCategory]
@Category1
nvarchar(50),
@SubCategory1
nvarchar(50),
@SubSubCategory1
nvarchar(50),
@Sort
nvarchar(100),
@SortDirection
nvarchar(100)
AS
BEGIN
SET
NOCOUNT
ON;
DECLARE
@strSQL nvarchar(3000)
set
@strSQL =
'SELECT a.Id,dbo.GetCategoryName(a.Category) as Category,dbo.GetSubCategoryName(a.SubCategory) as SubCategory,dbo.GetSubSubCategoryName(a.SubSubCategory) as SubSubCategory,a.Product,a.Description,a.Thumbnail,a.Image1,a.Image2,a.Image3,a.Image4,a.Image5,a.Image6,a.Image7,a.Image8,a.Publish,a.New 
from tbl_product a inner join tbl_category b on a.Category=b.id inner join tbl_subcategory c on a.SubCategory=c.id inner join tbl_sub_subcategory d on a.SubSubCategory=d.id WHERE a.Publish = 1 and b.CategoryName like '%'
+ @Category1 + '%' and c.SubCategoryName
like '%' + @SubCategory1 + '%'
and d.SubSubCategory like '%' + @SubSubCategory1
+ '%'  ORDER BY ' 
+ @Sort
+
+ @SortDirection
EXECUTE
sp_executesql 
@strSQL
END
giving error
The data types varchar and varchar are incompatible in the modulo operator.
Sms

You're just missing few single quotes
make it like below and it will work
set
@strSQL = 'SELECT a.Id,dbo.GetCategoryName(a.Category) as Category,dbo.GetSubCategoryName(a.SubCategory) as SubCategory,dbo.GetSubSubCategoryName(a.SubSubCategory) as SubSubCategory,a.Product,a.Description,a.Thumbnail,a.Image1,a.Image2,a.Image3,a.Image4,a.Image5,a.Image6,a.Image7,a.Image8,a.Publish,a.New from tbl_product a inner join tbl_category b on a.Category=b.id inner join tbl_subcategory c on a.SubCategory=c.id inner join tbl_sub_subcategory d on a.SubSubCategory=d.id WHERE a.Publish = 1 and b.CategoryName like ''%'' + @Category1 + ''%'' and c.SubCategoryName like ''%'' + @SubCategory1 + ''%'' and d.SubSubCategory like ''%'' + @SubSubCategory1 + ''%'' ORDER BY ' + @Sort + ' ' + @SortDirection
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page

Similar Messages

  • Item Open Interface giving error for Org Assignment

    We ran the MTL_SYSTEMS_ITEMS_INTERFACE & loaded all the items at master level.
    We are having issues in setting at Org level. Cant figure out what the issue as only few records gets assigned & then garbage sets in for remaining records. An SR has been raised & the tech support representative was saying that UOM's are different at master & org levels. Never heard of this issue earlier. I have worked with UOM's different at Master/Org levels.
    The UOM's are different at Master & Org Level and in some cases the UOM are different for different Orgs. Attribute Control for Primary/Sec UOM is at Org level. The UOM's belong to the same UOM Class. There are standard conversions defined for all these UOMs.
    Any pointers for quick resolution ?

    Pl do not post duplicates - Item Open Interface giving error for Org Assignment

  • Top N query giving error for oracle 8.0.6

    Dear All,
    We are executing this query SELECT XBLNR, WERKS, MATNR, MDV01, BACKFLQUANT, STATUS, SAPTIMESTAMP, PITSTIMESTAMP, PMTIMESTAMP, BATCH FROM (SELECT XBLNR, WERKS, MATNR, MDV01, BACKFLQUANT, STATUS, SAPTIMESTAMP, PITSTIMESTAMP, PMTIMESTAMP, BATCH FROM PMBPITS.PITS_UNITY WHERE STATUS = '01' ORDER BY PMTIMESTAMP) WHERE ROWNUM < 20
    on oracle 8.0.6 but this is giving the following error
    ora - 00907 missing right parenthesis error
    1. Is it that in the inner select we cannot use order by and where clause together.
    2. We also found that if we remove order by from inner select then the query is not giving error
    pls help . points will be awarded

    Hi,
    what ever the Aman said is correct. You check this is supported in 8.1.5, SQL allows you to embed the ORDER BY clause in a subquery and place the ROWNUM condition in the top-level query;
    'Top-N query' is a ORACLE 8i feature which is supported in SQL. However,
    Bug:855720 states the following:
    "PL/SQL does not support top-N queries (ORDER BY in SUBSELECT/SUBQUERY
    or VIEW. Since this feature is available in SQL, but not in PL/SQL,
    it has been logged as a Bug that will be fixed in 8.1.6."
    - Pavan Kumar N

  • Giving error while creating a sales contact for the previous year (2008)

    Hi Friends,
    We are currently with SP12. When we try to create a sales contract for the previous year it is giving error like "Schedule line is for the item 100 cannot be after the order's latest delivery date".
    i tried debugging and found that that there is a rule created for this (in SP12). I commented the rule and tried to create a contract but, again got an error "Error while saving". This error I can't catch while debugging.
    I even didn't find where the schedule line date and header cancel dates are set so that I can change the dates manually.
    If any one has any idea, kindly help me.
    Best regards,
    Swarna Seeta

    Hi Wolfhard,
    Thanks for the reply.
    You are right and I have uncommented the line which assigns true to the return value and the contract got saved now.
    Thank you so much.
    I just want to know whether commeting this rule effects any of the functionalities of the sales contract.
    Best regards,
    Swarna Seeta

  • FM SSF_CLOSE failing and giving error message while printing a smartform

    Hi,
    for language spanish the smartform is not getting printed for output type SG11 but for english it is getting printed? What could be the reason? I debugged and found that SSF_CLOSE is failing and giving error message.
    Thanks and regards,
    AP.

    Hi Aparajita,
    for changing from one languages to another translations in SE63 is to be done, either search on SCN for using SE63 , or atleast see these wiki help .
    Transaction SE63 - Translation Tools for Translators (BC-DOC-TTL) - SAP Library
    Transaction SE63 (SAP Library - Translation Tools for Translators (BC-DOC-TTL))

  • Task Manager Not loading Properly. Giving Error No more threads can be created in the System.NAPStatus UI and Some other Task related Errors

    I have a problem with the Task Scheduler. It is not opening properly it is giving Error Message box at this time i am unable to post. The Tasks Scheduler is starts with a error alert "No more threads can be created in the System.NAPStatus UI".
     I am unable to view the history of the tasks schecduled.It is giving message as 
    "The user account does not have permission to Access the Task History."
    How to fix it. It is frustrating as can't able to track my Tasks and Create new Tasks. Any Suggestions helpful.
    Thanks in Advance.
    RehaanKhan. M

    Hi,
    Thanks for your post.
    Please check event viewer if there are some error logs?
    Meanwhile, there is a similar thread has been discussed:
    Receiving error about "no more threads"
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/9a9e22e4-d947-4d19-b06c-aaadda624dbc/receiving-error-about-no-more-threads?forum=winservergen
    Regards.
    Vivian Wang

  • WebdynproJava Components giving error while migrating from NWDS SP03 toSP09

    Hi,
    The original DC's were developed in lower NWDS patch level, currently i have upgraded the patch level of NWDS to 09 and importing the Wed Dynpro components from NWDI; but some of the DC's are proper but some are giving error.
    I tried Project build, DC build and Repairing the DC's but nothing worked.

    Hi Siarhei,
    Error:
    The constructor WSTypedModel(String, String, QName, String, Map, String, IWSTypedModelInfo, Map<String,QName>) is undefined
    Warnings:
    Versions of 'com.sap.dictionary.runtime' are different.
    Versions of 'com.sap.dictionary.services' are different.
    Versions of 'com.sap.tc_.wd_.rtgen' are different.
    Forgot to mention i am working on CE7.1
    Regards
    Jagan

  • Giving Error while generating the Data mart to Infocube.

    Hi Gurus,
    I need to  extract the APO infocube data in to the BW infocube. For that iam trying to generate the data mart to APO infocube .
    So, that i can use that data mart as a data source to extract that APO Infocube data in to  BW infocube.
    In that process iam trying to generate the datamart for APO Infocube . But while generating it is giving errors like below:
    Creation of InfoSource 8ZEXTFCST for target system BW 1.2 failed
    The InfoCube cannot be used as a data mart for a BW 1.2 target system.
    Failed to create InfoSource &v1& for target system BW 1.2.
    PLease suggest me what to do for this Error problem.
    Thanks alot in Advance.

    Hi,
    Point No : 1
    What is Planning Area :
    http://help.sap.com/saphelp_scm41/helpdata/en/70/1b7539d6d1c93be10000000a114084/content.htm
    Point No : 2
    Creation Steps for Planning Area :
    http://www.sap-img.com/apo/creation-of-planning-area-in-apo.htm
    Note : We will not create Planning Area.This will be done by APO team.
    Point No 3  : Afetr opening the T-Code : /n/SAPAPO/MSDP_ADMIN in APO you will be able to see all the planning areas.
    Point No 4 : Select your planning area and Goto Extras menu and Click on Generate DS
    Point No 5. System automaticall generate the DS in APO (Naming Convention start with 9) and Replicate the DS in BI Map to your cube and load the data.
    Regards
    Ram.

  • Giving error message when saving the Query

    Hello,
    I have added a new calculated key figure to the structure in a Query but when I try to save the Query it is giving error message is below.
    Error Message:
    u201CThis internal error is an intended termination resulting from a program state that is not permitted.
    Procedure
    Analyze the situation and inform SAP.
    If the termination occurred when you executed a query or Web template, or during interaction in the planning modeler, and if you can reproduce this termination, record a trace (transaction RSTT).
    For more information about recording a trace, see the documentation for the trace tool environment as well as SAP Note 899572u201D.
    Could any one please suggest me how can I over come with this problem.
    Thanks
    Prathap.

    Hi Prathap,
    There is some problem in the definition of the Query.
    Please click on the check button before saving the query, it gives where the problem exists in it.
    Hope it helps.
    Veeerendra.

  • Non numeric value in numeric field giving error

    Hi All
    I am using BAPI for creating sales order. If user is giving non numeric value in Quantity field it is giving error. Because quantity field data type is Double.
    Please Help.
    Thanks
    Raktim

    Hi Banerjee,
                 Create a String/int/long Context variable and point it to UI Input element.Do the validation  for correct input value. once the validation is succesful assign that value to RFC BigDecimal variable by Explicit casting.
    Hope this might solve your problem .
    Thanks
    Madhan

  • DATAEXPORT to sql server is giving error

    Hi,
    I am using DATAEXPORT to export data to SQL tables but its giving error:
    MY TABLE:
    USE SBC;
    Create table TEST
         Period nchar(20),
         HSP_Rates nchar(20),
         Years nchar(10),
         Currency nchar(5),
         Scenario nchar(20),
         ICP nchar(20),
         [Co.] nchar(20),
         Version nchar(20),
         Product nchar(20),
         Entity nchar(30),
    Account nchar(50),
         Data numeric(18, 5)
    Created this order based on export taken on file
    **My Script:**
    SET DATAEXPORTOPTIONS
         DataExportLevel "ALL";
         DATAEXPORTCOLFORMAT ON;
         DataExportOverwriteFile ON;
         DataExportDecimal 4;
    DATAEXPORTCOND ("HSP_InputValue" <> #MISSING And "HSP_InputValue" <> 0);
    FIX (@REMOVE(@RELATIVE ("Balance_Sheet",0),"CY_Earnings"),"Per7","HSP_InputValue","FY12","Local","MY12 Budget", @RELATIVE ("ICP Top",0),@RELATIVE ("Co Total",0),Working,@RELATIVE (PODS,0),@RELATIVE ("Entity",0));
    /*DATAEXPORT "File" "," "D:\Test.txt"*/
    DATAEXPORT "DSN" "TEST" "Test" "admin" "XXXXXX";
    ENDFIX;
    Output when exported to File:
    "Per7"
    "HSP_InputValue","FY12","Local","MY12 Budget","No IC","Co 100","Working","ALLEZ","100-1050","Subs_Cash",500000.046
    "HSP_InputValue","FY12","Local","MY12 Budget","No IC","Co 100","Working","AirFreight","100-1050","Subs_Cash",534324.370
    ERROR IN LOGS:
    [Fri Feb 03 01:10:20 2012]Local/SBC///15796/Info(1013210)
    User [admin@Native Directory] set active on database [SBC]
    [Fri Feb 03 01:10:20 2012]Local/SBC/SBC/admin@Native Directory/2208/Info(1013091)
    Received Command [Calculate] from user [admin@Native Directory]
    [Fri Feb 03 01:10:20 2012]Local/SBC/SBC/admin@Native Directory/2208/Info(1013167)
    Received Command [Calculate] from user [admin@Native Directory] using [Test.csc]
    [Fri Feb 03 01:10:20 2012]Local/SBC/SBC/admin@Native Directory/2208/Info(1021004)
    Connection String is generated
    [Fri Feb 03 01:10:20 2012]Local/SBC/SBC/admin@Native Directory/2208/Info(1021041)
    Connection String is [DSN=SBC;UID=...;PWD=...;]
    [Fri Feb 03 01:10:20 2012]Local/SBC/SBC/admin@Native Directory/2208/Info(1021000)
    Connection With SQL Database Server is Established
    [Fri Feb 03 01:10:20 2012]Local/SBC/SBC/admin@Native Directory/2208/Info(1021013)
    ODBC Layer Error: [21S01] ==> [[Microsoft][ODBC SQL Server Driver][SQL Server]Column name or number of supplied values does not match table definition.]
    [Fri Feb 03 01:10:20 2012]Local/SBC/SBC/admin@Native Directory/2208/Info(1021014)
    ODBC Layer Error: Native Error code [213]
    [Fri Feb 03 01:10:20 2012]Local/SBC/SBC/admin@Native Directory/2208/Error(1012085)
    Unable to export data to SQL table [Test]. Check the Essbase server log and the system console to determine the cause of the problem.
    [Fri Feb 03 01:10:20 2012]Local/SBC/SBC/admin@Native Directory/2208/Info(1021002)
    SQL Connection is Freed
    [Fri Feb 03 01:10:20 2012]Local/SBC/SBC/admin@Native Directory/2208/Warning(1080014)
    Transaction [ 0xb0006( 0x4f2b885c.0xd4e40 ) ] aborted due to status [1012085].
    [Fri Feb 03 01:10:20 2012]Local/SBC/SBC/admin@Native Directory/2208/Info(1012579)
    Total Calc Elapsed Time for [Test.csc] : [0.022] seconds
    I have tried using SQL Drivers for ODBC connection as well as Wire protocol driver.
    Please assist asap.
    Regards,
    Vinit

    Chawla,
    Fixed in 9.3.3, Check out this, their are few more bugs fixed related to DataExport.
    http://docs.oracle.com/cd/E10530_01/doc/epm.931/esb_93300_readme.pdf
    8404516 Calculator.The DATAEXPORTCOND calculation command clashes with the FIX
    command.
    8913164 Calculator. Data exports that use DATAEXPORTCOND do not always export all
    the data expected because not all conditions are taken into account within the
    DATAEXPORTCOND statement
    8988310 Calculator. When exporting data using the DATAEXPORT command from a
    duplicate outline that contains a shared hierarchy, the exported data contains the
    shared member, not the prototype Etc..
    Cheers...!!
    Rahul S.

  • Not able to Start Hyper-V(2012 R2) VM when placing the VM config file on Samba Share,Its giving error:Unable to initialize the saveset

    ---We are trying to setup Hyper-V on Samba shares samba version 3.6 exported from Ubuntu  M/c. Basically runnig the Public(share) from the Ubuntu and able to access it from Windows 2012 (create/modify everything). I used Hyper-V and placed the disks
    ".vhd" on this , VM succesfull created and started. However when I placed the VM config files on this (samba) shares VM created successfully but its not starting, Its giving error like Unable to initialize the saveset -- Any idea how to place the
    Hyper-V VM config files samba share?

    Hi Rakesh KK,
    Please confirm your share meet the Serve 2012r2 Hyper-V requirement, you can refer the following KB to get more detail require conditions.
    Deploy Hyper-V over SMB
    http://technet.microsoft.com/en-us/library/jj134187.aspx
    Hope this helps.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Video import problem from iphone5 to PC giving error

    Hi evereyone,
                      I have iphone 5. I try to import my videos but am not able to import all, its giving error. I tried also using windows live photo still same prob. the imported videos have problem in playing. I tried with vlc, quick time, the frames are broken and audio video lag. Please help me how i can import all and rum smoothly.

    Ilan_B wrote:
    Every time I plug my iphone 5 into the laptop (using windows 7) the easiest way is to right click on the portable device (iphone icon) and import to my pictures, BUT every time I do this it wants to import ALL photos and videos.
    And when you do this, it should ask if you want to import the pictures that have already been imported. Select No.
    Then, after you import, the photos should be deleted from the Camera Roll.
    After the photos are imported and deleted from the Camera Roll, you can import using iTunes, only the photos you want on the iPhone.

  • BAPI  BAPI_PR_CHANGE  giving error message: Enter G/L Account

    Hi Folks,
    I am using bapi Enter G/L Account to add new item in existing PR number.
    In return table, bapi is giving error mesage that, 'Enter G/L Account' . But i don't know where to pass the G/L number to this bapi and from where i can get the G/L number for existing PR document.
    Regards
    PG

    Hi,
    Enter the G/L account in the structure PRACCOUNT field GL_ACCOUNT. Enter the Purchase requistion item no in the field PREQ_ITEM  in the structure PRACCOUNT.
    Also,
    Enter the Purchase requistion item no in the field PREQ_ITEM  in the structure PRACCOUNTX. Set update field to 'X'  in the structure PRACCOUNT field GL_ACCOUNT.
    Hope it helps.
    Sujay

  • BAPI_ALM_NOTIF_LIST_PARTNER working perfectly in R/3 giving error in XI

    Hi all,
    the above BAPI working fine in R/3. The Same inputs are passed but it is giving error. The input and output are given below in XML format as it is handled in XI:
    Input message
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns1:BAPI_ALM_NOTIF_LIST_PARTNER xmlns:ns1="urn:sap-com:document:sap:rfc:functions">
      <COMPLETE>x</COMPLETE>
      <NOTIFICATION_DATE>2008-08-08</NOTIFICATION_DATE>
      <PARTNER>0000000001</PARTNER>
      <PARTNERFUNCTION>vw</PARTNERFUNCTION>
      <NOTIFICATION />
      </ns1:BAPI_ALM_NOTIF_LIST_PARTNER>
    output message
      <?xml version="1.0" encoding="UTF-8" ?>
    - <rfc:BAPI_ALM_NOTIF_LIST_PARTNER.Response xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
    - <RETURN>
      <TYPE>E</TYPE>
      <CODE>IM718</CODE>
      <MESSAGE>E718 Only specify partner function together with partner number</MESSAGE>
      <LOG_NO />
      <LOG_MSG_NO>000000</LOG_MSG_NO>
      <MESSAGE_V1 />
      <MESSAGE_V2 />
      <MESSAGE_V3 />
      <MESSAGE_V4 />
      </RETURN>
      <NOTIFICATION />
      </rfc:BAPI_ALM_NOTIF_LIST_PARTNER.Response>
    Can any body help in resolving this problem please.
    Regards,
    Venkat

    Thank you amrute for your reply. You are right we do faced similar issues in many other occations and sent exact data and could resolve the issues. In this case also we have given in exact format for all fields. Date format as given in this case is same as what was given in another working XI scenario. However I look at the data type of date to be sure.
    As you see the message is regarding partner and partner function. If you have any other point of view may please be indicated.
    Regards,
    Venkat

  • When i created procedure for error_log its giving errors:

    please give a solution for below procedure...
    just check the procedure its giving errors ... rec is not an identifier in loop in the procedure....
    Step 1:
    Create a table MAP_ERROR_LOG.
    Script:
    CREATE TABLE MAP_ERROR_LOG
    ERROR_SEQ NUMBER,
    MAPPING_NAME VARCHAR2(32 BYTE),
    TARGET_TABLE VARCHAR2(35 BYTE),
    TARGET_COLUMN VARCHAR2(35 BYTE),
    TARGET_VALUE VARCHAR2(100 BYTE),
    PRIMARY_TABLE VARCHAR2(100 BYTE),
    ERROR_ROWKEY NUMBER,
    ERROR_CODE VARCHAR2(12 BYTE),
    ERROR_MESSAGE VARCHAR2(2000 BYTE),
    ERROR_TIMESTAMP DATE
    TABLESPACE DW_OWNER_DATA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 80K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    Step 2:
    Create a sequence MAP_ERROR_LOG_SEQ
    CREATE SEQUENCE MAP_ERROR_LOG_SEQ START WITH 1 INCREMENT BY 1
    Step 3:
    Create a procedure PROC_MAP_ERROR_LOG through OWB.
    In this i have used 3 cursor, first cursor is used to check the count of error messages for the corresponding table(WB_RT_ERROR_SOURCES).
    The second cursor is used to get the oracle error and the primary key values.
    The third cursor is used for get the ORACLE DBA errors such as "UNABLE TO EXTEND THE TABLESPACE" for this type errors.
    CREATE OR REPLACE PROCEDURE PROC_MAP_ERROR_LOG(MAP_ID VARCHAR2) IS
    --initialize variables here
    CURSOR C1 IS
    SELECT COUNT(RTA_IID) FROM OWB_REP.WB_RT_ERROR_SOURCES
    WHERE RTA_IID =( SELECT MAX(RTA_IID) FROM OWB_REP.WB_RT_AUDIT WHERE RTA_PRIMARY_TARGET ='"'||MAP_ID||'"');
    V_COUNT NUMBER;
    CURSOR C2 IS
    SELECT A.RTE_ROWKEY ERR_ROWKEY,SUBSTR(A.RTE_SQLERRM,1,INSTR(A.RTE_SQLERRM,':')-1) ERROR_CODE,
    SUBSTR(A.RTE_SQLERRM,INSTR(A.RTE_SQLERRM,':')+1) ERROR_MESSAGE,
    C.RTA_LOB_NAME MAPPING_NAME,SUBSTR(B.RTS_SOURCE_COLUMN,(INSTR(B.RTS_SOURCE_COLUMN,'.')+1)) TARGET_COLUMN,
    B.RTS_VALUE TARGET_VALUE,C.RTA_PRIMARY_SOURCE PRIMARY_SOURCE,C.RTA_PRIMARY_TARGET TARGET_TABLE,
    C.RTA_DATE ERROR_TIMESTAMP
    FROM OWB_REP.WB_RT_ERRORS A,OWB_REP.WB_RT_ERROR_SOURCES B, OWB_REP.WB_RT_AUDIT C
    WHERE C.RTA_IID = A.RTA_IID
    AND C.RTA_IID = B.RTA_IID
    AND A.RTA_IID = B.RTA_IID
    AND A.RTE_ROWKEY =B.RTE_ROWKEY
    --AND RTS_SEQ =1
    AND B.RTS_SEQ IN (SELECT POSITION FROM OWB_REP.ALL_CONS_COLUMNS A, OWB_REP.ALL_CONSTRAINTS B
    WHERE A.TABLE_NAME = B.TABLE_NAME
    AND A.CONSTRAINT_NAME = B.CONSTRAINT_NAME
    AND A.TABLE_NAME =MAP_ID
    AND CONSTRAINT_TYPE ='P')
    AND A.RTA_IID =(
    SELECT MAX(RTA_IID) FROM OWB_REP.WB_RT_AUDIT WHERE RTA_PRIMARY_TARGET ='"'||MAP_ID||'"');
    CURSOR C3 IS
    SELECT A.RTE_ROWKEY ERR_ROWKEY,SUBSTR(A.RTE_SQLERRM,1,INSTR(A.RTE_SQLERRM,':')-1) ERROR_CODE,
    SUBSTR(A.RTE_SQLERRM,INSTR(A.RTE_SQLERRM,':')+1) ERROR_MESSAGE,
    C.RTA_LOB_NAME MAPPING_NAME,SUBSTR(B.RTS_SOURCE_COLUMN,(INSTR(B.RTS_SOURCE_COLUMN,'.')+1)) TARGET_COLUMN,
    B.RTS_VALUE TARGET_VALUE,C.RTA_PRIMARY_SOURCE PRIMARY_SOURCE,C.RTA_PRIMARY_TARGET TARGET_TABLE,
    C.RTA_DATE ERROR_TIMESTAMP
    FROM OWB_REP.WB_RT_ERRORS A,OWB_REP.WB_RT_ERROR_SOURCES B, OWB_REP.WB_RT_AUDIT C
    WHERE C.RTA_IID = A.RTA_IID
    AND A.RTA_IID = B.RTA_IID
    AND A.RTE_ROWKEY =B.RTE_ROWKEY
    AND A.RTA_IID =(
    SELECT MAX(RTA_IID) FROM OWB_REP.WB_RT_AUDIT WHERE RTA_PRIMARY_TARGET ='"'||MAP_ID||'"');
    -- main body
    BEGIN
    DELETE DW_OWNER.MAP_ERROR_LOG WHERE TARGET_TABLE ='"'||MAP_ID||'"';
    COMMIT;
    OPEN C1;
    FETCH C1 INTO V_COUNT;
    IF V_COUNT >0 THEN
    FOR REC IN C2
    LOOP
    INSERT INTO DW_OWNER.MAP_ERROR_LOG
    (Error_seq ,
    Mapping_name,
    Target_table,
    Target_column ,
    Target_value ,
    Primary_table ,
    Error_rowkey ,
    Error_code ,
    Error_message ,
    Error_timestamp)
    VALUES(
    DW_OWNER.MAP_ERROR_LOG_SEQ.NEXTVAL,
    REC.MAPPING_NAME,
    REC.TARGET_TABLE,
    REC.TARGET_COLUMN,
    REC.TARGET_VALUE,
    REC.PRIMARY_SOURCE,
    REC.ERR_ROWKEY,
    REC.ERROR_CODE,
    REC.ERROR_MESSAGE,
    REC.ERROR_TIMESTAMP);
    END LOOP;
    ELSE
    FOR REC IN C3
    LOOP
    INSERT INTO DW_OWNER.MAP_ERROR_LOG
    (Error_seq ,
    Mapping_name,
    Target_table,
    Target_column ,
    Target_value ,
    Primary_table ,
    Error_rowkey ,
    Error_code ,
    Error_message ,
    Error_timestamp)
    VALUES(
    DW_OWNER.MAP_ERROR_LOG_SEQ.NEXTVAL,
    REC.MAPPING_NAME,
    REC.TARGET_TABLE,
    REC.TARGET_COLUMN,
    REC.TARGET_VALUE,
    REC.PRIMARY_SOURCE,
    REC.ERR_ROWKEY,
    REC.ERROR_CODE,
    REC.ERROR_MESSAGE,
    REC.ERROR_TIMESTAMP);
    END LOOP;
    END IF;
    CLOSE C1;
    COMMIT;
    -- NULL; -- allow compilation
    EXCEPTION
    WHEN OTHERS THEN
    NULL; -- enter any exception code here
    END;

    Yah i got the solution...
    scrip is
    Step 1:
    Create a table MAP_ERROR_LOG.
    Script:
    CREATE TABLE MAP_ERROR_LOG
    ERROR_SEQ NUMBER,
    MAPPING_NAME VARCHAR2(32 BYTE),
    TARGET_TABLE VARCHAR2(35 BYTE),
    TARGET_COLUMN VARCHAR2(35 BYTE),
    TARGET_VALUE VARCHAR2(100 BYTE),
    PRIMARY_TABLE VARCHAR2(100 BYTE),
    ERROR_ROWKEY NUMBER,
    ERROR_CODE VARCHAR2(12 BYTE),
    ERROR_MESSAGE VARCHAR2(2000 BYTE),
    ERROR_TIMESTAMP DATE
    TABLESPACE DW_OWNER_DATA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 80K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    Step 2:
    Create a sequence MAP_ERROR_LOG_SEQ
    CREATE SEQUENCE MAP_ERROR_LOG_SEQ START WITH 1 INCREMENT BY 1
    Step 3:
    Create a procedure PROC_MAP_ERROR_LOG through OWB.
    In this i have used 3 cursor, first cursor is used to check the count of error messages for the corresponding table(WB_RT_ERROR_SOURCES).
    The second cursor is used to get the oracle error and the primary key values.
    The third cursor is used for get the ORACLE DBA errors such as "UNABLE TO EXTEND THE TABLESPACE" for this type errors.
    CREATE OR REPLACE PROCEDURE PROC_MAP_ERROR_LOG(MAP_ID VARCHAR2) IS
    --initialize variables here
    CURSOR C1 IS
    SELECT COUNT(RTA_IID) FROM OWB_REP.WB_RT_ERROR_SOURCES1
    WHERE RTA_IID =( SELECT MAX(RTA_IID) FROM OWB_REP.WB_RT_AUDIT1 WHERE RTA_PRIMARY_TARGET ='"'||MAP_ID||'"');
    V_COUNT NUMBER;
    CURSOR C2 IS
    SELECT A.RTE_ROWKEY ERR_ROWKEY,SUBSTR(A.RTE_SQLERRM,1,INSTR(A.RTE_SQLERRM,':')-1) ERROR_CODE,
    SUBSTR(A.RTE_SQLERRM,INSTR(A.RTE_SQLERRM,':')+1) ERROR_MESSAGE,
    C.RTA_LOB_NAME MAPPING_NAME,SUBSTR(B.RTS_SOURCE_COLUMN,(INSTR(B.RTS_SOURCE_COLUMN,'.')+1)) TARGET_COLUMN,
    B.RTS_VALUE TARGET_VALUE,C.RTA_PRIMARY_SOURCE PRIMARY_SOURCE,C.RTA_PRIMARY_TARGET TARGET_TABLE,
    C.RTA_DATE ERROR_TIMESTAMP
    FROM OWB_REP.WB_RT_ERRORS1 A,OWB_REP.WB_RT_ERROR_SOURCES1 B, OWB_REP.WB_RT_AUDIT1 C
    WHERE C.RTA_IID = A.RTA_IID
    AND C.RTA_IID = B.RTA_IID
    AND A.RTA_IID = B.RTA_IID
    AND A.RTE_ROWKEY =B.RTE_ROWKEY
    --AND RTS_SEQ =1
    AND B.RTS_SEQ IN (SELECT POSITION FROM ALL_CONS_COLUMNS A, ALL_CONSTRAINTS B
    WHERE A.TABLE_NAME = B.TABLE_NAME
    AND A.CONSTRAINT_NAME = B.CONSTRAINT_NAME
    AND A.TABLE_NAME =MAP_ID
    AND CONSTRAINT_TYPE ='P')
    AND A.RTA_IID =(
    SELECT MAX(RTA_IID) FROM OWB_REP.WB_RT_AUDIT1 WHERE RTA_PRIMARY_TARGET ='"'||MAP_ID||'"');
    CURSOR C3 IS
    SELECT A.RTE_ROWKEY ERR_ROWKEY,SUBSTR(A.RTE_SQLERRM,1,INSTR(A.RTE_SQLERRM,':')-1) ERROR_CODE,
    SUBSTR(A.RTE_SQLERRM,INSTR(A.RTE_SQLERRM,':')+1) ERROR_MESSAGE,
    C.RTA_LOB_NAME MAPPING_NAME,SUBSTR(B.RTS_SOURCE_COLUMN,(INSTR(B.RTS_SOURCE_COLUMN,'.')+1)) TARGET_COLUMN,
    B.RTS_VALUE TARGET_VALUE,C.RTA_PRIMARY_SOURCE PRIMARY_SOURCE,C.RTA_PRIMARY_TARGET TARGET_TABLE,
    C.RTA_DATE ERROR_TIMESTAMP
    FROM OWB_REP.WB_RT_ERRORS A,OWB_REP.WB_RT_ERROR_SOURCES1 B, OWB_REP.WB_RT_AUDIT C
    WHERE C.RTA_IID = A.RTA_IID
    AND A.RTA_IID = B.RTA_IID
    AND A.RTE_ROWKEY =B.RTE_ROWKEY
    AND A.RTA_IID =(
    SELECT MAX(RTA_IID) FROM OWB_REP.WB_RT_AUDIT WHERE RTA_PRIMARY_TARGET ='"'||MAP_ID||'"');
    -- main body
    BEGIN
    DELETE DW_OWNER.MAP_ERROR_LOG WHERE TARGET_TABLE ='"'||MAP_ID||'"';
    COMMIT;
    OPEN C1;
    FETCH C1 INTO V_COUNT;
    IF V_COUNT >0 THEN
    FOR REC IN C2
    LOOP
    INSERT INTO DW_OWNER.MAP_ERROR_LOG
    (Error_seq ,
    Mapping_name,
    Target_table,
    Target_column ,
    Target_value ,
    Primary_table ,
    Error_rowkey ,
    Error_code ,
    Error_message ,
    Error_timestamp)
    VALUES(
    DW_OWNER.MAP_ERROR_LOG_SEQ.NEXTVAL,
    REC.MAPPING_NAME,
    REC.TARGET_TABLE,
    REC.TARGET_COLUMN,
    REC.TARGET_VALUE,
    REC.PRIMARY_SOURCE,
    REC.ERR_ROWKEY,
    REC.ERROR_CODE,
    REC.ERROR_MESSAGE,
    REC.ERROR_TIMESTAMP);
    END LOOP;
    ELSE
    FOR REC IN C3
    LOOP
    INSERT INTO DW_OWNER.MAP_ERROR_LOG
    (Error_seq ,
    Mapping_name,
    Target_table,
    Target_column ,
    Target_value ,
    Primary_table ,
    Error_rowkey ,
    Error_code ,
    Error_message ,
    Error_timestamp)
    VALUES(
    DW_OWNER.MAP_ERROR_LOG_SEQ.NEXTVAL,
    REC.MAPPING_NAME,
    REC.TARGET_TABLE,
    REC.TARGET_COLUMN,
    REC.TARGET_VALUE,
    REC.PRIMARY_SOURCE,
    REC.ERR_ROWKEY,
    REC.ERROR_CODE,
    REC.ERROR_MESSAGE,
    REC.ERROR_TIMESTAMP);
    END LOOP;
    END IF;
    CLOSE C1;
    COMMIT;
    -- NULL; -- allow compilation
    EXCEPTION
    WHEN OTHERS THEN
    NULL; -- enter any exception code here
    END;

Maybe you are looking for

  • InputStream / OutputStream Help

    I have in a series 10 commands to be executed on a server. so i am using Buffered OutputStream and DataOutputStream to write those commands to server. these commands have a set of protocol rule to be followed. for example i am creating a byte array a

  • Shared photo stream from others not showing my own posted photos in iPhoto

    Hi community, I'm facing a problem I'm not sure if it might have been answered somewhere before but if so I cannot find it.. My wife opened a shared photo stream with her iPhone and invited me to it. Since then, we both post new pictures to it and it

  • What are possible career paths after 7 years of database administration?

    Hi, what is most common choice for Oracle production DBA with 5 years< experience, if he wants to change his career ? Is it possible to become Oracle Architect without Java/PL-SQL programming experience, but knowing many oracle products such as OBIEE

  • Automatically Setting the Masterpage in Sharepoint 2013

    I am trying to install our custom masterpage (and supporting files) as a feature which would automatically turn on and set the default masterpage to our custom one. When deploying in VS2012, it works fine. The feature is installed & activated at the

  • Can you swap batteries while in safe sleep

    I've got the first gen 1.8 MacBook, and I'm curious whether I could swap the battery in safe sleep, without the AC plugged in. Reason I ask is that I've got the original battery, which has about 375 cycles, and about 3h of usable life (nothing too st