Hi
I am inserting Data into OCI satge , after inserting I am dating the same data selecting SQL , after tab , its working fine , but in log file it is throwing a warning like " invalid SQL statement " , b'coz of this warning my sequnce is aborting , can u suggest me how to avoid this warning ?
thanks in advance
Updat after Inserting
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 38
- Joined: Sat Feb 28, 2004 12:11 pm
CopyOfEdu..Oracle_OCI_4: ORA-00900: invalid SQL statementray.wurlod wrote:Get the full error message, including the SQL statement that is invalid, and fix it.
SQL Statement :
Update EDU_AGG_T
Set Imm_Row = 'N'
where ACC_NO in
(select ACC_NO From (SELECT MAX(ACC_NO) ACC_NO, ACC_KEY
from EDU_AGG_T group by ACC_KEY) )
Update is working correctly , but job is throwing above warnig , b'coz of this sequnce is aborting , need help
Thanks
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 38
- Joined: Sat Feb 28, 2004 12:11 pm
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Try
Or if you want to add both the Acc_Key also, then try
Code: Select all
Update EDU_AGG_T
Set Imm_Row = 'N'
where ACC_NO in
(SELECT MAX(ACC_NO) ACC_NO_KEY from EDU_AGG_T )
Code: Select all
Update EDU_AGG_T
Set Imm_Row = 'N'
where (ACC_NO, ACC_KEY) in
(SELECT MAX(ACC_NO) ACC_NO2, ACC_KEY
from EDU_AGG_T group by ACC_KEY )