Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fill with previous values
Message
From
30/10/2020 06:34:43
 
 
To
30/10/2020 01:10:20
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01676862
Message ID:
01676869
Views:
66
This message has been marked as the solution to the initial question of the thread.
Scan
   If ratio # 0
      lnRatio = ratio
   Else
      Replace ratio with lnRatio
   EndIf
Endscan
Browse
>Dear Experts,
>
> I have these codes
>
>
>Create Cursor table1 (sno N(3), ratio N(5,2))
>Insert Into table1 Values(1,5.6)
>Insert Into table1 Values(2,0)
>Insert Into table1 Values(3,0)
>Insert Into table1 Values(4,7.8)
>Insert Into table1 Values(5,0)
>Insert Into table1 Values(6,0)
>Insert Into table1 Values(7,3)
>Insert Into table1 Values(8,0)
>
>
>The result looks like this
>Attachment 1
>https://ibb.co/2c1LxBG
>
>But I need this result
>Attachment 2
>https://ibb.co/GdNbW0x
>
>Example:
>
>record 1
>
>ratio is 5.60
>
>record 2
>
>ratio 0
>
>Want to fill record 2 with 5.60 until next ratio is found.
>
>Please
Previous
Reply
Map
View

Click here to load this message in the networking platform