This is a discussion on host variables and code page conversion within the SQL Server forums, part of the Microsoft SQL Server category; --> Hello, Does anybody know what is the documented and known behavior of inserting/updating binary columns using host variables from ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello, Does anybody know what is the documented and known behavior of inserting/updating binary columns using host variables from a client to a server which have different code pages? Will any code page / character set conversion take place? I am particulary interested in insert/update from subqueries. eg: insert into t1(binarycol) select :HV1 from t2 versus insert into t1(binarycol) select :HV1||charcol from t2 update t1 set bytecol=:HV1 versus update t1 set bytecol=:HV1||'abc' insert into t1 (bytecol) values(:HV1) versus insert into t1 (bytecol) values(:HV1||'abc') Is the conversion dependent on the context? Thanks Aakash |
| ||||
| Aakash Bordia (a_bordia@hotmail.com) writes: > Does anybody know what is the documented and known behavior of > inserting/updating binary columns using host variables from a client to a > server which have different code pages? Will any code page / character set > conversion take place? I am particulary interested in insert/update from > subqueries. In SQL Server there is no implicit conversion from character to binary. You seem to be using some form of embedded SQL, and this product might supply such conversion. In this case I would expect the conversion to binary happen on the client side, and thus the binary value will reflect the code page on the client. But this is speculation on my part. You are probably off testing to see what happens. -- Erland Sommarskog, SQL Server MVP, sommar@algonet.se Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinf...2000/books.asp |