Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Getting previous VAT rate
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Getting previous VAT rate
 Login/Join
 
Gold member
posted
Hi,

I have a situation where I need to calculate the VAT rate for a particular account, when the account was first set to live, not at the current VA rate. So I have the start and end dates for VAT rates and I have the date the account went into action. I basically need to return the vatrate for when ACCSDAT between VATSTARTDATE AND VATENDDATE. I'm really not sure how to go about doing this. Decode was something I tried, but from what I know of DECODE (and how to use it) it will only return a matching value not a BETWEEN, same with something like DB_LOOKUP. Are there any super-duper-clever ways of doing something like this?

FILENAME=  VAT
 VSDATE      START_DATE    DMYY
 VEDATE      END_DATE      DMYY
 VATRATE     RATE          P6.3B
  


FILENAME=  ACCOUNT
 ACCID      ID    I9
 ACCSDATE   START_DATE    DMYY
 ACCMOUNT   AMOUNT        P6.3B


Thanks!

Jinx.

This message has been edited. Last edited by: Jinx,


7.6.11
Windows
HTML, PDF, Excel etc
DevStudio/Webfocus/Focus IBM
SQL Server 2000 / 2008
DB2
 
Posts: 78 | Location: UK | Registered: February 07, 2008Reply With QuoteReport This Post
Expert
posted Hide Post
Do you have VAT_Amount in your Account table?

If so then reverse engineer the VAT, if not then perhaps McGyver technique (loose join) and then use DEFINE?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Gold member
posted Hide Post
No unfortunately no VAT RATE in the account table. I've tried for 3 years to avoid the McGyver...seems like it's time to try and figure it out.
Thanks.

Jinx.


7.6.11
Windows
HTML, PDF, Excel etc
DevStudio/Webfocus/Focus IBM
SQL Server 2000 / 2008
DB2
 
Posts: 78 | Location: UK | Registered: February 07, 2008Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Use a condition-based join.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Reply With QuoteReport This Post
Gold member
posted Hide Post
Yep that's exactly what I've done.


7.6.11
Windows
HTML, PDF, Excel etc
DevStudio/Webfocus/Focus IBM
SQL Server 2000 / 2008
DB2
 
Posts: 78 | Location: UK | Registered: February 07, 2008Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Getting previous VAT rate

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.