Passing the same input parameter twise in execute sql task

Hi All, I want to insert some values to 3 different tables in sql server. Execute sql task is used to populate three tables. Here is the sql statement.
DECLARE @Dt AS DATE
SET @Dt = ?
INSERT INTO TABLE1 SELECT ?, COL2, COL3 FROM TABLE_A
INSERT INTO TABLE2 SELECT ?, COL2, COL3 FROM TABLE_B
Input parameter is mapped as follows :
Variable name : User::EffectiveDate
Direction : Input Data Type :
Date Parameter name :0
Parameter size :-1
User::EffectiveDate is datetime variable.
When the package is executed, it throws an error.
[Execute SQL Task] Error: Executing the query " " failed with the following error: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.". Possible failure reasons: Problems
with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. I am not sure what I am doing wrong here. If anyone could point me to the right direction, I really appreciate.
Thanks
shamen

To expand on the other answers.
Your SQL command
DECLARE @Dt AS DATE
SET @Dt = ?
INSERT INTO TABLE1 SELECT ?, COL2, COL3 FROM TABLE_A
INSERT INTO TABLE2 SELECT ?, COL2, COL3 FROM TABLE_B
It using 3 input variables.  I assume you didn't pass 3 variables and you want @DT to be column 1 in each.  In that case you would use:
DECLARE @Dt AS DATE
SET @Dt = ?
INSERT INTO TABLE1 SELECT @Dt, COL2, COL3 FROM TABLE_A
INSERT INTO TABLE2 SELECT @Dt, COL2, COL3 FROM TABLE_B

