Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: could it be a bug in odbc??


From   "Joseph Coveney" <jcoveney@bigplanet.com>
To   <statalist@hsphsun2.harvard.edu>, <joshua.birnbaum@bluematrix.com>
Subject   Re: st: could it be a bug in odbc??
Date   Fri, 31 Aug 2012 03:22:55 +0900

Tashi Lama wrote:

Here is a post somewhat similar in the archive

http://www.stata.com/statalist/archive/2003-01/msg00377.html

If odbc indeed is adding some black characters while converting string as the
post reads, and if string exceeds its limitation, stata doesn't skip strings. It
truncates. Is that not right? 

--------------------------------------------------------------------------------

Have you tried to make sure that the VARCHAR columns get rendered as something
that Stata should see as a character data type?  Maybe something like the
following in the do-file would help.

    #delimit ;
    odbc load, exec(readership_id, source_id, source_doc_id, 
        LEFT(doc_title, 243) AS document_title, firm_id, user_id, 
        LEFT(doc_id, 243) AS document_id, destination_id, doc_id_type, 
        read_date, type AS type_nr, is_internal, is_mobile FROM Readership);
    #delimit cr

Joseph Coveney


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index