[R] help with RODBC

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Thu Mar 5 03:23:07 CET 2015


Why do you have single quotes inside your single quotes?
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

On March 4, 2015 5:46:23 PM PST, Alemu Tadesse <alemu.tadesse at gmail.com> wrote:
>I want to apply  the following query to my database.
>
>P2<-sqlQuery(ch1,'select *,
>      TimeStamp_Local,
>      ref_density,
>      ref_dewpoint,
>      ref_dir,
>      ref_precip,
>      ref_press,
>      ref_rh,
>      ref_snowfall,
>      ref_snowdepth,
>      ref_temperature_avg,
>      ref_temperature_max,
>      ref_temperature_min,
>      ref_ws_avg,
>      ref_ws_max,
>      ref_wetbulb
>  FROM ASOS.dbo.DailyData DD
>  left outer join ASOS.dbo.ASOS_MetaData MD on MD.WBAN = DD.WBAN
>where CallSign = 'BOS' order by TimeStamp_Local ASC')
>
>where ch1 <- odbcConnect(dsn="SQLBI01", uid="DataPull", pwd="PullData")
>
>in R (RODBC). I am running into the following error
>
>Error: unexpected symbol in:
>"  left outer join ASOS.dbo.ASOS_MetaData MD on MD.WBAN = DD.WBAN,
>where CallSign = 'BOS"
>
>I don't know why
>
>Thanks,
>
>Alemu
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list