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, 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" <>
To   <>, <>
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

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:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index