Advertisement

10.30.2008 at 05:44AM PDT, ID: 23861389 | Points: 500
[x]
Attachment Details

Need some help

how can i check the value is present?

suppose,i have interest values like '1:2:3'

I did this logic but its working sometimes and most of the times i changed the two values,its not working

for i in 1..loopcountVar
loop
  IF (INSTR(r.interest,i) > 0) AND mod(floor(u.CD1_INTEREST/power(2,i)),2)=0 THEN  
                  bb:=u.CD1_INTEREST+power(2,i);
      END IF;
end loop;

r.interest value is coming from one table(batch table).values will be '1:3:4' or '2:6:8' or '1:4:5:7' and so on..

CD1_INTEREST values is already in the database(users table).It's value is coming from another database(it's no matter where the value is coming)
But we need to check the value is present in users database.if not we need to add the existing with power value in the users table.

The above logic i have implemented but if the first time i gave the value batch table like 1:2:3 it is going to populate correctly it's value will be 14.
second time i gave the values 1:4:3,its populating and updating correctly.The value will be 14+16=30 Again, third time i gave the values
1:5:7,Here i changed the two values but its not populating correctly when i changed two or three values..

Can you please check whether the logic is correct or not.

Thanks in advanc
 
Expert Comment by awking00:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Author Comment by kirank05:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by sujith80:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Author Comment by kirank05:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by sujith80:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Author Comment by kirank05:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by sujith80:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by awking00:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
20081119-EE-VQP-46 - Hierarchy / EE_QW_2_20070628