Click here to Skip to main content
15,895,256 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i want to check condition curr row with prev row
if value is greater i want to insert value in table "buy" else "sell"
Posted
Comments
ZurdoDev 27-Feb-15 7:59am    
What is your question?
Member 10694442 27-Feb-15 8:12am    
above is my question
ZurdoDev 27-Feb-15 8:20am    
What column? What control? Where are you stuck?

No, you have not asked a question.

But to compare previous to current, that's all you do. Check the current row and the current row-1.
CHill60 27-Feb-15 8:18am    
This is the last time I am going to mention this - you MUST put all of the relevant detail into your question. I have already tried to help you by editing your post i want to insert buy or sell value if the value of 10th record of (close)column is greater then 9th record of(refrance) then insert value buy otherwise sell[^]. Which brings me to the "please stop reposting the same question"
Member 10694442 27-Feb-15 8:22am    
dont talk with me lyk this ok
this site hve no terms and condition
so shut up

1 solution

Try to select the curr and prev value and put them in int var and keep the id of prev then
try to compare between cur and prev with if loop if return true do insert in your table
if it does not work post your code so I can understand more
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900