From b04ca67477ffa1bb3baa4de64c9ce9796e017f47 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 17 Nov 2017 23:28:41 +0100 Subject: SQL export used the wrong syntax for view placeholders when the columns contained a type with decimals (#2927) --- Source/SPSQLExporter.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Source') diff --git a/Source/SPSQLExporter.m b/Source/SPSQLExporter.m index cb085e39..c6f8f984 100644 --- a/Source/SPSQLExporter.m +++ b/Source/SPSQLExporter.m @@ -840,7 +840,12 @@ // Add the type and length information as appropriate if ([column objectForKey:@"length"]) { - [fieldString appendFormat:@" %@(%@)", [column objectForKey:@"type"], [column objectForKey:@"length"]]; + NSString *length = [column objectForKey:@"length"]; + NSString *decimals = [column objectForKey:@"decimals"]; + if([decimals length]) { + length = [length stringByAppendingFormat:@",%@", decimals]; + } + [fieldString appendFormat:@" %@(%@)", [column objectForKey:@"type"], length]; } else if ([column objectForKey:@"values"]) { [fieldString appendFormat:@" %@(", [column objectForKey:@"type"]]; -- cgit v1.2.3