Link to home
Start Free TrialLog in
Avatar of guinnie
guinnie

asked on

Crystal error 'missing right parenthethis' in sql command

Getting error in Add command sql with parameter definition

SQL is :

SELECT DISTINCT PERSONS.STUDENT_NO,SCHOOLS.SCHOOL_NAME, PERSONS.PREFERRED_NAME_UPPER, PERSONS.GENDER,
       STUDENT_REGISTRATIONS.SCHOOL_YEAR, STUDENT_REGISTRATIONS.GRADE,STUDENT_REGISTRATIONS.SCHOOL_CODE,
       WSSV.IEP_FLAG, STUDENT_REGISTRATIONS.ESL_LEVEL_CODE,
       STUDENT_REGISTRATIONS.ENGLISH_SKILLS_DEVELOPMENT, FS_STUD_INTV_PROGRAMS.START_DATE,
       FS_STUD_INTV_PROGRAMS.END_DATE, FS_INTV_PROGRAMS.FULL_NAME, SCHOOLS.SCHOOL_BRIEF_NAME,
       STUDENT_REGISTRATIONS.STATUS_INDICATOR_CODE
FROM  TRILL.STUDENT_REGISTRATIONS STUDENT_REGISTRATIONS
       INNER JOIN TRILL.SCHOOLS SCHOOLS
         ON STUDENT_REGISTRATIONS.SCHOOL_CODE=SCHOOLS.SCHOOL_CODE
       INNER JOIN TRILL.PERSONS PERSONS
         ON STUDENT_REGISTRATIONS.PERSON_ID=PERSONS.PERSON_ID
       INNER JOIN TRILL.FS_STUD_INTV_PROGRAMS FS_STUD_INTV_PROGRAMS
         ON PERSONS.PERSON_ID=FS_STUD_INTV_PROGRAMS.PERSON_ID
       INNER JOIN TRILL.FS_INTV_PROGRAMS FS_INTV_PROGRAMS
         ON FS_STUD_INTV_PROGRAMS.INTV_PROGRAM_CODE=FS_INTV_PROGRAMS.INTV_PROGRAM_CODE
       INNER JOIN TRILL.WEC_STUDENT_SUMMARY_VW WSSV
         ON  STUDENT_REGISTRATIONS.PERSON_ID=WSSV.PERSON_ID
  WHERE  STUDENT_REGISTRATIONS.SCHOOL_YEAR='{?School Year}'
      AND STUDENT_REGISTRATIONS.SCHOOL_CODE='{?School Code}'
      AND WSSV.SCHOOL_YEAR= STUDENT_REGISTRATIONS.SCHOOL_YEAR
      AND FS_INTV_PROGRAMS.INTV_PROGRAM_CODE in ('{?Intervention}')
      AND Student_registrations.status_indicator_code = '{?Status}'
Avatar of Mike McCracken
Mike McCracken

Try removing the single quotes.  I don't think you need them.

mlmcc
Avatar of guinnie

ASKER

I think that suggestion holds true in SQLServer. However, we are using Oracle 11g.
Yet, I did try and result was SQL didn't return rows. SQL does work when substituting values
where parameters are so I don't think its the code.
You are correct that Oracle does need the ' '.

Try taking the ( ) off.

I don't have an Oracle environment to work in so I am making suggestions that come to me.

mlmcc
ASKER CERTIFIED SOLUTION
Avatar of James0628
James0628

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
When do you get the error?

Is it when you save the command?

DO you put a single value n for the parameters?

mlmcc
Avatar of guinnie

ASKER

{?Interventions}  is the correct syntax
Avatar of guinnie

ASKER

I've requested that this question be closed as follows:

Accepted answer: 0 points for guinnie's comment #a40995985

for the following reason:

tested + works
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of guinnie

ASKER

Thermoduric:

   Your advice on responding/closing solutions/suggestions was helpful. I do not find 'closing' solutions
user friendly on your web site. I do not use this forum often only when I need a timely solution.
   Also, the term 'nonsense comment' is not professional and not appreciated. I am seriously considering
ending my agreement with your company in the future.