>>Because both CONVERT() exceeds the defined length of the field.
>>
>>UPDATE ... SET ...
>> GeographyTemporary='POINT('+CONVERT(CHAR(100),Longitude)+' '+CONVERT(CHAR(100),Latitude)+')'
>>
>>Will give you total length of 208 and the field is defined as CHAR(100).
>
>Thanks, so basically, if I would want to use a Char field type, I would need to define it 208. When using Varchar(100), its maximum length is much greater than 100 then. Do you know what it is? Or, if I would wish to define it to a lower value, to support this, would there be a better field declaration than Varchar(100)?
No, when you define it as Varchar(100) you still can enter only 100 chars maximum.
If you want to use CHAR(100) you just need to change the convert and use varchar() there. Then it will work also.
GeographyTemporary -> CHAR(100)
UPDATE ... SET ...
GeographyTemporary='POINT('+CONVERT(varchar(100),Longitude)+' '+CONVERT(varchar(100),Latitude)+')'
Because I doubt the Longitude or Latitude can exceed 100 chars each when you convert them.
When you convert something to VARCHAR SQL Server converts it and remove all trailing spaces. When you convert it to CHAR() SQL Server add trailing spaces to match the length of the field.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.