Invalid Cursor state when trying to update SQL

More
10 months 1 week ago #25642 by prashant
Hi Team,
I seem to be going nuts , I have simple command in my transformation , MasterTaskID is the primary key which has been selected as update key also

UPDATE target
SET target.freq_e1 = source.freq_e1,
    target.freq_e2 = source.freq_e2
FROM [items].[basecamp].[checklist_master] AS target
JOIN (VALUES (?, ?, ?)) AS source (MasterTaskID, freq_e1, freq_e2)
    ON target.MasterTaskID = source.MasterTaskID;


I consistently get Invalid cursor state 24000

When I try to do in manually  in SQL editor window, it works fine 


UPDATE target SET target.freq_e1 = source.freq_e1, target.freq_e2 = source.freq_e2 FROM [items].[basecamp].[checklist_master] AS target JOIN (VALUES (1011,'appa', 'bappa')) AS source (MasterTaskID, freq_e1, freq_e2) ON target.MasterTaskID = source.MasterTaskID;

Please Log in or Create an account to join the conversation.

More
10 months 1 week ago - 8 months 1 week ago #25643 by prashant
same error for default update
Code:
update [items].[basecamp].[checklist_master] SET "freq_e1"=?,"freq_e2"=?  Where "MasterTaskID"=?
Last edit: 8 months 1 week ago by admin.
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

More
10 months 1 week ago #25644 by admin
please try using set sql nocount on

We will update documentation to make life of everyone easier 

Mike
ETL Architect

Please Log in or Create an account to join the conversation.

More
10 months 1 week ago #25645 by prashant
it works !!

omg , that's almost 45 minutes of my life gone on trying to sort this.

Thanks a lot for quick revert !
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Read more
Marketing
Set of techniques which have for object the commercial strategy and in particular the market study.
Google
Accept
Decline
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Google Analytics
Accept
Decline
Functional
Tools used to give you more features when navigating on the website, this can include social sharing.
Advertisement
If you accept, the ads on the page will be adapted to your preferences.
Google Ad
Accept
Decline
Save