aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/SPSQLExporter.m7
1 files changed, 6 insertions, 1 deletions
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"]];