• SQL Kiwi (1/5/2012)


    Interesting. The documentation looks very similar between ASE 15 and SQL Server:

    http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.blocks/html/blocks/blocks14.htm

    http://msdn.microsoft.com/en-us/library/ms190476.aspx

    The magic number 6 appears for division in both, but not multiplication.

    Interesting find ... however we have to read the Sybooks fine print ...

    "For numeric and decimal datatypes, each combination of precision and scale is a distinct Adaptive Server datatype."

    I only noticed this because the chapter heading is "Datatypes of mixed-mode expressions" and I thought ... hold on a minute, the QOTD is not mixed mode because the 2 multiplicands are identical scale and precision!!! Therefore the import of Table 1-3 does not apply to the QOTD for Sybase.

    The MSDN entry is a bit more cryptic and harder to interpret as to whether the concept of mixed mode applies for numeric same scale and precision. The writers are fixated with decimal ranking higher than numeric and remain silent on the finer points.

    Regardless I guess one can infer from the QOTD outcomes that SQL Server applies the 6 digit guillotine universally?!?