Title: Running A Sql Job
xqqqme - November 1, 2006 07:38 PM (GMT)
I know that there is probably an easy way to do this but I can't figure out how :banghead:
I have an SQL query that updates a Lawon table in GEN that I would like for our payroll supervisor to be able to easily run.
Is there some way of setting up a Lawson job to execute my SQL update statement?
Thanks for any and all help!!
Microsoft Windows 2003
SQl Server 2000
Env 8.0.3
Apps 8.1
georgegraham - November 1, 2006 07:41 PM (GMT)
You can set up a user token to run the script.
xqqqme - November 1, 2006 07:52 PM (GMT)
What do I put in the script to get it to execute the SQL update command?
Milo - November 1, 2006 08:35 PM (GMT)
Environment 8.0.3 -- I thought that GEN wasn't in SQL until Version 9.
How are you keeping GEN in SQL? What database?
xqqqme - November 1, 2006 08:40 PM (GMT)
Oops - You're right Milo - I meant to say a table in Logan!
xqqqme - November 2, 2006 05:47 PM (GMT)
Ok I figured out what needed to be in my batch file in order to run an SQL script.
In case anybody else needs to know here is my bat file:
CD %lawdir%\scripts
isql -E -i PR_ESS_LOCKOUT.sql
Here is the SQL script I created:
Update logan.lawson.LOBKMARK
Set ACCESS =
case
when ACCESS = 'A' then 'D'
when ACCESS = 'D' then 'A'
else ACCESS
end
where BOOK_MARK in(292, 296, 314, 320, 321, 322, 330)
The SQl script contains the update command to the Logan table LOBKMARK that will
deny/allow access to the ESS bookmarks that we want to lock ESS users out of while payroll is running.
The other thing we had to do was to give specific select/update rights to the LOBKMARK table in SQL.
aarganesh - November 2, 2006 06:21 PM (GMT)
I've a question. What if the table were in Oracle or DB2? Will the same set of SQL work? Is it specific for isql or will it work even with SQL*Plus?
Thanks