SQL-无效的标识符,但是在哪里? [英] SQL - Invalid Identifier,, but where?
本文介绍了SQL-无效的标识符,但是在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是SQL的初学者,现在已经尝试锻炼了几个小时了:
Im quite a beginner at SQL and I've been trying to workout for hours now what the problem is with this :
select to_char(date_Created, 'MON DD YYYY') as jours, action, count(ID)
from Logs
group by action, to_char(date_Created, 'MON DD YYYY')
union
select distinct to_char(date_Created, 'MON DD YYYY'), action, 0
from Logs
WHERE jours BETWEEN 'AVR. 14 2014' AND 'AVR. 15 2014'
当我尝试它时,它返回一个错误:
When I try it, it returns an error:
ORA-00904: "JOURS" : identificateur non valide
00904. 00000 - "%s: invalid identifier"
*Cause:
*Action:
Erreur à la ligne 7, colonne 6
谢谢!
推荐答案
怎么样:
select to_char(date_Created, 'MON DD YYYY') as jours, action, count(ID)
from Logs
group by action, to_char(date_Created, 'MON DD YYYY')
union
select distinct to_char(date_Created, 'MON DD YYYY') as jours, action, 0
from Logs
WHERE to_char(date_Created, 'MON DD YYYY') BETWEEN 'AVR 14 2014' AND 'AVR 15 2014'
这篇关于SQL-无效的标识符,但是在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文