Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Interesting difference in CAST vs CONVERT functions
Message
De
21/02/2008 07:36:03
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01294297
Message ID:
01294671
Vues:
18
>>>BTW, what SQL Server function would tell us the TYPE of the variable/field?
>>
>>I don't see a difference between the two except the typos in CAST version. In what version does it work incorrect and what is that unexpected behavior? I get the same expected results from both in SQL2005.
>>
>>Cetin
>
>I got an error on INSERT command on the second line in the first case. I don't see a typo and can not test right now.
>
>Also would you please answer my question about type() equavalent in SQL Server ?

What is the error? I think it was simply pointing out to the typos you have. You forgot to closing parentheses for insert with CAST version.
There is no type() equivalant in SQL server AFAIK. You can use type_id,type_name,isdate,isnumeric .. functions and sp_datatype_info sp.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform