Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 查询笔记本电脑中的数据_R - Fatal编程技术网

R 查询笔记本电脑中的数据

R 查询笔记本电脑中的数据,r,R,我正在尝试使用块本身的方法查询SQLExpress数据库,这样我就不必格式化SQL,这会标记我不理解的错误 ```{r,sql, connection=con,output.var="df2"} select Empleados.firstName + ' ' + Empleados.middleName + ' ' + Empleados.lastName as Jefe_Proyecto, Planificadores.U_refproy as Proyecto, P

我正在尝试使用块本身的方法查询SQLExpress数据库,这样我就不必格式化SQL,这会标记我不理解的错误

```{r,sql, connection=con,output.var="df2"}
select 
Empleados.firstName + ' ' + Empleados.middleName + ' ' + Empleados.lastName as Jefe_Proyecto,
Planificadores.U_refproy as Proyecto, 
Planificadores.U_reffase as Fase
from [@ITAPROYSEG] Planificadores 
inner join OPRJ proyectos on Planificadores.U_refproy=Proyectos.PrjCode
inner join  OHEM Empleados on Planificadores.U_empid=Empleados.empID
inner join [@ITAPROYFASES] Fases on Planificadores.U_reffase=Fases.U_codfase
where Empleados.U_Activo='Sí' and Proyectos.U_prop1='Y'
order by Jefe_Proyecto, Proyecto, Fase
```
有什么想法吗

问候

不要将r放在块头中!
正确的语法是{sql,connection=con,output.var=df2}

如果我这样做,块选项就会消失,也就是说,我没有执行它的按钮。您仍然需要在itI前面加上反勾号:``{sql,connection=con,output.var=df2}