Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Wrong Enconding on Select with Union

$
0
0

Hi there,

I got multiple tables, all of the same structure, containing the same columns. The columns are allvarchar(250).

Now I have a query, that connects all the tables via UNION ALL and selects a column namedInsertX that contains values like "134,856710602534"

My problem is: after UNIONing all the tables and selecting the InsertX column 134,856710602534 becomes 134¸856710602534. So the comma gets messed up. I tried different commands likeCAST (InsertX AS varchar(250)) and Collate Latin1_General_CI_AS in theSELECT query, but nothing helps.

I know that its a very bad table design and also I would have made it with nvarchar. But the tables are created and used by a third party application and I have to deal with them like they are :(

I really hope someone here knows an answer :) Thanks in advance!


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>