-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export for table with datetime2 in primary key #20
Comments
Thank you for the issue report. Regards, |
Thanks, I'll try it out. |
Those patch files are working for me. The export is working using the datetime2 datatype in primary key. thanks for quick fix. |
Fixed in release 9.1.5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Having an issue exporting data when table uses a composite primary key of varchar(11) and datetime2. The datetime2 appears to be truncated to datetime, and subsequent queries don't match the datetime2, resulting in 0 rows exported.
When exporting I get a popup stating
Warning: The number of rows collected (8) differs from that of the exported ones (0).
This may have been caused by an invalid primary key definition.
Please note that each primary key must be unique and never null.
It is recommended to check the integrity of the primary keys.
The sql.log shows the PK datetime2 is converted to datetime, which is truncating the value.
this is the PK sql.
Select '49452127001' PK0, convert(datetime, '2019-03-01T04:08:38.153', 126) PK1
I did some experimenting and found that this sql works by using datetime2 and including all the decimal places.
(Select '49452127001' PK0, convert(datetime2, '2019-03-01T04:08:38.1533333', 126)
Jailer 9.1.4
Microsoft SQL Server (MS SQL Server) 13.00.4522
Thanks is advance... let me know if you need more info.
For the record, I'm not a fan of datetime in primary keys, but changing it now is not an option.
The text was updated successfully, but these errors were encountered: