I don't have a need for all of the various SQL Server date/time datatypes, but I intend to make use of the Date datatype. As Tom pointed out, the conceptual model already has three date/time datatypes, my issue is (as he also noted) that they are all mapped to the SQL Server datetime datatype. All I did - based on the forum links that Matt provided - was to modify DDILtoSQLServer.xslt by expanding:
<xsl:template match="@type[.='DATE' or .='TIME' or .='TIMESTAMP']" mode="ForDataType">
<xsl:text>datetime</xsl:text>
</xsl:template>
to:
<xsl:template match="@type[.='DATE']" mode="ForDataType">
<xsl:text>date</xsl:text>
</xsl:template>
<xsl:template match="@type[.='TIME']" mode="ForDataType">
<xsl:text>time</xsl:text>
</xsl:template>
<xsl:template match="@type[.='TIMESTAMP']" mode="ForDataType">
<xsl:text>datetime</xsl:text>
</xsl:template>
Easy peasy: my DDL now makes use of both Date and Datetime column definitions.
Maybe this was too obvious to have been mentioned, but maybe there are also others out there as dense as I that can make use of it.
- Chris