Re: SQL Numeric conversion
Have you tried to single quote the binary string?
Re: SQL Numeric conversion
Quote:
Originally Posted by
Arjay
Have you tried to single quote the binary string?
Hi Arjay,
Do you mean something like this : select CONVERT(numeric,'0x120200000000084e20e90015') ?
If so, it does not work. It gives an error ==> Erreur de conversion du type de données varchar en numeric.
Re: SQL Numeric conversion
Quote:
Originally Posted by
James West
Hi Arjay,
Do you mean something like this : select CONVERT(numeric,'0x120200000000084e20e90015') ?
If so, it does not work. It gives an error ==> Erreur de conversion du type de données varchar en numeric.
Well, but you were going to convert it to numeric, not to datetime!
Quote:
Originally Posted by
James West
Hi,
I have got some problems when running this SQL statement :
select CONVERT(numeric,0x120200000000084e20e90015)
Weren't you?
Re: SQL Numeric conversion
Quote:
Originally Posted by
VictorN
Well, but you were going to convert it to numeric, not to datetime!
Weren't you?
It was an error .
I have posted two threads in this way and one is related also to date conversion.
Re: SQL Numeric conversion
Quote:
Originally Posted by
James West
It was an error .
I have posted two threads in this way and one is related also to date conversion.
So did it work with numeric?
Re: SQL Numeric conversion
The process of changing data type of a value into another data type is referred to as data type conversion and also almost all programing languages include some type of data converting functions or functionality. When we turn our perspective to SQL Server in order to discuss details of SQL data converting operations, at first we can separate data conversion process into two parts; implicit and explicit conversions. Implicit conversion is done by SQL Server for internal needs and you can also find additional details in the article Implicit conversion in SQL Server. Explicit conversion is performed explicitly by a database programmer or administrator and at the same time this conversion process is made with help of any data conversion function. In this article, we will particularly focus on the SQL CONVERT function. This function provides a means to convert one data type to another specified data type. At first, we will interpret the syntax of the SQL CONVERT function.
Re: SQL Numeric conversion
Quote:
Originally Posted by
mikeduke1290
The process of changing data type of a value into another data type is referred to as data type conversion and also almost all programing languages include some type of data converting functions or functionality.
...
At first, we will interpret the syntax of the SQL CONVERT function.
Is this quotation from https://www.sqlshack.com/sql-convert-function/ ?
Or what were you going to say? :confused:
Re: SQL Numeric conversion
Quote:
Originally Posted by
VictorN
I'd say it's a copy-and-paste hijack!