Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Problem with -odbc insert- in Stata 11: padded strings


From   Ben Jann <[email protected]>
To   statalist <[email protected]>
Subject   st: Problem with -odbc insert- in Stata 11: padded strings
Date   Thu, 26 Nov 2009 16:15:01 +0100

Hi

I have a problem with -odbc- in Stata 11. When using -odbc insert- to
write data into an SQL table then strings get padded with white space.
For example, string

 "abc"

will be stored as

 "abc  "

if the variable is str5. This behavior makes it very difficult to work
with variables that contain strings of varying length.

In Stata 10, using the exact same commands, the strings were stored
without the added white space.

Does anyone know how to make Stata 11 not add the white space?

ben
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index