7
Why this query returns to me *
?
select convert(varchar(2), 141)
I thought it was the ascii table, but the 141 doesn’t match the *.
Utilise SQL Server 2008 R2
7
Why this query returns to me *
?
select convert(varchar(2), 141)
I thought it was the ascii table, but the 141 doesn’t match the *.
Utilise SQL Server 2008 R2
9
When integers are converted implicitly to a type of character data, if the integer is too large to fit into the character field, SQL Server returns character 42 of the ASCII Table, the asterisk (*).
Soon any number with the size greater than 2 characters will return *
. If you want to display the 141 just increase the number of characters:
select convert(varchar(3), 141)
Return: 141.
Source: Technet
Browser other questions tagged sql
You are not signed in. Login or sign up in order to post.
Which bank are you using?
– Jéf Bueno
I think it depends on the collate. The * can be because it does not have a valid character to print.
– Maniero
@Jéfersontavares SQL Server 2008 R2
– Diego Zanardo