Note that there are some explanatory texts on larger screens.

plurals
  1. POSQL Server 2008 R2 query error: Incorrect syntax near ':'
    text
    copied!<p>I have a problem with a certain query given to me and I don't know how to solve that problem.. here is the query..</p> <pre><code> SELECT dcm.code DCM_No, dcm.datetime_created DCM_Date, lne.seq_number, par.code, par.description particular, ft.description fee_type, lne.amount, case when lne.drcr =1 then 'Debit' else 'Credit' end DrCr, case when isnull(dcm.is_sd,'N') = 'Y' then 'Salary Deduction' else null end is_sd, org.description Company, org.postal_address company_addr, 'S.Y. ' + substring(sy.school_year,1,4)+'-'+substring(sy.school_year,5,4) +' '+sem.description SY, entity_a.code + ' - ' + coalesce(entity_a.stud_lname,'') +', '+coalesce(entity_a.stud_fname,'') +' '+coalesce(entity_a.stud_mname,'') Student, case when isnull(dm.description2,'') = '' then crs.course_short_name + '-'+convert(char(1),entity_a.stud_grade) else crs2.course_short_name + '-'+convert(char(1),reg.stud_grade) end as Course, isnull(dm.description2,'Not Enrolled') FROM es.lib_rgn_students entity_a left join ars.ars_dcm dcm on dcm.entity_id = entity_a.id LEFT JOIN afs.entity entity_b ON dcm.prepared_by_id = entity_b.id LEFT JOIN ua.user_account ON dcm.prepared_by_id = ua.user_account.id left join ars.ars_dcm_line lne on lne.ars_dcm_id = dcm.id left join es.lib_fin_fees_master par on par.id = lne.ars_particular_id left join es.lib_fin_feetype ft on ft.code = lne.fee_code left join es.stp_sysem sy on sy.id = dcm.period_id inner join es.stp_semesterms sem on sem.code = sy.semester and sem.trimester = 0 inner join afs.organization org on org.id = sy.company_id inner join es.lib_crs crs on crs.id = entity_a.course_id left join es.trn_rgn_reg_hdr reg on reg.period = sy.id and reg.stud_id = :as_studid left join document_status_map dm on dm.code = reg.document_status left join es.lib_crs crs2 on crs2.id = reg.course_id WHERE (dcm.entity_id = :as_studid ) AND ( dcm.period_id = :as_period ) AND ( dcm.document_status_code not in(2,3) ) </code></pre> <p>and I have this error:</p> <blockquote> <p>Incorrect syntax near ':'.</p> </blockquote> <p>pls help i am not good with this :(</p> <p>thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload