[R] Dealing with schema in RODBC

Mark Lyman mark.lyman at gmail.com
Wed Nov 7 23:15:49 CET 2007


Is there a way to get a table in a certain schema? The Oracle database I am 
using has a table by the same name in two different schemas. This creates 
problems in sqlUpdate because to sqlUpdate there are duplicate columns. The 
following is part of the output of sqlColumns:

sqlColumns(eids, "TEST_ARTCL_INST")[,1:4]
   TABLE_CAT TABLE_SCHEM      TABLE_NAME        COLUMN_NAME
1                   EIDS TEST_ARTCL_INST         CHANNEL_ID
2                   EIDS TEST_ARTCL_INST    ARTICLE_TEST_ID
3                   EIDS TEST_ARTCL_INST     CHANNEL_OLD_ID
4                   EIDS TEST_ARTCL_INST        FREQ_FM_CNT
5                   EIDS TEST_ARTCL_INST      RANGE_MAX_CNT
6                   EIDS TEST_ARTCL_INST      RANGE_MIN_CNT
7                   EIDS TEST_ARTCL_INST       TYPE_GAGE_ID
8                   EIDS TEST_ARTCL_INST    DRAWING_TYPE_ID
9                   EIDS TEST_ARTCL_INST         DRAWING_ID
10                  EIDS TEST_ARTCL_INST RATE_SPECIFIED_CNT
11                  EIDS TEST_ARTCL_INST  ACCURACY_RQRD_CNT
12                  EIDS TEST_ARTCL_INST        UNIT_MSR_ID
13              EIDS_APP TEST_ARTCL_INST         CHANNEL_ID
14              EIDS_APP TEST_ARTCL_INST    ARTICLE_TEST_ID
15              EIDS_APP TEST_ARTCL_INST     CHANNEL_OLD_ID
16              EIDS_APP TEST_ARTCL_INST        FREQ_FM_CNT
17              EIDS_APP TEST_ARTCL_INST      RANGE_MAX_CNT
18              EIDS_APP TEST_ARTCL_INST      RANGE_MIN_CNT
19              EIDS_APP TEST_ARTCL_INST       TYPE_GAGE_ID
20              EIDS_APP TEST_ARTCL_INST    DRAWING_TYPE_ID
21              EIDS_APP TEST_ARTCL_INST         DRAWING_ID
22              EIDS_APP TEST_ARTCL_INST RATE_SPECIFIED_CNT
23              EIDS_APP TEST_ARTCL_INST  ACCURACY_RQRD_CNT
24              EIDS_APP TEST_ARTCL_INST        UNIT_MSR_ID

Mark Lyman



More information about the R-help mailing list