We have been unable to get the MERGE statement
to work using our UNIDAC connection and components.
UNIDAC version: 6.1.3
SQL Server Version:
select @@VERSION
Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (Intel X86)...
Compatibility MOde:
select compatibility_level from sys.databases where name=db_name();
100
When our MERGE statements are copied and pasted into any number
of other tools (for example, Microsoft SQL Server Management Studio)
they run against the same DB smoothly.
Example MERGE statement:
merge into md_master A using md_master B
on a.account_tag = b.temp_new_account_tag
and a.check_no = b.temp_new_check_no
when matched then update set
a.reissue_original_id = b.id,
A.REISSUE_TYPE=1;
Example Code(simplest one of many efforts):
s:= 'merge into md_master A using md_master B...;'; //stmt truncated for this post
q.execute( s ); //tuniquery naturally
As you can see these do have the now-required semi-colon on the
end, and the error does not complain about one being missing
(as it does if you leave it off)
Consistent Error Response:
[b]Incorrect syntax near the keyword 'merge'[/b]
Anyone have any experience with this message?
Or with UNIDAC + MS Sqlserver + Merge ?
thanks
tonyM
SQL Server MERGE statement
Re: SQL Server MERGE statement
We tried to reproduce this error on UniDAC 6.1.3 and on the latest 6.4.15, according to your recommendations, but the issue was not reproduced. Please try to compose a small sample where this issue is reproduced and send it using the contact form on our website http://www.devart.com/company/contactform.html . Include into your sample scripts to create test tables.