How do i test split by value functionality in mesage mapping with multiple

how do i test split by value functionality in mesage mapping with multiple values ?
regards,
venkat

repeat your source node. in mapping editor you can view queues by right clicking to mapped element.. selecting Display Queues option.. this will show u your values .
You can also select this Display Queue option for splitByValue option
for example
source--->splitByValue>target
Try viewing your queues to each this step... for splitByValue in display Queue you will see context inserted(grey colour) accodingly

Similar Messages

  • Importance of split by value function options

    In split by value function, we have Each value, value changed and emply value options. What are the functions of these options? ( I know split by value function will generate a field in the target, under a different target node, for every value of that in the source sturcture.). Please help me with the answer.
    Regards,
    Suresh.

    Hi,
    SplitByValue() is the counterpart to removeContexts(): Instead of deleting a context, you can insert a context change in the source value queue. You then receive this element for each inserted context change instead of a top node element. However, for this to be possible, the top node source field must be assigned a top node target field and minOccurs must be >0. A maximum of minOccurs top node target fields can be inserted here.
    You can insert a context change in the queue after each value, after each change to the value, or after each tag without a value.
    Refer this link for more details:
    http://help.sap.com/saphelp_nw04/helpdata/en/21/3bb8c495125e4eb5969f0377885fe0/content.htm
    Regards,
    Nithiyanandam

  • How Can I Split Multi-Valued Attributes in Syndicator Map?

    Is the option to split multi-values only available for fields and not on attributes that are also multi-valued?

    How Can I Split Multi-Valued Attributes in Syndicator Map?
    Currently this feature are not in MDM you can split this value by using any middleware software for e.g. PI
    Is the option to split multi-values only available for fields and not on attributes that are also multi-valued?
    Correct, Multi-values option only available for field not for attributes
    Thanks,
    Jignesh Patel

  • Copy value function in message mapping?

    can someone help me understand copy value function in message mapping???

    Hi,
    Here's a good example providen yesterday by Mark in a thread.
    [Re: different contexts to different targets]
    And here's SAP help: [http://help.sap.com/saphelp_nwpi71/helpdata/EN/26/d22366565be0449d7b3cc26b1bab10/content.htm]
    Then play...
    Mickael

  • I need your expert opinion on how to create a map with multiple conditions.

    Hello.
    I need your expert opinion on how to create a map with multiple conditions.
    I have a procedure (which i cannot import or re-create in OWB due to the bug), so i am trying to create a map instead :-(
    How can i create a cursors within the map?
    My function creates table and cursor.
    Then it will have to check for duplicates in the tables (the one created and another table) - the criteria for finding duplicates is a number of fields.I then need to place few different conditions (if some attributes are not available) and it has to load cursor based on this conditions. The next step is to fetch the data into the cursor based on what attributes are missing.
    The next thing it will do is insert the data into table (if record doesn't exist), output the error in separate table is record is corrupted, or update the record with changed information.
    In short i need to re-create match / merge but with conditions, iterations etc 'built into' it.
    I can read up on available functions - it's just what would be the best options? and what would be the best approach to do so?
    In my function i use %rowtype - but cannot use it in owb - so what would be the alternative? i don't really want to create a lot of variables and then have a nightmare of maintaing it. are there any tips regarding this?
    having looked through Oracle dedupe - it's not really what i need because it is just DISTINCT.
    I would appreciate any help / advise on this.
    Thank you very much

    thanks a lot for your reply - i will look into this option :-)
    it is a bit more complicated now as i have to re-create the match / merge and then somehow 'tweak' it to achieve the result i need.
    At the moment i am looking to breakdown the package into smaller chunks 'functions' and try creating the map that way.
    Anyway, thank you very much for your suggestion.

  • How to add Test data for a function module

    Hi experts,
    i want to add test data for a function module . i don't know how to proceed on it . please help me...
    with regards,
    James...
    Valuable answers will be rewarded...

    Hi,
    - Go to SE37 and execute your FM
    - Enter the data you want to pass to FM
    - Hit 'Save' button. Enter the meaningful name for your test scenario and save. That's it you have saved the test data.
    You can also enter some other test data and save that also. In short, you can save multiple test scenario. Also, you can give multiple test scenario a same name and they do not overwrite each other ( but normally you give different name to differentiate them)
    Next time you come to execute the FM again, hit the "test data" button and it will show you all the test scenario you have stored before. Select the one you want to use and it will load the data in FM parameters.
    Let me know if you need any other information.
    Regards,
    RS

  • How to declare variable in table valued function

    hello.
    i have the following code to define a inline table valued function
    but the use of cmn.ReshteId('Lf_WL') as a function in where clause is not good performance.
    Alter function lf.fn_WholeLifeBn_GetForm(@ViewKind tinyint, @CurrentLocation int) returns table
    as
    return
    select B.*
    from lf.fn_LifeBN_GetForm(@ViewKind, @CurrentLocation) B
    where Reshte = cmn.ReshteId('Lf_WL')
    for better performance following code is good:
    declare @Reshte smallint
    set @Reshte = cmn.ReshteId('Lf_TS')
    select B.*
    from lf.fn_LifeBN_GetForm(@ViewKind, @CurrentLocation) B
    where Reshte = @Reshte
    but can not use it as the first code block in inline function.
    please help for define a good function.

    What do you think about Multi-Statement Table-Valued UDFs?
    create function Func(@Var int)
    returns @T table(ColName int)
    as
    begin
      insert into @T(ColName) values (@Var)
      return
    end
    select * from Func(10)
    select * from Func(20)
    ---or
    alter function Func()
    returns @T table(ColName int)
    as
    begin
      declare @Var int
      set @Var = 10
      insert into @T(ColName) values (@Var)
      return
    end
    select * from Func()
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to use database look up table function in xsl mapping

    Can anybody tell me how to use database look up table function while mapping xsl between 2 nodes.
    I have an XML file coming in and depending on one of XML elements we need to decide which further path to take. But, using this XML element, we need to query database table, get metadata and accordingly take appropriate path. I have written lookup function which returns metadata value.
    Now, the issue is how do I pass the XML element valu as input to look up function? When I tried to drag it to the input node of lookup function, it throws an error like "Maximum number of parameters exceeded"
    Thanks,

    If the lookup table is always going to remain the same (e.g. a character generator or something similar) you can place the values in a 2D array constant on your diagram, with the input value as one column, the equivalent as the other. When you need to perform the lookup you use an index array to return all the values in the "input column", search it using "search 1D array" and use the resulting index number to index the other column's data. If the values may change, then it would probably be best to load an array control with your equivalent values from a file.
    P.M.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • How could I replace hard coded value in my sql query with constant value?

    Hi all,
    Could anyone help me how to replace hardcoded value in my sql query with constant value that might be pre defined .
    PROCEDURE class_by_day_get_bin_data
         in_report_parameter_id   IN   NUMBER,
         in_site_id               IN   NUMBER,
         in_start_date_time       IN   TIMESTAMP,
         in_end_date_time         IN   TIMESTAMP,
         in_report_level_min      IN   NUMBER,
         in_report_level_max      IN   NUMBER
    IS
      bin_period_length   NUMBER(6,0); 
    BEGIN
      SELECT MAX(period_length)
         INTO bin_period_length
        FROM bin_data
         JOIN site_to_data_source_lane_v
           ON bin_data.data_source_id = site_to_data_source_lane_v.data_source_id
         JOIN bin_types
           ON bin_types.bin_type = bin_data.bin_type 
       WHERE site_to_data_source_lane_v.site_id = in_site_id
         AND bin_data.start_date_time     >= in_start_date_time - numtodsinterval(1, 'DAY')
         AND bin_data.start_date_time     <  in_end_date_time   + numtodsinterval(1, 'DAY')
         AND bin_data.bin_type            =  2
         AND bin_data.period_length       <= 60;
      --Clear the edr_class_by_day_bin_data temporary table and populate it with the data for the requested
      --report.
      DELETE FROM edr_class_by_day_bin_data;
       SELECT site_to_data_source_lane_v.site_id,
             site_to_data_source_lane_v.site_lane_id,
             site_to_data_source_lane_v.site_direction_id,
             site_to_data_source_lane_v.site_direction_name,
             bin_data_set.start_date_time,
             bin_data_set.end_date_time,
             bin_data_value.bin_id,
             bin_data_value.bin_value
        FROM bin_data
        JOIN bin_data_set
          ON bin_data.bin_serial = bin_data_set.bin_serial
        JOIN bin_data_value
          ON bin_data_set.bin_data_set_serial = bin_data_value.bin_data_set_serial
        JOIN site_to_data_source_lane_v
             ON bin_data.data_source_id = site_to_data_source_lane_v.data_source_id
            AND bin_data_set.lane = site_to_data_source_lane_v.data_source_lane_id
        JOIN (
               SELECT CAST(report_parameter_value AS NUMBER) lane_id
                 FROM report_parameters
                WHERE report_parameters.report_parameter_id    = in_report_parameter_id
                  AND report_parameters.report_parameter_group = 'LANE'
                  AND report_parameters.report_parameter_name  = 'LANE'
             ) report_lanes
          ON site_to_data_source_lane_v.site_lane_id = report_lanes.lane_id
        JOIN (
               SELECT CAST(report_parameter_value AS NUMBER) class_id
                 FROM report_parameters
                WHERE report_parameters.report_parameter_id    = in_report_parameter_id
                  AND report_parameters.report_parameter_group = 'CLASS'
                  AND report_parameters.report_parameter_name  = 'CLASS'
             ) report_classes
          ON bin_data_value.bin_id = report_classes.class_id
        JOIN edr_rpt_tmp_inclusion_table
          ON TRUNC(bin_data_set.start_date_time) = TRUNC(edr_rpt_tmp_inclusion_table.date_time)
       WHERE site_to_data_source_lane_v.site_id = in_site_id
         AND bin_data.start_date_time     >= in_start_date_time - numtodsinterval(1, 'DAY')
         AND bin_data.start_date_time     <  in_end_date_time   + numtodsinterval(1, 'DAY')
         AND bin_data_set.start_date_time >= in_start_date_time
         AND bin_data_set.start_date_time <  in_end_date_time
         AND bin_data.bin_type            =  2
         AND bin_data.period_length       =  bin_period_length;
    END class_by_day_get_bin_data;In the above code I'm using the hard coded value 2 for bin type
    bin_data.bin_type            =  2But I dont want any hard coded number or string in the query.
    How could I replace it?
    I defined conatant value like below inside my package body where the actual procedure comes.But I'm not sure whether I have to declare it inside package body or inside the procedure.
    bin_type     CONSTANT NUMBER := 2;But it does't look for this value. So I'm not able to get desired value for the report .
    Thanks.
    Edited by: user10641405 on May 29, 2009 1:38 PM

    Declare the constant inside the procedure.
    PROCEDURE class_by_day_get_bin_data(in_report_parameter_id IN NUMBER,
                                        in_site_id             IN NUMBER,
                                        in_start_date_time     IN TIMESTAMP,
                                        in_end_date_time       IN TIMESTAMP,
                                        in_report_level_min    IN NUMBER,
                                        in_report_level_max    IN NUMBER) IS
      bin_period_length NUMBER(6, 0);
      v_bin_type     CONSTANT NUMBER := 2;
    BEGIN
      SELECT MAX(period_length)
        INTO bin_period_length
        FROM bin_data
        JOIN site_to_data_source_lane_v ON bin_data.data_source_id =
                                           site_to_data_source_lane_v.data_source_id
        JOIN bin_types ON bin_types.bin_type = bin_data.bin_type
       WHERE site_to_data_source_lane_v.site_id = in_site_id
         AND bin_data.start_date_time >=
             in_start_date_time - numtodsinterval(1, 'DAY')
         AND bin_data.start_date_time <
             in_end_date_time + numtodsinterval(1, 'DAY')
         AND bin_data.bin_type = v_bin_type
         AND bin_data.period_length <= 60;
      --Clear the edr_class_by_day_bin_data temporary table and populate it with the data for the requested
      --report.
      DELETE FROM edr_class_by_day_bin_data;
      INSERT INTO edr_class_by_day_bin_data
        (site_id,
         site_lane_id,
         site_direction_id,
         site_direction_name,
         bin_start_date_time,
         bin_end_date_time,
         bin_id,
         bin_value)
        SELECT site_to_data_source_lane_v.site_id,
               site_to_data_source_lane_v.site_lane_id,
               site_to_data_source_lane_v.site_direction_id,
               site_to_data_source_lane_v.site_direction_name,
               bin_data_set.start_date_time,
               bin_data_set.end_date_time,
               bin_data_value.bin_id,
               bin_data_value.bin_value
          FROM bin_data
          JOIN bin_data_set ON bin_data.bin_serial = bin_data_set.bin_serial
          JOIN bin_data_value ON bin_data_set.bin_data_set_serial =
                                 bin_data_value.bin_data_set_serial
          JOIN site_to_data_source_lane_v ON bin_data.data_source_id =
                                             site_to_data_source_lane_v.data_source_id
                                         AND bin_data_set.lane =
                                             site_to_data_source_lane_v.data_source_lane_id
          JOIN (SELECT CAST(report_parameter_value AS NUMBER) lane_id
                  FROM report_parameters
                 WHERE report_parameters.report_parameter_id =
                       in_report_parameter_id
                   AND report_parameters.report_parameter_group = 'LANE'
                   AND report_parameters.report_parameter_name = 'LANE') report_lanes ON site_to_data_source_lane_v.site_lane_id =
                                                                                         report_lanes.lane_id
          JOIN (SELECT CAST(report_parameter_value AS NUMBER) class_id
                  FROM report_parameters
                 WHERE report_parameters.report_parameter_id =
                       in_report_parameter_id
                   AND report_parameters.report_parameter_group = 'CLASS'
                   AND report_parameters.report_parameter_name = 'CLASS') report_classes ON bin_data_value.bin_id =
                                                                                            report_classes.class_id
          JOIN edr_rpt_tmp_inclusion_table ON TRUNC(bin_data_set.start_date_time) =
                                              TRUNC(edr_rpt_tmp_inclusion_table.date_time)
         WHERE site_to_data_source_lane_v.site_id = in_site_id
           AND bin_data.start_date_time >=
               in_start_date_time - numtodsinterval(1, 'DAY')
           AND bin_data.start_date_time <
               in_end_date_time + numtodsinterval(1, 'DAY')
           AND bin_data_set.start_date_time >= in_start_date_time
           AND bin_data_set.start_date_time < in_end_date_time
           AND bin_data.bin_type = v_bin_type
           AND bin_data.period_length = bin_period_length;
    END class_by_day_get_bin_data;

  • How to migrate SQL serveer table-valued functions into Oracle 10g

    hi ,
    i'm trying to migrate from SQL server to Oracle. There are some Table_valued functions ( Function that returns table). while migrating using SQL Developer it uses cursor for every table query. is this is the only solution to migrate functions returning table? This tables contains more than LAKH of records? so if there any other solution on this please reply. the sample code is bellow.
    CREATE function FU_AIG_S_GET_LOG
    returns TABLE
    as
    RETURN     
    SELECT U_AIG.T_AIG_LOG.AIG_LOG_NB_IDLOG,
    U_AIG.T_AIG_LOG.AIG_LOG_NB_EVTSUIVI,
    U_AIG.T_AIG_LOG.AIG_LOG_NB_CODELOG,
    U_AIG.T_AIG_LOG.AIG_LOG_DT_CREATION,
    U_AIG.T_AIG_LOG.AIG_LOG_CL_XMLEVT,
    U_AIG.T_AIG_TYPELOG.AIG_TYPELOG_VC_NOMLOG
    FROM U_AIG.T_AIG_LOG INNER JOIN U_AIG.T_AIG_TYPELOG
              ON U_AIG.T_AIG_LOG.AIG_LOG_NB_CODELOG =
    U_AIG.T_AIG_TYPELOG.AIG_TYPELOG_NB_CODELOG
    WHERE AIG_LOG_NB_LU = 0;
    thanks
    sush
    Message was edited by:
    user610355
    Message was edited by:
    user610355

    I don't think there's good work around over that. Mysql .sql file syntax is a little different from Oracle. Especially the DDLs.
    Unless you are willing to blindly run the .sql file and fix the one failed manually.

  • How to use Special Characters in CONCAT function or another form with Xquer

    Hello everyone
    I'm using PS3 OEPE within message flow (proxy)and I'm using Xquery.
    I'm using the CONCAT function, but this does not allow me to concatenate special characters not allowed, for example:
    I want to concatenate these strings:
    String1 = “&amp;lt;get-person&amp;gt;&amp;lt;id-person&amp;;gt;”
    String2 = “123”
    String3 = “&amp;lt;/id-person&amp;;gt; &amp;lt;/get-person&amp;gt;”
    I want to represent characters regex. It means no XML characters
    Someone knows some way, any function that allows me to concatenate in OSB these values with Xquery?
    Edited by: chromosoma on Sep 5, 2012 5:59 PM

    Hi,
    It seems to me you're doing things in the most complicated way possible...
    Firstly, you should use codepoints-to-string not the reverse... Secondly, the function work with decimals, not hexa
    http://www.xqueryfunctions.com/xq/fn_codepoints-to-string.html
    http://www.xqueryfunctions.com/xq/fn_string-to-codepoints.html
    This works...
    concat(codepoints-to-string(38),'lt',codepoints-to-string(59),'get-person')But this also works... Note that I've inserted a space between the &amp; and the lt so the forum formatting can show it...
    let
    $String1 := "& lt;get-person& gt;& lt;id-person& gt;",
    $String2 := "123",
    $String3 := "& lt;/id-person& gt;& lt;/get-person& gt;"
    return
         concat($String1,$String2,$String3)And, finally this also works... So what's the reason for escaping &lt; and &gt; with &amp;lt and &amp;gt; and why codepoints?
    let
    $String1 := "<get-person><id-person>",
    $String2 := "123",
    $String3 := "</id-person></get-person>"
    return
         concat($String1,$String2,$String3)Cheers,
    Vlad

  • How do i compare each vector value to find  a match with curent value

    My select statement contain more that one value .So I strore it in vector .But currently it does not compare each value .So I dont know wrong .How to search entire vector and find the matching one.
    Below are the coding I used :
    <%String sql_query3 = "SELECT DISTINCT (ir_tran_typ) "+
                                              "  FROM intrcd ";
                               System.out.println("trans type"+sql_query3 );           
                                try{
                                    rset = db.execSQL(sql_query3);
                                catch(SQLException e) {
                                    System.err.println("Error in query - intrcd - transaction_main.jsp " +e +" sql " +sql_query3);
                                while(rset.next()){
                                    tran_cde = rset.getString("ir_tran_typ");
                                            tran_typ.addElement(rset.getString("ir_tran_typ"));
                                            System.out.println("trans type 34 "+tran_typ );%>
                                            <% }%>
                                          alert(obj.value);
                                  <%for(int i=0 ;i<tran_typ.size();i++){
                                     System.out.println("trans type 222  "+ tran_typ.size());
                                       tran_cde =tran_typ.elementAt(index).toString();%>
                                       <%System.out.println("trans type before "+ tran_cde);%> 
                                        eval(document.all.tran_cde.option
                                      if(D == <%=tran_cde%> ){
                                       <%System.out.println("trans type D"+ tran_cde);%>     
                                       <%String sql_query2 = "SELECT ir_rea_cde,ir_rea_desc"+
                                              "  FROM intrcd"+
                                              " WHERE ir_tran_typ = 'D' " +
                                                        " ORDER BY ir_rea_cde ";
                               System.out.println("query"+ sql_query2);           
                                try{
                                    rset = db.execSQL(sql_query2);
                                catch(SQLException e) {
                                    System.err.println("Error in query - emmast2 - transaction_main.jsp " +e +" sql " +sql_query2);
                                        index = 1;
                                while(rset.next()){
                                        rea_cde = rset.getString("ir_rea_cde");
                                        rea_desc =  rset.getString("ir_rea_desc");
                                       tran_typ.removeAllElements();
                                       }%>
                                  if( R == obj.value){
                                       alert(R)
                                      if(R== <%=tran_cde%> ){
                                       <%System.out.println("trans type R"+ tran_cde);%>     
                                       <% sql_query2 = "SELECT ir_rea_cde,ir_rea_desc"+
                                              "  FROM intrcd"+
                                              " WHERE ir_tran_typ = 'R' " +
                                                        " ORDER BY ir_rea_cde ";
                               System.out.println("query 2"+ sql_query2 );           
                                try{
                                    rset = db.execSQL(sql_query2);
                                catch(SQLException e) {
                                    System.err.println("Error in query - intrcd - transaction_main.jsp " +e +" sql " +sql_query2);
                                        index = 1;
                                while(rset.next()){
                                        rea_cde = rset.getString("ir_rea_cde");
                                        rea_desc =  rset.getString("ir_rea_desc");
                                       }%>
              <%}%>
                }

    Dude, your code is a MESS! Learn to use spacing and nicer indentation...
    My select statement contain more that one value .So I strore it in
    vector .But currently it does not compare each value .So I dont know
    wrong .How to search entire vector and find the matching one.What???? Can you please try and explain yourself again? What is it you are trying to do/achieve?

  • How can I output a digital value (0 or 1) directly with a VI on the RTSI-bus?

    The Device is a PCI-MIO-16XE10.
    Thanks.

    The RTSI bus is designed for sharing timing and control signals between boards. By timing and control we mean clock signals, digital triggers, etc. RTSI is not meant to pass I/O signals, even digital I/O signals. Thus, it is not possible to connect one of the digital I/O lines on your board to a RTSI line. A way to accomplish what you would like to do might be to toggle GPCTR0's Output and connect that signal to the RTSI bus. You would do this by configuring the counter to perform event counting and counting down from a specified number of pulses on the source pin and configuring the counter's output to toggle on terminal count. You could also configure the counter to perform pulse train generation or single pulse generation. To connect the output to the RTSI bus, yo
    u will need to call the Route Signal VI from the DAQ Calibration & Configuration Function Pallette with Signal Name set to RTSIn and Signal Source set to GPCTR0 Output.
    Regards,
    Erin

  • How do I strip special characters in SSRS for Lookup columns with Multiple Selections?

    Hello all,
    Please let me know if I am posting in the wrong location.
    I am building reports against my SharePoint List (actually a library).  1 of the columns I want to display in the report is a Lookup column that allows Multiple lookups.  Problem is that the SharePoint Web Service call GetListItems returns the values with the item id and ";#" combination.  For example:
    122;#Apple;#112;#Carrot
    but I need the following format:
    Apple, Carrot
    Following this great article posting - http://www.sharepointu.com/dwise/archive/2007/11/28/connecting-sql-reporting-services-to-a-sharepoint-list-redux.aspx
    I was able to drop the first part using the following code
    function GetNameFromSP(pFullID as string) as string
      dim strRet as string
      dim iPos as integer
      if pFullID = nothing then return ""
      if pFullID = "" then return ""
      iPos = Instr(pFullID, ";")
      if iPos < 1 then return pFullID
      return Mid(pFullID, iPos +2)
    end function
    But it does not replace the subsquent id references.
    Anyone done this before that can provide me tips?
    Thanks!
    Jeff Kozloff
    Project Manager, Solutions Team
    Bamboo Solutions
    http://www.bamboosolutions.com

    All,
    Here is the updated code that resolves my issue (a coworker of mine provided the following code):
    Function TrimMultiLookup(ByVal s As String) As String
            Dim combStr As String
            Dim array As String()
            Dim c As Integer
            combStr = String.Empty
            array = Split(s, ";#")
            Console.WriteLine(array.Length)
            For c = 1 To array.Length - 1 Step 2
                combStr += array(c) + ", "
            Next
            Return Left(combStr, combStr.Length - 2)
        End Function
    Jeff Kozloff
    Project Manager, Solutions Team
    Bamboo Solutions
    http://www.bamboosolutions.com

  • How to delete a row from a SQL Server CE Table with multiple JOINs?

    I want to delete a record from a SQL Server CE table.
    There are 3 tables scripts, options and results. I would like to remove a record from the results table. The where clause contains dynamic information which retrieved via other queries to different tables in the same database. These queries work fine and deliver
    the desired data.
    The Compact server is a clone of a remote table created using the sync framework. The same query to the remote table works fine.
    The error I get is:
    There was an error parsing the query. [ Token line number = 1,Token line offset = 10,Token in error = from ]
    The code that throws the exception is as follows:
    Dim connLoc As SqlCeConnection = New SqlCeConnection(My.Settings.ConnectionString)connLoc.Open()     Dim strDel As String = "Delete r from ResultsTable r inner join OptionsTable o ON o.TestName=r.TestName inner join ScriptTable c ON r.TestName=c.TestName WHERE r.TestName = '" & ds1Loc.Tables(0).Rows(0)(1) & "' AND [Index] = '" & lstIndex & "'"Dim cmdDel As SqlCeCommand = New SqlCeCommandcmdDel.CommandText = strDelcmdDel.Connection = connLoccmdDel.ExecuteNonQuery()
    The values held in ds1Loc.Tables(0).Rows(0)(1) and lstIndex are
    correct so should not be the problem.
    I also tried using parameterised queries
    Dim strDel As String = "Delete r from [ResultsTable] r inner join [OptionsTable] o ON o.TestName=r.TestName inner join [ScriptTable] c ON r.TestName=c.TestName WHERE r.TestName = @TestName AND [Index] = @lstIndex"
    Dim cmdDel As SqlCeCommand = New SqlCeCommand        cmdDel.CommandText = strDel       
    With cmdDel.Parameters           
    .Add(New SqlCeParameter("@TestName", ds1Loc.Tables(0).Rows(0)(1)))           
    .Add(New SqlCeParameter("@lstIndex", lstIndex))       
    End With 
    cmdDel.Connection = connLoc        cmdDel.ExecuteNonQuery()
    I have tried replacing the "=" with "IN" in the the WHERE clause but this has not worked.
    Is it the join that is causing the problem? I can do a select with the same search criteria and joins from the same database.
    Also this query works with SQL Server. Is it perhaps that SQL CE does not support the Delete function the same as SQL Server 2008? I have been looking at this for a while now and cannot find the source of the error. Any help would be greatly appreciated.

    Hello,
    In SQL Server Compact, we can use join in FROM clause. The DELETE statement fail may be caused by the FOREIGN KEY constraint.
    Please refer to:
    DELETE (SQL Server Compact)
    FROM Clause (SQL Server Compact)
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

Maybe you are looking for

  • How to start with OA Framewok.

    Hi All, Can you please let me know how to start with OAF and which software needs to install to start with. Also, please send me the document if you have for OAF. Thanks in Advance, Amol

  • IPhoto Places map home button does not show all photo locations in one extent

    I recently started populating location information for my photos in iPhoto 2011. Some are pre-loaded from my iPhone, but I also manually added locations for other photos/events. Now I have locations assigned both in the U.S. and in Europe, but when I

  • Deactivate country from sales/purchase tax determination

    Hello, We are facing a typical problem in tax, We have a requiement to deactivate tax for some countries and these countries are not relevant for any sale/purchase tax. For that, we removed the country from define tax determination rules in sales & d

  • Make configuration not changeable in BANF in 4.6c system

    Hi ABAP, once again i stumbled over a masterpiece of SAP standard. In former times SAP didnt allow to change configuration in BANF or pruchase order when those were referenced to a configured order. With release 4.6C they changed this behaviour and m

  • Youtube Music Videos Not Available on iOS?

    Hello, I have an iPad and an iPhone, and none of the VEVO youtube videos or music videos in general can be played on the youtube app. It will say that this movie could not be played. Also, if you try to watch them through the browser version of youtu