tsql - query throwing error in web report writer -


i have query/view created used in report. when run in sms , in ssrs run fine. when connect view tool generates our reports throws following error. incorrect syntax near '.8'. when contact support product has how calculate 8thgradyear . have placed code below. suggestions.

select         dbo.studemo.suniq,  dbo.studemo.ident,  dbo.studemo.lastname, dbo.studemo.firstname, dbo.studemo.emailaddr stuemail,  dbo.studemo.birthdate,  dbo.track.schoolc,  dbo.school.schname,  dbo.stustat.graden, dbo.stustat.edate,  dbo.zstustat.descript status,  rtrim(dbo.facdemo.lastname) + '  ' + dbo.facdemo.firstname advisor,  dbo.track.schyear, sum(8) - dbo.stustat.graden + dbo.track.schyear [8thgradyear], sf.email, lower(sf.username) [user], lower(right(sum(8) - dbo.stustat.graden + dbo.track.schyear, 2) + left(dbo.studemo.firstname, 1) + replace(replace(replace(dbo.studemo.lastname, '-', ''), ' ', ''), '''', '') + right(dbo.studemo.ident, 3)) newuser,  convert(varchar(8), dbo.studemo.birthdate,1) password,  'students' + '/' + (case when track.schoolc in ('19', '43', '17', '23') 'middle' else 'elementary' end) + '/' + dbo.school.schname neworg,                           sf.ou, sf.lastlogintime            dbo.studemo inner join                          dbo.stustat on dbo.studemo.suniq = dbo.stustat.suniq inner join                          dbo.track on dbo.stustat.trkuniq = dbo.track.trkuniq inner join                          dbo.zstustat on dbo.stustat.stustatc = dbo.zstustat.stustatc inner join                          dbo.facdemo on dbo.stustat.funiq = dbo.facdemo.funiq left outer join                          dbo.vw_google_ou sf on sf.firstname = dbo.studemo.firstname , sf.lastname = dbo.studemo.lastname inner join                          dbo.school on dbo.school.schoolc = dbo.track.schoolc        (dbo.stustat.stustatc in                              (select        stustatc                                           dbo.zstustat zstustat_1                                       (snstatus in ('a', 'm', 'p')))) , (dbo.stustat.xdate null or                          dbo.stustat.xdate < dbo.stustat.edate) , (dbo.track.schoolc not in ('p34', 'p24', '802', '801')) group dbo.studemo.suniq, dbo.studemo.ident, dbo.studemo.lastname, dbo.studemo.firstname, dbo.studemo.birthdate, right(dbo.studemo.ident, 3), dbo.track.schoolc,                           dbo.stustat.graden, dbo.zstustat.descript, rtrim(dbo.facdemo.lastname) + '  ' + dbo.facdemo.firstname, dbo.stustat.edate, dbo.studemo.gradyear, dbo.track.schyear,                           sf.email, convert(varchar(8), dbo.studemo.birthdate, 1), sf.username, dbo.school.schname, sf.ou, dbo.studemo.emailaddr, sf.lastlogintime 

sum function introduced in sql server 2008 , tool must using , older version of sql server.


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -