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   tashi lama <ltashi32@hotmail.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: could it be a bug in odbc??
Date   Thu, 30 Aug 2012 14:24:10 +0000

Yes, I have asked this question to stata technical support too and waiting for response. I thought may be someone here might have encountered similar problem. I will try to be exact here running same query and generating table in unix and windows.  
In Unix
 .odbc desc readership  //describing the table readership
DataSource: indigo (query)
Table:      readership (load)
-------------------------------------------------------------------------------
Variable Name                               Variable Type
-------------------------------------------------------------------------------
readership_id                               bigint unsigned
source_id                                   integer unsigned
source_doc_id                               integer unsigned
doc_title                                   varchar
publish_date                                date
firm_id                                     integer unsigned
user_id                                     integer unsigned
doc_id                                      varchar
destination_id                              integer
doc_id_type                                 smallint unsigned
read_date                                   datetime
type                                        smallint
is_internal                                 tinyint
is_mobile                                   tinyint
--------------------------------------------------------------
. odbc load, exec("select * from readership limit 2") // query to yield 3 rows of each column
note: doc_title is of a type not supported in Stata; skipped
note: doc_id is of a type not supported in Stata; skipped

. list 
 reader~d   sou~e_id   sou~c_id   publis~e   firm_id   user_id   destin~d   doc_id~e   read_date   type   is_int~l   is_mob~e |
     |------------------------------------------------------------------------------------------------------------------------------|
  1. |        1       9841      52778      17576     27662     10731          7          1   1.519e+12      3          0          0 |
  2. |        2       9841      52778      17576     23911     90881         32          1   1.519e+12      3          0          0 |

odbc skips doc_title and doc_id. While running in windows, odbc doesn't skip any columns like following 

In Windows
. odbc load, exec("select * from readership limit 2")
. list 
 +-------------------------------------------------------------------------------------------------------------------------------------------------------------------+
     | reader~d   sou~e_id   sou~c_id                    doc_title   publish~e   firm_id   user_id   doc_id   destin~d   doc_id~e            read_date   type   is_int~l   is_mob~e|
     |-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  1. |        1       9841      52778   Dong Testing Java Sellside   14feb2008     27662     10731    DUMMY          7          1   15feb2008 00:00:00      3          0      0|
  2. |        2       9841      52778   Dong Testing Java Sellside   14feb2008     23911     90881    DUMMY         32          1   15feb2008 00:00:00      3          0      0 |
     +----------------------------------------------------------------------------------------------------------------------------------------------------------

Any ideas? Thanks and please let me know if I could be any clearer. 

----------------------------------------
> Date: Thu, 30 Aug 2012 15:09:05 +0100
> Subject: Re: st: could it be a bug in odbc??
> From: njcoxstata@gmail.com
> To: statalist@hsphsun2.harvard.edu
>
> I don't think this kind of verbal paraphrase helps much with a
> technical difficulty. It's exact code, exact file details, exact
> responses from Stata that count.
>
> Given the lack of response yesterday, I'd report this to Stata
> technical support. See
> http://stata.com/support/faqs/technical-support/ for how to contact
> them and what they will expect, including your registration details.
>
> Nick
>
> On Thu, Aug 30, 2012 at 3:00 PM, tashi lama <ltashi32@hotmail.com> wrote:
>
> I posted this question yesterday and failed to hear any responses.
> Could be because the way I framed my question. So, I am attempting to
> make it more clear and concise. The problem is with odbc running in
> unix. I have a table "readership" in mysql which has a column
> doc_title of type varchar. While running in windows, odbc imports that
> column in stata with data type string. This runs in par with the stata
> documentation which lists string as the corresponding stata datatype
> to varchar in SQL. The problem arises while running Stata in unix.
> Stata skips the the column doc_title and gives the following notice.
> > note: doc_title is of a type not supported in Stata; skipped
> >
> > This is so confusing. Did anyone encounter this problem? Any hint or solution will be highly appreicated.
> *
> * 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/ 		 	   		  
*
*   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