SSIS package with Execute SQL task Fails on command that runs successfully on SQL Server Management Studio

 

During our execution of one of SSIS that has multiple tasks we have encountered a case of one task fails that runs SQL server command , the weird thing was this tasks executes with no errors on SQL server management studio but fails on SSIS!

1

After reviewing the SQL commands for this tasks , it only inserts records on database ,and when we execute the same command on SQL management studio it runs successfully

4

 

Untitled

After trail and error we reached to the root cause of the issue which was the “$(“  in the text value

The insert statement looks like

INSERT Table Name(Column name)
VALUES ( N’J.B. BODA & CO. PVT. LTD. NT$(TAIWAN DOLLAR)’)

adding a space between the dollar sign and the bracket will solve the issue Smile

 

2

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.