After upgrading from Web edition to S2 (V12), a merge statement in one of my stored procedures has started giving this error:
Cannot bulk load. The bulk data stream was incorrectly specified as sorted or the data violates a uniqueness constraint imposed by the target table. Sort order incorrect for the following two rows: primary key of first row: (194e973b-9cd5-4efa-bd1a-1d50153f6ab4, 1b0905dc-20ec-4923-835a-fda62bcd9ed4), primary key of second row: (194e973b-9cd5-4efa-bd1a-1d50153f6ab4, d0e3e241-dbc8-4776-92e7-fb8f6523d05f).
Adding "option (force order)" to the merge statement got the procedure working.
Has anyone else seen this error, and would they know if adding the force order hint is a reliable fix?
- Edited by BW2012 Monday, September 07, 2015 12:12 PM