The argument has mismatched quotes - SSIS


  • Dear frnds,


    When I try to execute SSIS package from SQL server, I am getting following error



    -The argument has mismatched quotes


    The Package like this...  The package will accept a query and execute it.


    master..xp_cmdshell  N'dtexec /sq pakge1 /ser SerName  /SET \package.Variables[User::SourceQuery].Properties[Value];"\"select  data_load_id, POLICYNUM, getdate() as  INCEPTDATE ""'



    It will work fine if we input one line query...other wise it will throw “The argument has mismatched quotes"


    ie if query have more than one line...  


    1)  select data_load_id, POLICYNUM, getdate() as INCEPTDATE   - it will  excute

     2)   select data_load_id, POLICYNUM,

                          getdate() as INCEPTDATE               -  in this it will  fail


    Please help me on this….

    Friday, October 1, 2010 1:22 PM

All replies

  • Is this the full query??? table name is not present?


    Friday, October 1, 2010 3:28 PM
  • Ok now I get it may be... Are you concatenating this variable with table name or so?
    Friday, October 1, 2010 3:40 PM
  • Yes, I have also faced such behavior and would recommend not to use enter key to split the sql command into multiple lines. It is better to have the sql command into a variable and then use the variable in place of sql command.
    Nitesh Rai- Please mark the post as answered if it answers your question
    Friday, October 1, 2010 3:52 PM
  • Nitesh,

    I am using variable in place of sql statement..... then also i getting same error.   can you pls help me on this ? any other way to overcome this....


    Friday, October 1, 2010 5:01 PM


    Ankur , it is not ful quey.


    Friday, October 1, 2010 5:09 PM