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: odbc working differently in windows and linux

From   tashi lama <>
To   <>
Subject   RE: st: odbc working differently in windows and linux
Date   Wed, 29 Aug 2012 21:55:45 +0000

I get it. It is the string limitation issue. The sql datatype varchar is nonissue since the documentation says the corresponding stata data type for sql data type varchar is string. Just the fact that some sql columns with type varchar are allowed while some are relieved tells me this is a string limitation issue. I could use _compress but there has to be a variable present before I use _compress. The dilemma is before I can use _compress, the column is alredy lost while loading dataset. Is there a cure to this??? 

One potential solution I can think of is using _compress as option while loading a dataset. Unfortunately, options are not allowed. 

> From:
> To:
> Subject: st: odbc working differently in windows and linux
> Date: Wed, 29 Aug 2012 20:19:17 +0000
> Hello all,
> I use odbc driver to import data from mysql into stata. While running in windows, the column doc_type which is of type varchar in mysql changes into str244 in stata. Unfortunately, in linux machine, when I use odbc to import column doc_type which is type varchar, I get error and I quote "note:doc_type is of a type not supported in Stata;skipped"
> .set odbcmgr unixodbc
> .odbc query indigo_readership
> readership
> users
> ......
> .odbc desc readership
> variable name variable type
> source_id integer
> doc_id varchar
> doc_title varchar
> . odbc load, exec("select * from readership limit 3")
> note: doc_id is of a type not supported in Stata; skipped
> note: doc_title is of a type not supported in Stata; skipped
> but if i select just source_id, it works
> .odbc load, exec("select source_id from readership limit 3")
> 93619 =>stata is happy
> The funny thing is, if I run the same query in windows, stata is happy. Does anyone know what is going on?
> Thanks,
> Tashi
> *
> * For searches and help try:
> *
> *
> * 		 	   		  
*   For searches and help try:

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