Yes that is just what I did! SQL log files in the AR System Admin > Server Administration.
And I found that for some reason my system’s date format was different than the one that Jason gave. And also for some reason, I don’t have to specify the + or minus of GMT difference either like Jason has. So this time I’m going to try this: SET <date-time-field> = DATEDIFF(second,’01/01/1970 00:00:00’, ‘$TIMESTAMP$’) Instead of the recommended: SET <date-time-field> = DATEDIFF(second,’1970-01-01 00:00:00’, ‘$TIMESTAMP$’) +25200 Now isn’t that interesting! It just goes to show…. I sure hope it works this time! J *From:* Action Request System discussion list(ARSList) [mailto: arslist@ARSLIST.ORG] *On Behalf Of *Joe Martin D'Souza *Sent:* Tuesday, May 08, 2012 4:28 PM *To:* arslist@ARSLIST.ORG *Subject:* Re: Direct SQL question - in Log file ARACTSQL("xxx",0,-1,-2,1000000161) ** That’s what I would suggest too.. And you seem to be really having fun with this baby for someone who is a newbie.. There have been instances where I have had some really weird results using direct SQL. I regret now not logging them as bugs as I do not recall how to reproduce them. I remember one case where I had a particularly long SQL using several nested TRANSLATE functions where the $ variables yielded wrong results. And at times even errored. The same statement on that occasion would run perfect on the SQL client, but when ran in a set field operation, somehow mixed up the order in which the variables were assigned values, thus resulting in errors at times and at others wrong assignments.. So like you have been cautioned by the likes of David, and others, use this option sparingly in your workflow, and only at times when you think that it is just not possible to achieve the same results with any of the native ARS functions.. I do understand this kind of qualifies to be one such example.. Joe *From:* Axton <axton.gr...@gmail.com> *Sent:* Tuesday, May 08, 2012 4:19 PM *Newsgroups:* public.remedy.arsystem.general *To:* arslist@ARSLIST.ORG *Subject:* Re: Direct SQL question - in Log file ARACTSQL("xxx",0,-1,-2,1000000161) ** Look in the SQL logs on the server. On Tue, May 8, 2012 at 2:20 PM, smiley <nti...@umich.edu> wrote: Hi all - I thought maybe I have my Direct SQL sort of working now. But I can't find any evidence of an Update occuring. Any ideas? Here is the Update statement in the Direct SQL: UPDATE HPD_Help_Desk SET UM_Opened_By = '$USER$', UM_Opened_Date = DATEDIFF(second,'1970-01-01 00:00:00','$TIMESTAMP$')-144000 WHERE Incident_Number = '$Incident Number$' AND Incident_Number != '' AND UM_Opened_By = ''; In the Log file, (I'm on Mid-Tier ITSM 7.6.03) my Active Link got past the Run If Qualifications and says it will run the Action 0. Then I get this mysterious line in the log file -- ARACTSQL("<name of my AL>",0, -1,-2 1000000161) Nothing past that, and the next active links run. Here is the actual log file: . . . ActiveLink: +UM:HPD:INC:OnOpen_510_OpenedBy_Upd True actions: action 0 ARACTSQL("+UM:HPD:INC:OnOpen_510_OpenedBy_Upd",0, -1,-2, 1000000161) . . . Does anyone know where I find out what these parameters are? I know the '1000000161' is the field id for Incident Number. I'm looking in ARUtilities in the SQL part to see if the Update occured and the 2 fields I'm trying to update are still blank: SELECT Incident_Number,UM_Opened_By,UM_Opened_Date,Last_Modified_By,Last_Modified_Date FROM HPD_Help_Desk where Incident_Number='INC000000031823'; Thank you for any help!!! _attend WWRUG12 www.wwrug.com ARSlist: "Where the Answers Are"_ _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"