Query error when running in SDP (fine in SQL)

Query error when running in SDP (fine in SQL)

I am trying to convert this query into a report on SDP 7 Build 7009.

When I run it in SQL it runs fine, however when I try and create a report, I get the message 'Only select queries can be executed'.

I have tried removing the isnull function, but the error still persists.

Any ideas why this won't run as a report?

The query is:

select
u.first_name NAME,
l.name USERNAME,
s.employeeid STAFF_#,
d.deptname DEPT,
c.landline PHONE,
c.mobile MOBILE,
c.emailid EMAIL,
s.jobtitle JOB_TITLE,
ISNULL(l2.password,' ' ) PASSWORD

from
dbo.aaauser U /* CONTAINS NAME*/
left join dbo.aaausercontactinfo UCI /* LINKING TABLE ONLY*/
on u.[user_id]=uci.[user_id]
left join dbo.aaacontactinfo C /* CONTAINS EMAIL & PHONE */
on uci.contactinfo_id=c.contactinfo_id

left join dbo.sduser S /* CONTAINS EMPLOYEE ID & JOB TITLE */
on u.[user_id]=s.userid
left join dbo.userdepartment UD /* LINKING TABLE ONLY */
on s.userid=ud.userid
left join dbo.departmentdefinition D /* CONTAINS DEPARTMENT */
on ud.deptid=d.deptid

left join dbo.aaalogin L
on u.user_id=l.user_id

left join dbo.usersinfo L2
on u.[user_id]=l2.password

order by NAME asc








































                    New to ADSelfService Plus?