search for: to_char

Displaying 14 results from an estimated 14 matches for "to_char".

2010 Feb 15
4
Separating columns, and sorting by rows
Dear anyone who knows more about R than me (so everyone). I have been bashing my head on the keyboard all day trying to do something with my table. I have some data, like so: yyyy-mm Rainfall(mm) 1 1977-02 17.4 2 1977-03 34.0 3 1977-04 26.2 4 1977-05 42.6 5 1977-06 58.6 6 1977-07 23.2 7 1977-08 26.8 8 1977-09 48.4 9
2011 May 13
0
wrong argument to TO_CHAR (RODBC)?
Dear all, I can't seem to run what seems (to me!) like a common SQL statement in RODBC: data <- sqlQuery(a, 'SELECT TO_CHAR (DB1.DATE, 'yyyy') "year" FROM DB1') In contrast, data <- sqlQuery(a, 'SELECT TO_CHAR(DB1.DT_INICIO) "year" FROM DB1') works but it does not come up as I want it to (i.e., in "year" format). Can you tell me what I am doing wrong? I fi...
2010 Feb 17
3
sql query variable
This is the very last thing I need to make everything work properly. My query: sqlQuery(conn, "select to_char(lsd,'yyyy-mm') as yr,ttl_mo_prcp from mo_rains where stn_num=023000") Is there a way to may the stn_num in the query variable, ie make it so that whenever my script is run, the user must choose and input the station number? Cheers. -- View this message in context: http://n4.nabble.c...
2014 Apr 01
3
problema con RStudio
...ngo un problema con RStudio y la conexión a una base de datos. Desde la terminal no tengo problemas para ejecutar, por ejemplo: library(RODBC) channel <- odbcConnect("MiBaseDatos", uid = "MiUsuario", pwd = "MiContrasena") datos <- sqlQuery(channel,"SELECT TO_CHAR(S.B_STOD_DATO,'YYYY') \ , M.STODNR \ ... ... ...") pero desde Rstudio me encuentro siempre con el siguiente error: Warning messages: 1: In odbcDriverConnect("DSN=MiBaseDatos;UID=MiUsuario;PWD=MiContrasena") : [RODBC] ERROR: state 01000, code 0, message [unixODBC][Driver M...
2014 Apr 01
2
problema con RStudio
...> Desde la terminal no tengo problemas para ejecutar, por ejemplo: > > > > library(RODBC) > > channel <- odbcConnect("MiBaseDatos", uid = "MiUsuario", pwd = > > "MiContrasena") > > > > datos <- sqlQuery(channel,"SELECT TO_CHAR(S.B_STOD_DATO,'YYYY') \ > > , M.STODNR \ > > ... > > ... > > ...") > > > > pero desde Rstudio me encuentro siempre con el siguiente error: > > > > Warning messages: > > 1: In > odbcDriverConnect("DSN=MiBaseDatos;UID=MiUsuari...
2014 Apr 01
3
problema con RStudio
...ar, por ejemplo: > >> > > >> > library(RODBC) > >> > channel <- odbcConnect("MiBaseDatos", uid = "MiUsuario", pwd = > >> > "MiContrasena") > >> > > >> > datos <- sqlQuery(channel,"SELECT TO_CHAR(S.B_STOD_DATO,'YYYY') \ > >> > , M.STODNR \ > >> > ... > >> > ... > >> > ...") > >> > > >> > pero desde Rstudio me encuentro siempre con el siguiente error: > >> > > >> > Warning messages: &...
2005 Apr 21
1
Fwd: (KAME-snap 9012) racoon in the kame project
FYI, looks like support for Racoon is ending. Does anyone have any experience with the version in ipsec-tools ? ---Mike >Racoon users, > >This is the announcement that the kame project will quit providing >a key management daemon, the racoon, and that "ipsec-tools" will become >the formal team to release the racoon. >The final release of the racoon in the
2008 Jun 17
4
Formating Date Field
First.jsp ------------------ <jsp:usebean id="db" class="db.dbClass" scope=session/> <html> <body> <form action="MyAction.jsp" method="post"> <% ResultSet rs=db.executeQuery("select no,name from mytable"); while(rs.next()) {%> <input type=checkbox value=<%=rs.getString(1)%> onclick=callJs(<
2014 Apr 01
2
problema con RStudio
...>> >> > library(RODBC) >>> >> > channel <- odbcConnect("MiBaseDatos", uid = "MiUsuario", pwd = >>> >> > "MiContrasena") >>> >> > >>> >> > datos <- sqlQuery(channel,"SELECT TO_CHAR(S.B_STOD_DATO,'YYYY') \ >>> >> > , M.STODNR \ >>> >> > ... >>> >> > ... >>> >> > ...") >>> >> > >>> >> > pero desde Rstudio me encuentro siempre con el siguiente error: >>&...
2003 Sep 24
0
Core dump using DBI/ROracle
...me': 54 obs. of 1 variable: $ HYBRIDDATE: chr "22-MAY-2003 00:00:00" "22-MAY-2003 00:00:00" "17-JUL-2003 00:00:00" "17-JUL-2003 00:00:00" ... Here is a query which dumps core (the sql is all on one line): > d <- dbGetQuery(conn, "SELECT TO_CHAR(HybridDate, 'YYYY-MM-DD') FROM Hybridization WHERE ExperimentID=2717") Segmentation fault (core dumped) My current work around is to accept the Oracle default date format and then use R's strpdate to convert to a date format that I want. I don't like coding this way, howeve...
2008 Dec 22
2
Treatment of Date ODBC objects in R (RODBC)
Dear all, Retrieving an Oracle "Date" data type by means of RODBC (version 1.2-4) I get different classes in R depending on which operating system I am in: On MacOSX I get "Date" class On Windows I get " "POSIXt" "POSIXct" class The problem is material, as converting the "POSIXt" "POSIXct" object with as.Date() returns one
2014 Apr 01
2
problema con RStudio
...) >> >>> >> > channel <- odbcConnect("MiBaseDatos", uid = "MiUsuario", pwd = >> >>> >> > "MiContrasena") >> >>> >> > >> >>> >> > datos <- sqlQuery(channel,"SELECT TO_CHAR(S.B_STOD_DATO,'YYYY') \ >> >>> >> > , M.STODNR \ >> >>> >> > ... >> >>> >> > ... >> >>> >> > ...") >> >>> >> > >> >>> >> > pero desde Rstudio...
2009 Sep 14
9
ActiveRecord::StatementInvalid (invalid date) with Oracle
Hello all. I am a novice Ruby on Rails programmer, starting my first project using a legacy Oracle 10 database. Using ''reverse_scaffold'' I have created the models/controllers/views for my existing Oracle tables. All seems to work well, using /model/index, /model/show for most of my tables, *except* when one of the tables contains a Oracle ''date'' column, for
2008 Dec 29
0
Serial Correlation Test for Short Time Series
...g, r-help at r-project.org Message-ID: <1947895168-1229964736-cardhu_decombobulator_blackberry.rim.net-2090033294- @bxe348.bisx.prod.on.blackberry> Content-Type: text/plain I tend to avoid the issue by asking Oracle for a character string representation of the date. I use sql like this: to_char( thedatefield, 'yyyymmdd' ) as thedate Then in R: d <- as.Date( as.character( thedate, '%Y%m%d') ) Hope this helps, Avram ------Original Message------ From: Ivan Alves Sender: r-help-bounces at r-project.org To: r-help at r-project.org Sent: Dec 22, 2008 8:40 AM Subject: [...