rlesmoore Posted August 10, 2010 Share Posted August 10, 2010 The following SQL code results in error "ENROLL_STUDENT_KEY: Invalid Identifier". Moving the WHERE statements around indicates that the WHERE clause is not allowed at all. This makes iReports rather unusable for most reporting.Any help is appreciated. LesCode:SELECT DTBL_STUDENT."DISTRICT_CODE" AS STU_DISTRICT_CODE, DTBL_STUDENT."STUDENT_KEY" AS STU_STUDENT_KEY, FTBL_ENROLLMENTS."STUDENT_KEY" AS ENROLL_STUDENT_KEYFROM "K12INTEL_DW"."DTBL_STUDENTS" DTBL_STUDENT, "K12INTEL_DW"."FTBL_ENROLLMENTS" FTBL_ENROLLMENTSWHERE STU_DISTRICT_CODE='2082' AND STU_STUDENT_KEY=ENROLL_STUDENT_KEY Link to comment Share on other sites More sharing options...
ckampshoff Posted August 11, 2010 Share Posted August 11, 2010 Hi,try this:SELECT DTBL_STUDENT."DISTRICT_CODE" AS STU_DISTRICT_CODE, DTBL_STUDENT."STUDENT_KEY" AS STU_STUDENT_KEY, FTBL_ENROLLMENTS."STUDENT_KEY" AS ENROLL_STUDENT_KEYFROM "K12INTEL_DW"."DTBL_STUDENTS" DTBL_STUDENT, "K12INTEL_DW"."FTBL_ENROLLMENTS" FTBL_ENROLLMENTSWHERE DTBL_STUDENT."DISTRICT_CODE"='2082' AND DTBL_STUDENT."STUDENT_KEY" = FTBL_ENROLLMENTS."STUDENT_KEY"HTHChristina Link to comment Share on other sites More sharing options...
rlesmoore Posted August 11, 2010 Author Share Posted August 11, 2010 Excellent - apparently it doesn't understand an sql alias. Thanks so much. Les Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now