Skip to content
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

Fixes #19720 single parenthesis defaults #19745

Merged
merged 1 commit into from
Feb 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ UNION ALL
return defaultValue;
}

if (defaultValue == "((0))")
if (defaultValue == "((0))" || defaultValue == "(0)")
{
if (dataTypeName == "bigint"
|| dataTypeName == "bit"
Expand All @@ -716,7 +716,7 @@ UNION ALL
return null;
}
}
else if (defaultValue == "((0.0))")
else if (defaultValue == "((0.0))" || defaultValue == "(0.0)")
{
if (dataTypeName == "decimal"
|| dataTypeName == "float"
Expand All @@ -730,6 +730,7 @@ UNION ALL
}
else if ((defaultValue == "(CONVERT([real],(0)))" && dataTypeName == "real")
|| (defaultValue == "((0.0000000000000000e+000))" && dataTypeName == "float")
|| (defaultValue == "(0.0000000000000000e+000)" && dataTypeName == "float")
|| (defaultValue == "('0001-01-01')" && dataTypeName == "date")
|| (defaultValue == "('1900-01-01T00:00:00.000')" && (dataTypeName == "datetime" || dataTypeName == "smalldatetime"))
|| (defaultValue == "('0001-01-01T00:00:00.000')" && dataTypeName == "datetime2")
Expand Down