Wednesday, March 21, 2012

diff between Cast and Convert

what is the diff between cast and convertCONVERT function has a parameter called style.
"Subramaniyan Ramesh" <SubramaniyanRamesh@.discussions.microsoft.com> wrote
in message news:353A3CCC-9CA1-4AEF-877A-F99F5EA7AA5D@.microsoft.com...
> what is the diff between cast and convert|||I believe also that CAST is part of standard SQL, but CONVERT is
specific to SQL Server.
Roy
On Thu, 20 Apr 2006 13:35:20 +0300, "Uri Dimant" <urid@.iscar.co.il>
wrote:

>CONVERT function has a parameter called style.
>"Subramaniyan Ramesh" <SubramaniyanRamesh@.discussions.microsoft.com> wrote
>in message news:353A3CCC-9CA1-4AEF-877A-F99F5EA7AA5D@.microsoft.com...
>|||I'd say specific to deal with DATES :-))
"Roy Harvey" <roy_harvey@.snet.net> wrote in message
news:dmqe42ppseg2s2hualu068dls4c9kg7po6@.
4ax.com...
>I believe also that CAST is part of standard SQL, but CONVERT is
> specific to SQL Server.
> Roy
>
> On Thu, 20 Apr 2006 13:35:20 +0300, "Uri Dimant" <urid@.iscar.co.il>
> wrote:
>|||CONVERT has existed since 1.0. CAST was introduced in some later version (6.
0 or 7.0, I'm not sure).
Roy is correct that CAST is ANSI SQL. And I also agree that *if* you want to
do date formatting in
SQL Server, then CONVERT is the one to use.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Uri Dimant" <urid@.iscar.co.il> wrote in message news:elJzEuGZGHA.3444@.TK2MSFTNGP05.phx.gbl
..
> I'd say specific to deal with DATES :-))
> "Roy Harvey" <roy_harvey@.snet.net> wrote in message
> news:dmqe42ppseg2s2hualu068dls4c9kg7po6@.
4ax.com...
>

No comments:

Post a Comment