[prev in list] [next in list] [prev in thread] [next in thread]
List: r-sig-db
Subject: Re: [R-sig-DB] Failure to give due credit whilst blaming others for
From: Prof Brian Ripley <ripley () stats ! ox ! ac ! uk>
Date: 2008-11-12 9:08:59
Message-ID: alpine.LFD.2.00.0811112308270.31035 () gannet ! stats ! ox ! ac ! uk
[Download RAW message or body]
On Tue, 11 Nov 2008, Grey Moran wrote:
> Hello,
> I am trying to load data into SQL Server as follows (example
> simplified for discussion purposes). The returned error complains of a
> non existent table, which I can nevertheless "see":
>
> > channel <- odbcConnect("MktRisk")
> > createTable.q <- "CREATE TABLE dbo.Arrests (State CHAR(20) NOT NULL, MURDER \
> > DECIMAL(6,3) NOT NULL, ASSAULT INTEGER NOT NULL, URBANPOP INTEGER NOT NULL, RAPE \
> > DECIMAL(6,3));" sqlQuery(channel, createTable.q);
> character(0)
> > sqlTables(channel)
> TABLE_CAT TABLE_SCHEM TABLE_NAME TABLE_TYPE REMARKS
> .................
> 19 MktRisk dbo sysusers SYSTEM TABLE <NA>
> 20 MktRisk dbo Arrests TABLE <NA>
> ..................
>
> > sqlSave(channel, dat=USArrests, tablename=Arrests, rownames = "state", \
> > addPK=TRUE)
> Error in sqlSave(channel, dat = USArrests, tablename = Arrests,
> rownames = "state", : object "Arrests" not found
That's a simple and basic user error. From the help
tablename: character: a database table name accessible from the
connected dsn. If missing, the name of 'dat'.
The error message says that there is no variable Arrests, and presumably
"Arrests" was meant. That is not taking into account that schema seem to
be in use and no schema was selected. (I don't use 'SQL Server', but
selecting the schema is necessary in some other DBMS.)
Note that 'Grey Moran' has given no credit whatsoever for the work of
others he is using, not even mentioning the package name. This is not the
first offence, and we expect much better in any future help requests --
and studying the R posting guide is not optional.
--
Brian D. Ripley, ripley@stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
_______________________________________________
R-sig-DB mailing list -- R Special Interest Group
R-sig-DB@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-db
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic