SQL查询" 00904. 00000-“%s:无效标识符"; [英] SQL Queries "00904. 00000 - "%s: invalid identifier"
问题描述
我有以下代码
SELECT entertainer_id,
entertainer_groupname
FROM casestudy_entertainer
INNER JOIN casestudy_availability ON
casestudy_entertainer.entertainer_id
= CASESTUDY_AVAILABILITY.AVAILABILITY_ENTERTAINERID
INNER JOIN casestudy_calendardates ON
CASESTUDY_AVAILABILITY.AVAILIBILITY_CALENDARDATEID
= casestudy_calendardates.calendar_Id
WHERE entertainer_type = '&Entertainer_TYPE'
AND casestudy_calendardates.calendar_date = '&Event_date'
当我运行它时,我似乎无法弄清它不喜欢什么. 它给了我以下错误
And I don't seem to be able to figure out what its not liking when I run this. It gives me the following error
ORA-00904:"CASESTUDY_AVAILIBILITY"."AVAILIBILITY_CALENDARDATEID":无效的标识符 00904. 00000-%s:无效的标识符" *原因:
*行动: 第7行错误:4列
ORA-00904: "CASESTUDY_AVAILIBILITY"."AVAILIBILITY_CALENDARDATEID": invalid identifier 00904. 00000 - "%s: invalid identifier" *Cause:
*Action: Error at Line: 7 Column: 4
我确实将所有表都放在正确的行中. 唯一的事情是我到目前为止还没有数据,这可能是问题所在吗?
I do have all the tables in place with all the correct rows. The only thing is I have no data as of yet, Could this possibly be the issue?
推荐答案
对于表/列标识符,应尝试使用小写字母(例如from
/inner join
子句中的内容):
You should try the lower case for the table/column identifiers(like in from
/inner join
clauses):
SELECT entertainer_id,
entertainer_groupname
FROM casestudy_entertainer
INNER JOIN casestudy_availability ON casestudy_entertainer.entertainer_id = casestudy_availability.availability_entertainerid
INNER JOIN casestudy_calendardates ON casestudy_availability.availibility_calendardateid = casestudy_calendardates.calendar_id
WHERE entertainer_type = '&Entertainer_TYPE'
AND casestudy_calendardates.calendar_date = '&Event_date'
这篇关于SQL查询" 00904. 00000-“%s:无效标识符";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!