Updating data from subpartition when the subpartition name is unknown Thanks to JSapkota who helped me pull the subpartition name as per below query

select subobject_name from user_objects where data_object_id IN 
(select dbms_rowid.rowid_object(rowid) from TABLE 
WHERE DOCID = 'S00102981655537O') 


Which gives me a result 

SUBOBJECT_NAME               
--------------
MAR16_IN_UK


Now if I update that ID using below statement it works

UPDATE TABLE SUBPARTITION (MAR16_IN_UK) 
SET FLAG = 'Y'
WHERE DOCID = 'S00102981655537O';


1 rows updated

But the same query by dynamically pulling the subpartition name would throw an error

UPDATE TABLE 
SUBPARTITION (select subobject_name from user_objects where 
data_object_id IN 
(select dbms_rowid.rowid_object(rowid) from TABLE 
WHERE DOCID = 'S00102981655537O')) 
SET FLAG = 'Y'
WHERE DOCID = 'S00102981655537O';


Error

Error report -
SQL Error: ORA-00971: missing SET keyword
00971. 00000 -  "missing SET keyword"
*Cause:    
*Action:


Version: Oracle 11g
you can not do in dynamically like this. partition name has to be known and the time when statement is compiled.

But you can use PARTITION FOR clause:

UPDATE TABLE T PARTITION FOR(TO_DATE('31-JAN-2007','dd-MON-yyyy')
...