Displaying 1 result from an estimated 1 matches for "dt_inicio".
Did you mean:
d_inicio
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 figure it has something to do with the '.
Thank you for your help,
Nuno
ps. In case you haven't noticed already I am a newbie...