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}'
guinnieAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

mlmcc
guinnieAuthor Commented:
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.
mlmccCommented:
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
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

James0628Commented:
What data type is each parameter (number, string, etc.)?

 Are the fields that you're comparing them with the same data type?

 I take it that {?Intervention} allows multiple values.  What version of CR are you using?  I think support for using a multi-value parameter in a Command like that was added some time after CR 10.

 Does {?Intervention} allow ranges, or just discrete values?

 Do any of the other parameters allow multiple values or ranges?

 James

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mlmccCommented:
When do you get the error?

Is it when you save the command?

DO you put a single value n for the parameters?

mlmcc
guinnieAuthor Commented:
{?Interventions}  is the correct syntax
guinnieAuthor Commented:
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
mlmccCommented:
So the solution was to remove the ' ' and the ( ) from the filter?

mlmcc
mlmccCommented:
So was the answer


       AND FS_INTV_PROGRAMS.INTV_PROGRAM_CODE in '{?Intervention}'

I believe I made that suggestion.

mlmcc
guinnieAuthor Commented:
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.