Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-00933: SQL command not properly ended

user4853268Nov 12 2013 — edited Nov 12 2013

I have the following SQL statement and I keep receiving and ORA-00933: SQL command not properly ended at Line:8 Column:86, (right after "group by userid)" and for the life of me I cannot see why. mI am using SQLPlus in Oracle

update imw.users a

set user_status_cd ='DISABLED',

updated_by_id =1043,

last_admin_id =1043,

updated_dt = sysdate,

update_rmks_tx = (SELECT  'Disabled due to inactivity- Last logon ' || max(login_dt) || '- To enable this account contact your Program Manager (or State Admin). If no further activity is encountered, this account will be deleted in 60 days.'

                  FROM imw.logins b WHERE a.userid = b.userid)

where exists (select userid, max(login_dt) logindt from imw.logins l group by userid) c

where c.userid = a.userid and lastlogin <sysdate-30);

The select in the where clause is from the below statement that selects users that I need to disable and select 1700 users. I need to be able to disable these same users and that is what I am trying to do with ths statement

Thanks for any assist you can give.

Richard

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 10 2013
Added on Nov 12 2013
5 comments
606 views