Tuesday, August 27, 2013

SQL Server - SSIS Error: "Syntax error, permission violation, or other nonspecific error". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

I got this error in an Execute SQL Task.

"Syntax error, permission violation, or other nonspecific error". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

This time the issue was that I had commented out one line in the Update statement.

This was the original statement (I've simplified it in order to make this post simpler):


update
  Table1 
set
    Table1.qtyavail=Table2.qtyavail,
    --Table1.price=Table2.price,
    Table1.Weight=Table2.Weight
from
   Table1 
join Table2
       On Table1.ID = Table2.ID

I had to delete the commented out line to be able to resolve the issue:

update
  Table1 
set
    Table1.qtyavail=Table2.qtyavail,
    Table1.Weight=Table2.Weight
from
   Table1 
join Table2

       On Table1.ID = Table2.ID

2 comments:

  1. I have the same error, I've written a cursor and I declared my variable but it marks error.
    Can you help me?

    ReplyDelete
    Replies
    1. Sounds like a completely different issue. What's your exact SQL?

      Delete