Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ultrajounin
Starting Member
1 Post |
Posted - 2011-10-28 : 14:34:13
|
I am not a DBA, just a system admin trying to run a fairly basic query which I want automated. SELECT ref_num, DATEADD(second, call_req."open_date", '12/31/1969 20:00:00') AS open_date, (SELECT userid FROM ca_contact WHERE (contact_uuid = call_req.assignee)) AS assigneeFROM call_reqWHERE (status = 'OP') AND (assignee <> 'NULL')--and call_req.open_date < 1309478400ORDER BY assignee DESC------------Open Requests----------------------SELECT c.name, a.useridFROM ca_contact a inner join call_req b on a.contact_uuid = b.assigneeleft outer join ca_resource_department c on a.department=c.idwhere b.status = 'OP' AND b.assignee is not null--and b.open_date < 1309478400group by a.userid, c.nameORDER BY c.name, a.userid DESCIve created a tsql job which parse fine (and runs fine independently) but when I "start job step" or it runs on schedule it fails with the following error:10/28/2011 14:07:57,Open Requests HD data,Error,1,DBSERVER,Open Requests HD data,run query for data,,Executed as user: NT AUTHORITY\SYSTEM. Incorrect syntax near 'open_date'. [SQLSTATE 42000] (Error 102) Incorrect syntax near the keyword 'AS'. [SQLSTATE 42000] (Error 156). The step failed.,00:00:00,15,156,,,,0 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-29 : 01:20:11
|
i dont think error is in posted code above. is this only step in job which is failing?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|
|