Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Creating a Flag

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Creating a Flag
 Login/Join
 
Platinum Member
posted
Table A
 
VIN	NAME	DATE
Vin1	Test 1	2011-05-05
Vin1	Test 1	2011-05-10
Vin2	Test 2	2011-05-12
Vin3	Test 3	2011-05-01
Vin6	Test 6	2011-05-10
Vin7	Test 7	2011-05-02
Vin7	Test 7	2011-05-12
.
.
.

Table B
VIN	NAME	DATE	         FLAG
Vin1	Test 1	2011-05-05	1
Vin1	Test 1	2011-05-10	2
Vin2	Test 2	2011-05-12	1
Vin3	Test 3	2011-05-01	2
Vin6	Test 6	2011-05-10	1
Vin7	Test 7	2011-05-02	1
Vin7	Test 7	2011-05-12	2
.      
.
.
 


Please, can someoe suggest how I can generate Table B from Table A? That is adding 1s and 2s for all records in the table.

Thanks

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


WebFOCUS 7.7.02
Windows/SQL/CUBES
HTML/PDF/XLS
 
Posts: 117 | Registered: November 18, 2009Report This Post
Virtuoso
posted Hide Post
As long as the data is already sorted by VIN, NAME, and DATE, this should be easy to do with a DEFINE or COMPUTE:

DEFINE FILE ....
 FLAG/I2 = IF (VIN NE LAST VIN) OR (NAME NE LAST NAME) THEN 1 ELSE (LAST FLAG + 1);
END


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Platinum Member
posted Hide Post
Thanks for your suggestion.

But when your logic is applied, it means whenever VIN EQ LAST VIN and NAME EQ LAST NAME, Flag is 2.

Please, how would first row (vin1) have flag =1 and the second(which is same with row 1) have Flag 2.

Again, I think I will prefer a compute.


WebFOCUS 7.7.02
Windows/SQL/CUBES
HTML/PDF/XLS
 
Posts: 117 | Registered: November 18, 2009Report This Post
Platinum Member
posted Hide Post
It worked thanks. Still trying to use compute.

Thanks


WebFOCUS 7.7.02
Windows/SQL/CUBES
HTML/PDF/XLS
 
Posts: 117 | Registered: November 18, 2009Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Creating a Flag

Copyright © 1996-2020 Information Builders