Similar Messages

  • How to use a parameter in an Execute SQL Tasks in SSDT executed against Netezza

    Good Evening,
    How can I pass a parameter in an Execute SQL Tasks in SSDT executed against Netezza?  Below are my settings and error message.
    [Execute SQL Task] Error: Executing the query ""TRUNCATE TABLE" ?"_POC..JOHN_TEST"" failed with the following error: "Syntax error or access violation". Possible failure reasons: Problems with the query, "ResultSet"
    property not set correctly, parameters not set correctly, or connection not established correctly.
    Thank you in advance for your assistance.
    Brett

    Hi Baloun,
    Based on my further research, just as you said, we cannot directly use table name as a variable.
    To fix this issue, we can change the SQL command in the SQLStatement property as below:
    declare @sql varchar(100)
    set @sql = 'TRUNCATE TABLE ' + ? +'_POC..JOHN_TEST'
    exec(@sql)
    go
    The Parameter Mapping pane use the former settings in your picture.
    Reference:
    http://www.bidn.com/blogs/kylewalker/ssis/2063/parameters-don-t-always-work-in-your-execute-sql-task
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • SSIS: How to use one Variable as Input and Output Parameter in an Execute SQL Task

    Hello,
    i need your help,I'm working on this issue since yesterday and have no idea how to deal with it.
    As I already said in the tilte i want to start a stored procedure via a Execute SQL Task which has around 15 prameters. 10 of these should be used as input AND output value.
    As an example:
    i have three  Variable:
    var1    int        2
    var2    int     100
    var3    int     200
    the stroed procedure:
       sp_test
          @var1 int
          @var2 int output
          @var3 int output
       AS
       BEGIN
            SET @var2 = @var2 * @var1
            SET @var3 = @var3 + @var1
       END
    So in the Execute SQL Task i call the Stored Procedure as follwos:
        Exec sp_test  @var1 = ?, @var2 = ? output, @var3 = ? output
    (I use an OLE DB Connection)
    The parameter mapping is as follows:
    User::Var1        input                   numeric              0                 -1
    User::Var2        input/output         numeric              1                 -1
    User::Var3        input/output         numeric              2                 -1
    Now my problem. If i set  Var2 and Var3 as Input parameter the values are still the same after running the package. If i set them to a output value the are both Null because the procedure doesnt get any values.
    I already tried to list them a second time - like
        User::Var2        input                  numeric              1                 -1
        User::Var2        output                 numeric              1                 -1
    or i use a new variable
        User::Var2                  input                  numeric              1                 -1
        User::Var2Return        output                 numeric              1                 -1
    but i alwas get the error
    "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done."
    Has anybody an idea how I can solve this problem?
    Thanks a lot.
    Kind Regards,
    Alice

    Hi Alain,
    thx for your answer.
    I have around 15 procedures called one after the other to calculated and modify my values. Each procedure is responsible for an other but overlapping set of variables. So i thought it would be a good idea to call them one after the other with the needed variables via a execute sql task.
    So if i use a result set, how i get my stored procedure to return 10 values? I would have to use a Function instead of a procedure, wouldn't i?
    As if i have 15 procedures this would be a lot of work.
    But thanks a lot for the idea. I think an other idea would be to create one function which calls all stored procedures and returns all the calculated values as a result set, wouldn't it?.
    Kind Regards.
    Alice

  • HELP: SSIS 2012 - Execute SQL Task with resultset to populate user variables produces DBNull error

    I am experiencing an unexplainable behavior with the Execute SQL Task control in SSIS 2012. The following is a description of how to simulate
    the issue I will attempt to describe:
    1. Create a package and add two variables User::varTest1 and User::varTest2 both of String type with default value of "Select GetDate()"
    for each, have shown this to not matter as the same behavior occurs when using a fixed string value or empty string value.
    2. Add a new Execute SQL Task to the control flow.
    3. Configure an OLE DB connection.
    4. Set SQLSourceType = "Direct Input"
    5. Set the ResultSet property of the task to "Single Row"
    6. In the ResultSet tab add two results as follows: 
    Result Name: returnvalue1, Variable Name: User::varTest1
    Result Name: returnvalue2, Variable Name: User::varTest2
    7. Set an expression for the SqlStatementSource property with a string value of "Select 'Test' returnvalue1, 'Testing' returnvalue2'"
    The idea is that the source would be dynamically set in order to run a t-sql statement which would have dynamic values for database name
    or object that would be created at runtime and then executed to set the user variable values from its resultset. Instead what occurs is that a DBNull error occurs.
    I am not sure if anyone else has experienced this behavior performing similiar actions with the Execute SQL Task or not. Any help would be
    appreciated. The exact message is as follows:
    [Execute SQL Task] Error: An error occurred while assigning a value to variable "varRestoreScript": "The type of the value
    (DBNull) being assigned to variable "User::varRestoreScript" differs from the current variable type (String). Variables may not change type during execution. Variable types are strict, except for variables of type Object.
    User::varRestoreScript is the first return value. And even with the a dummy select the same result occurs. I have narrowed the issue down
    to the T-SQL Statement structure itself. 
    The following works just fine within the execute sql task control as long as no resultset is configured for return:
    "Declare @dynamicSQL nvarchar(max)
    Select @dynamicSQL = name 
    From sys.databases 
    Where name = 'master'
    Select atest_var1=@dynamicSQL, atest_var2='static'"
    I have tried various iterations of the script above with no success. However, if I use the following derivative of it the task completes
    successfully and variables are set as expected.  This will not work for my scenario however as I need to dynamically build a string spanning multiple resultsets to build one of the variable values.
    "Select atest_var1=name, atest_var2='static'
    From sys.databases
    Where name = 'master'
    I have a sample package which can reproduce this issue using the above code.  You can get to that through the post on www.sqlservercentral.com/Forums/Topic1582670-364-1.aspx
    Scott

    Arthur,  the query when executed doesn't return a null value for the @dynamicSQL variable.  It returns "master" as a string value.  Even the following fails which implements that suggestion:
    Declare @dynamicSQL as nvarchar(max)
    Select @dynamicSQL = name
    From master.sys.databases 
    Where name = 'master' -- (or any other DB name)
    I believe I have found the cause of the issue.  It is datatype and size related.  The above script will properly set the variables in the resultset as long as you don't use nvarchar(max) or varchar(max).  This makes the maximum data size for
    a String variable 4000 characters whether unicode or non-unicode typed.

  • How to pass a parameter into execute sql task and later use it into dataflow task?

    i am in a situation, where i have a logging table in which i have a primary key called ETL_log_ID which is an identity column and acts as a foreign key for various fact table and dimension tables which are populated using SSIS packages. Now i wanna use the
    ETL_log_ID as a parameter in the execute sql task which populates the log table and pass the same value in the data flow task which populates the facts and dimension. Can you let me know how to pass the parameter in a step by step procedure.
    Thanks,
    Nikhil
      

    Nikhil,
    You can check the following :
    http://www.programmersedge.com/post/2013/03/05/ssis-execute-sql-task-mapping-parameters-and-result-sets.aspx
    http://stackoverflow.com/questions/7610491/how-to-pass-variable-as-a-parameter-in-execute-sql-task-ssis
    Regarding the usage in Dataflow task, Can you elaborate on that a little?
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • Same parameter multiple times in Execute SQL Task

    Hi all,
    i have a fairly long parametrized query that needs to be run within an Execute SQL task. It has only 2 unique parameters, but these need to be used multiple within that query. The connection is OLEDB.
    ill simplify my requirement by making up an arbitrary T-SQL "where" clause that will illustrate what i need:
    where
    x = @param1
    and y = @param1
    and z > @param2
    and w > @param2
    moving this into an SSIS execute SQL task will require the following:
    where
    x = ?
    and y = ?
    and z > ?
    and w > ?
    I know i need to specify 4 parameters and remap the same variables multiple times.. like so:
    User:aram1   -> 0
    User:aram1   -> 1
    User:aram2   -> 2
    User:aram2   -> 3
    isnt there a better way? i ask this because in my real task i have 2 params, each is reused 4 and 5 times respectively and it seems stupid to repeat params like this.

    @ _proffy_
    you can pass the same variable or value as parameter multiple times sql task.
    follow the steps below.
    1) type the sql query with parameters in SQL statement tab of sql task editor
    2. in the parameter mapping, select the variables.
      you can select the same variables more than once.
     give the parameter name as 0,1,2,3..... based on variables you require.
    do not forget to chooose the appropriate Datatype.
    ex:
    select * from table1
    where a= ?
    and b=?
    and c= ?
    parameters:
    Var name               param Name
    user::Var1               0   
    user::Var1               1
    user::Var2               2
    so the value becomes a=var1, b= var1 and c= var2

  • ABAP program to take input parameter from variant, execute KSB1 and export

    Hi Friends,
    My client asking  change request in CO
    The Change request is "ABAP program to take input parameter from variant, execute KSB1 and export the output into an excel sheet and park the document in a designated location"
    Pls let me know  actually i am a FICO consultant what i can do in this change request
    Thanks,
    Santi

    Hi
    First I dont you would need to create a ABAP to generate the report in Excel.
    You can look at this option. Execute the report Go to->Change Layout, Click on the view option, On the Preferred View Select Microsoft Excel, Save the layout, provide a layout name with /XYZ.
    Now when you want to execute KSB1 with excel, just execute KSB1 with /XYZ layout, it would open in Excel, export to which ever location you want.
    Or just simply save the report as Excel using the Excel button on the tool bar.
    Regards,
    Suraj

  • How do I pass the exact datetime parameter in a procedure.

    How do I pass the exact datetime parameter in a procedure.
    Hi All,
    I have a datetime problem which is driving me crazy.
    I need pass a datetime field as a parameter in an oracle procedure exactly as below with timestamp.
    Example: '6/01/2005 5:25:24 AM'
    SQL > exec myprod(‘value1’,’value2’,’value3’, to_date('6/01/2005 5:25:24 AM','dd-mm-yyyy hh24:mi:ss'));
    I get an error “INVALID MONTH”
    Next Changed to_date to to_char
    SQL > exec myprod(‘value1’,’value2’,’value3’, to_char('6/01/2005 5:25:24 AM','dd-mm-yyyy hh24:mi:ss'));
    I get a different error, “INVALID NUMBER”
    Next pass the datetime as it is.
    SQL > exec myprod(‘value1’,’value2’,’value3’, '6/01/2005 5:25:24 AM');
    I get an error “INVALID MONTH”
    Here is the my procedure.
    CREATE OR REPLACE PROCEDURE myprod (
    p_value1 varchar2,
    p_value2 varchar2,
    p_value3 varchar2 ,
    p_value4 date )
    IS
    filehandler UTL_FILE.FILE_TYPE;
    va_currentdate DATE;
    BEGIN
    SELECT sysdate
         INTO va_currentdate
    FROM dual;
    END;
    Do you know any solutions for this problem.
    Thanks

    What is your NLS_DATE_FORMAT value?
    There seem to be some implicit data conversions in your arguments.
    SQL> select parameter,value from nls_session_parameters where parameter like '%DATE%';
    PARAMETER                                                    VALUE
    NLS_DATE_FORMAT                                              YYYY-MM-DD HH24:MI:SS
    NLS_DATE_LANGUAGE                                            AMERICAN
    SQL> select to_date('6/01/2005 5:25:24 AM','dd-mm-yyyy hh24:mi:ss') from dual;
    select to_date('6/01/2005 5:25:24 AM','dd-mm-yyyy hh24:mi:ss') from dual
    ERROR at line 1:
    ORA-01830: date format picture ends before converting entire input string
    SQL> select to_date('6/01/2005 5:25:24 AM','dd-mm-yyyy hh:mi:ss am') from dual;
    TO_DATE('6/01/20055
    2005-01-06 05:25:24

  • UDF has 2 different results with the same input

    Hello,
    I have two mappings of the ORDERS idoc.  In both mappings I use the following UDF function to create a long string output:
    public void matConfig(String[] CHAR, String[] CHARTXT, String[] VALUE, String[] VALUETXT, String[] POSEX, String[] LINE, ResultList result, Container container) throws StreamTransformationException{
    int i, j;
    String crlf = "\r\n";
    StringBuffer matConfig;
    j = 0;
    for (i = 0; i < POSEX.length; i++) {
      matConfig = new StringBuffer();
      while (LINE.length > j && Integer.parseInt(POSEX<i>) == Integer.parseInt(LINE[j])) {
        if (matConfig.length() > 0)
          matConfig.append(crlf);
        if ((CHARTXT[j].length() > 0) || (CHAR[j].length() > 0)) {
          if (CHARTXT[j].length() > 0)
            matConfig.append(CHARTXT[j]);
          else
            matConfig.append(CHAR[j]);
          matConfig.append(" : ");
          if (VALUETXT<i>.length() > 0)
            matConfig.append(VALUETXT[j]);
          else
            matConfig.append(VALUE[j]);
          j++;        
      result.addValue(matConfig.toString());     
      result.addContextChange();
    I have checked the queues of all the inbound fields and the values match exactly but in one mapping the output in the queue for this UDF looks like this:
    Correct Result:
    Thickness of Glass: 20 Height: 10 Width: 5 Length: 18
    Thickness of Glass: 10 Height: 15 Width: 8 Length: 14
    Bad Result:
    Thickness of Glass: 20
    Width: 5
    How can the same input using the same java code (cut and pasted to make sure it matched) return 2 different values.  I have verified that they both use the same Imports as well.  The bad one is part of a function library while the good one is a local function. 
    Any ideas?
    Thanks,
    Matt
    Edited by: Matthew Herbert on May 29, 2010 12:09 AM

    You make a good point Stefan but unfortunately I already checked that.  I have even copied the mapping (right click copy) and pasted it from the working Mapping to the bad Map (Paste) to make sure the context values were all the same.
    I also opened all the queues and compared the values in each.  All values match exactly except for the result(out) queue.
    In both tests I am using the same IDOC XML file. 
    These are the only differences I see.
    1.  The IDOC is exactly the same as far as I can tell but they come from two different source SWCV.  SAP APPL 4.7 and Steelcase_Procurement (ECC 6.0). 
    2.  The working map uses a local UDF.  The bad map calls the UDF from a Function Group.  Is there a Java version difference between the two?
    A better sample of the result queues look like this:
    Correct Result:
    Thickness of Glass: 20
    Height: 10
    Width: 5
    Length: 18
    Thickness of Glass: 10
    Height: 15
    Width: 8
    Length: 14
    Bad Result:
    Thickness of Glass: 20
    <null>
    <null>
    <null>
    Width: 5
    <null>
    <null>
    <null>
    I took this chance to redesign my Variant Config output to separate the characteristics/values, but I'm still bothered that I was unable to determine what would cause the differing values.
    Any ideas?
    Thanks,
    Matt

  • To enter planing data in the same input screen in the same time ?

    Dear Consultants,
    I have prepared a general input screen in BPS.
    Is it possiple to enter planing data in the same input screen in the same time ?
    Or does it lock the all infocube while someone entering plan data?
    Regards
    Mehmet

    Hi Mehmet,
    1.To control lock mechanism(Data Slicing) via auhorization is not possible, as it is different concept.
    2. Yes,it is  possible to enter plan data in the same time in to the same cube with the same data input screen, if the characterstic company is at header level, in the layout.
    ****Pls assign points if info is useful***
    Reagrds
    CSM Reddy

  • SQL Server 2008 Execute SQL Task parameter problem

    hi, guys
    i create a very simply package which only Execute SQL task, set the properties as:
    the testing table structure:
    create table t(
    idx int,
    cname varchar(60)
    Execute SQL Task setting:
    [genaral]
    ResultSet: None
    ConnectionType: Ado.net
    connection:LocalHost.APR11.sa1
    SQLsourceType:Direct input
    SQLStatement:delete from t where idx=?
    [parameter mapping]
    variable name: user::idx
    direction: input
    data type: Int32
    parameter name:NewParameterName
    parameter size:-1
    i hardcode the idx=1, but get error:
    SSIS package "test.dtsx" starting.
    Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query "delete from t where idx=?" failed with the following error: "Parameter name is unrecognized.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
    Task failed: Execute SQL Task
    SSIS package "test.dtsx" finished: Success.
    help me please.
    Regards.

    Hello,
    Here you go
    http://decipherinfosys.wordpress.com/2008/03/26/running-parameterized-sql-commands-using-the-execute-sql-task-i/
    http://technet.microsoft.com/en-us/library/ms140355.aspx
    if you use ADO.NET then the way Execute SQL task take parameter is different then "?".... you have to use @paramter.. Please check the above link
    Thanks
    http://sqlage.blogspot.com/

  • Execute SQL Task with Parameter - from DB2 to SQL Server

    I am pulling data from DB2 to SQL Server.
    1st Execute SQL task runs the following against DB2:
    SELECT TIMESTAMP(CHAR(CURRENT_DATE - (DAY(CURRENT_DATE)-1) DAYS - 1 MONTH)) as START_MONTH
    FROM SYSIBM.SYSDUMMY1;
    I'm storing it as a Result Set.
    Next I have a Data Flow Task.  This pulls data from DB2 where the date matches the parameter.
    FROM SCHEMA.TABLE t
    WHERE DATE_TIME_COLUMN= ?
    This works fine. Guessing, because the parameter source is DB2 and the Data Flow source is DB2.
    The problem is, I want to remove existing data for the same date in the SQL table.  IE, if I'm pulling March 2014 data from DB2, I want to be sure there is no March 2014 data in the SQL table.  The main use is for re-runs.
    So, I added another Execute SQL task after the first one that assigns the variable, and before the Data Flow Task. This runs the following statement against SQL Server:
    DELETE FROM
    database.dbo.table
    WHERE DATE_TIME_FIELD >= ?
    The package fails at the new Execute SQL Task with the following error message:
    Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query "DELETE FROM
    SBO.dbo.tblHE_MSP_FEE_BUCKETS
    WHERE T..." failed with the following error: "Parameter name is unrecognized.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established
    correctly.
    Task failed: Execute SQL Task
    SSIS package "Load_MSP_Fee_Buckets_SQL.dtsx" finished: Success.
    The program '[14240] Load_MSP_Fee_Buckets_SQL.dtsx: DTS' has exited with code 0 (0x0).
    I am assuming this is something to do with the Parameter source being DB2, and trying to use against SQL?
    Any suggestions on how to make this work??
    Thanks,
    -Al H

    Parameter name is unrecognized
    is the key, how come DB2 is related if it runs against SQL Server
    What I think is happening you do not use the OLEDB connection to SQL Server.
    Likewise, if it is ADO then the query needs to be
    DELETE FROM
    database.dbo.table
    WHERE DATE_TIME_FIELD >= @MyDate
    Arthur My Blog

  • Pass variable into execute sql task

    hi
    i want to execute my stored proc, in ssis package . i have 2 parameter, so i need pass values from another table one by one.
    i need to execute stored proc for each from another table, by passing values
    how to do it

    hi
    i want to execute my stored proc, in ssis package . i have 2 parameter, so i need pass values from another table one by one.
    i need to execute stored proc for each from another table, by passing values
    how to do it
    You can do it as follows
    1. Add a variable of type object in SSIS
    2. Add a execute sql task with query as
    SELECT field1,field2
    FROM Table
    Set resultset option as Full resultset and in resultset tab map the resultset to object variable.
    3. Add a ForEach loop with ADO enumerator and map it to object variable. Inside loop add two variable to get each iterative values for field1 and field2
    4. Inside loop add a execute sql task and set command as
    EXEC ProcedureName ?,?
    Map the parameters to two variables created inside the loop.
    On executing package the procedure gets executed for each record in the table.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Execute SQL Task: Cannot assign value to the variable

    DECLARE
    @PartitionDate varchar(8),
    @Date int
    SELECT
    @PartitionDate = MAX(PartitionDate)
    FROM PartitionLog (NOLOCK)
    SELECT
    @Date = MIN(DateKey)
    FROM DimDate WHERE CAST(DateKey as varchar(8)) > @PartitionDate
    IF NOT CONVERT(varchar(8),GETDATE(),112) = @PartitionDate
    SELECT @PartitionDate = CAST(DateKey as varchar(8))
    FROM DimDate (NOLOCK)
    WHERE DateKey = @Date
    SELECT @PartitionDate AS PartitionDate ,
    'IISDW_' + @PartitionDate AS PartitionName
    GO
    I have the above SQL stmt in the excute SQL task and declared 2 variable "PartitionDate" and "PartitionName" in the Package, the RESULT SET I hav given as "Single Row" and when I run the ETL I get the error as 
    [Execute SQL Task] Error: An error occurred while assigning a value to variable "PartitionDate": "Exception from HRESULT: 0xC0015005".

    Does your package variable datatype match the datatype of your parameter?
    Is your Package variable assigned to the parameter in the task editor?
    And does the parameter name in the task editor match the parameter names in your stored procedure?

  • [Execute SQL Task] Error: Executing the query "DECLARE_@XMLA nvarchar(3000) ,__@DateSerial nvarch..." failed with the following error: "Incorrect syntax near '-'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly,

    Hi
    DECLARE @XMLA nvarchar(3000)
    , @DateSerial nvarchar(35);
    -- Change date to format YYYYMMDDHHMMSS
    SET @DateSerial = CAST(GETDATE() AS DATE);
    --SELECT @DateSerial
    Set @XMLA = 
    N' <Batch xmlns="http://schemas.microsoft.com/analysis services/2003/engine">
     <ErrorConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2"
    xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200"
    xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200">
    <KeyErrorLimit>-1</KeyErrorLimit>
    <KeyNotFound>IgnoreError</KeyNotFound>
    <NullKeyNotAllowed>IgnoreError</NullKeyNotAllowed>
     </ErrorConfiguration>
     <Parallel>
    <Process xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2"
    xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200"
    xmlns:ddl300="http://schemas.microsoft.com/analysisservices/2011/engine/300" xmlns:ddl300_300="http://schemas.microsoft.com/analysisservices/2011/engine/300/300">
     <Object>
     <DatabaseID>MultidimensionalProject5</DatabaseID>
     <CubeID>giri</CubeID>
     <MeasureGroupID>Fact Internet Sales</MeasureGroupID>
     </Object>
     <Type>ProcessFull</Type>
     <WriteBackTableCreation>UseExisting</WriteBackTableCreation>
     </Process>
      </Parallel>
    </Batch>';
    EXEC (@XMLA) At SHALL-PCAdventureWorksDw ;
     iam executive the    query when iam getting below error.
      [Execute SQL Task] Error: Executing the query "DECLARE
    @XMLA nvarchar(3000)
    , @DateSerial nvarch..." failed with the following error: "Incorrect syntax near '-'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set
    correctly, or connection not established correctly. 
     how to solve this error;
     please help me

    What are you trying to do? What sort of data source is  SHALL-PCAdventureWorksDw?
    When you use EXEC() AT, I would execpt to see an SQL string to be passed to EXEC(), but you are passing an XML string????
    If you explain why you think this would work in the first place, maybe we can help you.
    Erland Sommarskog, SQL Server MVP, [email protected]

Maybe you are looking for

  • How can I access my iCloud account on the web from my phone

    how can I access my iCloud account on the web from my phone iPhone 5 iOS 8.3 I have iCloud turned on, location services on, find my phone works but when I try to access iCloud via Safari on the phone it takes me to a page Apple.com, iCloud then three

  • In ical can I sync iCloud with on my mac

    In both Lion and ML when in calander I have "on my Mac" and "iCloud"  If if have all my contacts they are duplicated.  Some programs use my ical and others need my icloud contacts.  Can I syn them so I do not get duplicates?

  • Display XML in DWMX2004 page

    I've been able to create a valid XML doc. I wanted to display the data inside a DWMX2004 templated page. Tried the standard things on WC3 and other XML books and resources and did not have any luck. (Most of it is over my head, parsers, js and the li

  • Pkgadd problem with reloc as a cpio file

    I have a package that we create and distribute (it's a product we have been shipping for a number of years). After creating the package with pkgm, I put the contents of the reloc into a cpio file named "reloc" (I don't recall where I read about doing

  • DVR620KU vcr to dvd recording

    After following the directions to record from vcr tape to dvd I get a red circle with a slash across it.  I've tried a different dvd disc (+R8x and -R16x).  I don't know why it can't record.