SELECT CONVERT (varchar), CAST (@testFloat as Decimal (38,2))SELECT STR (@testFloat, 38, 2)
Importing from Excel to sql2000, there is a list of "contacts" that have become float types, and I want to convert to nvarchar type, using the following
A. A review of the syntax format of CONVERT (): convert ([length], [, Style]) second, here is a note of the meaning of style: style is the conversion style number that is provided by the SQL Server system when converting Datatime and smalldatetime
First, review the syntax format of CONVERT (): convert ([length], [, Style])
Second, here pay attention to the meaning of style: style is the conversion of datatime and smalldatetime data to a string by the SQL Server system provided by the
CONVERT (Data_type,expression[,style])CONVERT (varchar (10), field name, conversion format)DescriptionThis style is typically in the time type (Datetime,smalldatetime) and the string type (Nchar,nvarchar,char,varchar)It is only used when converting
The main description is that SQL Server uses convert to obtain datetime date data in the actual operation process, in the actual operation with the SQL Server database using convert to get datetime date data, the following instance contains a
Copy http://www.cnblogs.com/benwu/p/3939044.htmlThe main description is that SQL Server uses convert to obtain datetime date data in the actual operation process, in the actual operation with the SQL Server database using convert to get datetime
I just learned Java, but I have a poor foundation. I used data type conversion and found it online. Convert from http://hi.baidu.com/loveland/blog/item/eb2d96456e64d13a8694737b.html 1 how to convert string to integer Int? A. There are two methods: 1)
CONVERT (Data_type,expression[,style])CONVERT (varchar (10), field name, conversion format)
DescriptionThis style is generally in the type of time (datetime,smalldatetime) and String type (Nchar,nvarchar,char,varchar)When they are converted to each
Use convert in SQL server2000 to get the datetime data type style (full)Processing of date data formats, two examples:CONVERT (varchar (16), time one, 20) results: 2007-02-01 08:02/* time is generally a field in the GETDATE () function or data table
Processing of date data format:
Result of convert (varchar (16), time 1, 20): 2007-02-01 08: 02
Result of convert (varchar (10), time 1, 23): 2007-02-01
Statement and query result:Select convert (varchar (100), getdate (), 0): 05 16 2006
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.