Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: "Bob Barrows" Newsgroups: comp.databases.ms-sqlserver Subject: Re: SSE2008 money Type Date: Thu, 11 Oct 2012 12:53:44 -0400 Organization: A noiseless patient Spider Lines: 21 Message-ID: References: <6a8140c4-f72f-4f85-ba59-3b109c70c951@googlegroups.com> Injection-Date: Thu, 11 Oct 2012 16:53:50 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="35499ba0748d606e1c5f962cf63f1337"; logging-data="15103"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+FR6c1JUd3dTBU9xlB6YF4rbEpzUeZNT4=" X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.2001 X-Newsreader: Microsoft Outlook Express 6.00.2800.2001 Cancel-Lock: sha1:04nrpvk6LubNQlylRAeBvhoL+p4= X-Priority: 3 X-MSMail-Priority: Normal Xref: csiph.com comp.databases.ms-sqlserver:1334 rja.carnegie@gmail.com wrote: > On Thursday, October 11, 2012 11:40:32 AM UTC+1, Bob Barrows wrote: >> Look up the Style arguments for CONVERT() in BOL. This can all be >> avoided by using explicit conversions. > > CAST may be preferred instead of CONVERT, since it's ANSI standard > and portable between different SQL DBMS - if that's a consideration. > CONVERT has more options, particularly for style and localisation, > such as for date/time. > > > evidently refers to SQL Server 2000, but it makes the case for CAST. My point was that implicit conversions ot varchar seem to be done using the default style arguments of CONVERT(). The problem can be avoided by explicitly converting the data to be printed either using CONVERT() with the appropriate style arguments, or, as you say, by using CAST().