Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-sqlserver > #1334
| From | "Bob Barrows" <reb01501@NOyahooSPAM.com> |
|---|---|
| Newsgroups | comp.databases.ms-sqlserver |
| Subject | Re: SSE2008 money Type |
| Date | 2012-10-11 12:53 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <k56tiu$env$1@dont-email.me> (permalink) |
| References | <mqcc78906k2avdq0uuj25nem4r5b4qnsnp@4ax.com> <k567n0$3ul$1@dont-email.me> <6a8140c4-f72f-4f85-ba59-3b109c70c951@googlegroups.com> |
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. > > <http://www.databasejournal.com/features/mssql/article.php/1469841/Cast-Your -Data.htm> > 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().
Back to comp.databases.ms-sqlserver | Previous | Next — Previous in thread | Next in thread | Find similar
SSE2008 money Type Gene Wirchenko <genew@ocis.net> - 2012-10-10 19:47 -0700
Re: SSE2008 money Type "Bob Barrows" <reb01501@NOSPAMyahoo.com> - 2012-10-11 06:40 -0400
Re: SSE2008 money Type rja.carnegie@gmail.com - 2012-10-11 04:45 -0700
Re: SSE2008 money Type "Bob Barrows" <reb01501@NOyahooSPAM.com> - 2012-10-11 12:53 -0400
Re: SSE2008 money Type Erland Sommarskog <esquel@sommarskog.se> - 2012-10-11 11:16 +0000
csiph-web