Hmm, I can not reproduce this.
I created those tables in two different databases.
In the first one ("referencedb") I ran the following insert:
insert into mytable
(nrbd, indexbd,txtbd,activebd,dateactbd,useractBD,dateBD,userbd)
values
('1',1,'foo',1,'2019-01-01 00:00:00','arthur','2019-01-02 00:00:02','arthur'),
('2',2,'bar',0,'2019-02-01 00:00:00','ford','2019-02-02 00:00:02','ford');
and in the second one ("targetdb"), I only inserted the first row.
Then I ran:
WbDataDiff -referenceProfile='....'
-targetProfile='....'
-referenceTables=myTable
-file=c:\temp\datasets.sql
-includeDelete=True
-ignoreColumns="idBD,dateactBD,useractBD,dateBD,userBD"
-excludeIgnored=true
-singleFile=true
-referenceSchema=dbo
-targetSchema=dbo
The resulting script then contained (as expected):
-- -------------------
-- INSERTS for targetdb.dbo.myTable
-- -------------------
INSERT INTO myTable
(nrBD, indexBD, txtBD, activeBD)
VALUES
(N'2', 2, N'bar', 0);
-- No UPDATEs for myTable necessary
COMMIT;
-- No DELETEs for myTable necessary
This is with SQL Server 2016, but that should not make a difference.
The JDBC driver version is 7.2.1.0
Is it possible that the two profiles use different driver versions?
Andreas Emrich schrieb am 12.08.2019 um 14:56:
> Hi,
>
> here are the table sourcecode from SQL Workbench from the MainDB:
>
> |
> CREATE TABLE MySchema.myTable
> (
> idBD bigint identity NOT NULL,
> nrBD nvarchar(18) NOT NULL,
> indexBD int NOT NULL,
> txtBD nvarchar(80) NOT NULL,
> activeBD bit CONSTRAINT DF_myTable_activeBD DEFAULT ((1))NOT NULL,
> dateactBD datetime NOT NULL,
> useractBD nvarchar(20) NOT NULL,
> dateBD datetime NOT NULL,
> userBD nvarchar(20) NOT NULL
> );
>
> ALTER TABLE MySchema.myTable
> ADD CONSTRAINT PK_myTable
> PRIMARY KEY NONCLUSTERED (idBD);
>
> ALTER TABLE MySchema.myTable
> ADD CONSTRAINT AK_myTable UNIQUE (nrBD,indexBD);
> |
>
>
>
> And the table sourcecode from the TargetDB:
>
> |
> CREATE TABLE MySchema.myTable
> (
> idBD bigint identity NOT NULL,
> nrBD nvarchar(18) NOT NULL,
> indexBD int NOT NULL,
> txtBD nvarchar(80) NOT NULL,
> activeBD bit DEFAULT ((1))NOT NULL,
> dateactBD datetime NOT NULL,
> useractBD nvarchar(20) NOT NULL,
> dateBD datetime NOT NULL,
> userBD nvarchar(20) NOT NULL
> );
>
> ALTER TABLE MySchema.myTable
> ADD CONSTRAINT PK_myTable
> PRIMARY KEY NONCLUSTERED (idBD);
>
> ALTER TABLE MySchema.myTable
> ADD CONSTRAINT AK_myTable UNIQUE (nrBD,indexBD);
> |
>
> Best Regards
> Andreas