Re: [Rd] bug in sqlSave with fast=F option (PR#9429)

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Sat 23 Dec 2006 - 15:26:35 GMT

Please read how to report bugs:

  1. sqlSave is not part of R's base packages, hence please do not submit a bug report here but ask the package maintainer of the corresponding package.
  2. You have tested with an outdated version of R (2.4.1 is recent).

Uwe Ligges

paul.macmanus@gmail.com wrote:
> Full_Name: Paul MacManus
> Version: 2.3.0
> OS: Windows XP
> Submission from: (NULL) (216.90.169.253)
>
>
> See also R-help thread for October 18, 2006
>
> ---------------------------
> Create a dataframe and save it to a database table "test" as follows:
>
> df <- data.frame(T=1, S=10)
> sqlSave(channel, df, "test", rownames=F)
>
> The table now looks like
>
> T S
> 1 10
>
> If I create another dataframe and save as follows
>
> df <- data.frame(S=20, T=2)
> sqlSave(channel, df, "test", rownames=F, append=T)
>
> Then table "test" now looks like
>
> T S
> 1 10
> 2 20
>
> The important point is that although S was the first column of df,
> sqlSave checked the column names and matched the corresponding columns
> of df and table "test".
>
> However, if I now create another dataframe and save it using the
> fast=F option as follows
>
> df <- data.frame(S=30, T=3)
> sqlSave(channel, df, "test", rownames=F, append=T, fast=F)
>
> the table test now looks like
>
> T S
> 1 10
> 2 20
> 30 3
>
> In other words, sqlSave didn't check column names, it simply mapped
> column 1 to column 1 and column 2 to column 2.
> -------------------------
>
> I'm using R 2.3.0 and package RODBC 1.1-7 on Windows XP with MS SQL Server
>
> ______________________________________________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sun Dec 24 02:34:23 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 23 Dec 2006 - 17:31:02 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.