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_NA ME, PERSONS.PREFERRED_NAME_UPP ER, PERSONS.GENDER,
STUDENT_REGISTRATIONS.SCHO OL_YEAR, STUDENT_REGISTRATIONS.GRAD E,STUDENT_ REGISTRATI ONS.SCHOOL _CODE,
WSSV.IEP_FLAG, STUDENT_REGISTRATIONS.ESL_ LEVEL_CODE ,
STUDENT_REGISTRATIONS.ENGL ISH_SKILLS _DEVELOPME NT, FS_STUD_INTV_PROGRAMS.STAR T_DATE,
FS_STUD_INTV_PROGRAMS.END_ DATE, FS_INTV_PROGRAMS.FULL_NAME , SCHOOLS.SCHOOL_BRIEF_NAME,
STUDENT_REGISTRATIONS.STAT US_INDICAT OR_CODE
FROM TRILL.STUDENT_REGISTRATION S STUDENT_REGISTRATIONS
INNER JOIN TRILL.SCHOOLS SCHOOLS
ON STUDENT_REGISTRATIONS.SCHO OL_CODE=SC HOOLS.SCHO OL_CODE
INNER JOIN TRILL.PERSONS PERSONS
ON STUDENT_REGISTRATIONS.PERS ON_ID=PERS ONS.PERSON _ID
INNER JOIN TRILL.FS_STUD_INTV_PROGRAM S FS_STUD_INTV_PROGRAMS
ON PERSONS.PERSON_ID=FS_STUD_ INTV_PROGR AMS.PERSON _ID
INNER JOIN TRILL.FS_INTV_PROGRAMS FS_INTV_PROGRAMS
ON FS_STUD_INTV_PROGRAMS.INTV _PROGRAM_C ODE=FS_INT V_PROGRAMS .INTV_PROG RAM_CODE
INNER JOIN TRILL.WEC_STUDENT_SUMMARY_ VW WSSV
ON STUDENT_REGISTRATIONS.PERS ON_ID=WSSV .PERSON_ID
WHERE STUDENT_REGISTRATIONS.SCHO OL_YEAR='{ ?School Year}'
AND STUDENT_REGISTRATIONS.SCHO OL_CODE='{ ?School Code}'
AND WSSV.SCHOOL_YEAR= STUDENT_REGISTRATIONS.SCHO OL_YEAR
AND FS_INTV_PROGRAMS.INTV_PROG RAM_CODE in ('{?Intervention}')
AND Student_registrations.stat us_indicat or_code = '{?Status}'
SQL is :
SELECT DISTINCT PERSONS.STUDENT_NO,SCHOOLS
STUDENT_REGISTRATIONS.SCHO
WSSV.IEP_FLAG, STUDENT_REGISTRATIONS.ESL_
STUDENT_REGISTRATIONS.ENGL
FS_STUD_INTV_PROGRAMS.END_
STUDENT_REGISTRATIONS.STAT
FROM TRILL.STUDENT_REGISTRATION
INNER JOIN TRILL.SCHOOLS SCHOOLS
ON STUDENT_REGISTRATIONS.SCHO
INNER JOIN TRILL.PERSONS PERSONS
ON STUDENT_REGISTRATIONS.PERS
INNER JOIN TRILL.FS_STUD_INTV_PROGRAM
ON PERSONS.PERSON_ID=FS_STUD_
INNER JOIN TRILL.FS_INTV_PROGRAMS FS_INTV_PROGRAMS
ON FS_STUD_INTV_PROGRAMS.INTV
INNER JOIN TRILL.WEC_STUDENT_SUMMARY_
ON STUDENT_REGISTRATIONS.PERS
WHERE STUDENT_REGISTRATIONS.SCHO
AND STUDENT_REGISTRATIONS.SCHO
AND WSSV.SCHOOL_YEAR= STUDENT_REGISTRATIONS.SCHO
AND FS_INTV_PROGRAMS.INTV_PROG
AND Student_registrations.stat
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.
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
When do you get the error?
Is it when you save the command?
DO you put a single value n for the parameters?
mlmcc
Is it when you save the command?
DO you put a single value n for the parameters?
mlmcc
ASKER
{?Interventions} is the correct syntax
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
Accepted answer: 0 points for guinnie's comment #a40995985
for the following reason:
tested + works
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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.
mlmcc