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     Where can I find documentation on using the Matches Pattern

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Where can I find documentation on using the Matches Pattern
 Login/Join
 
Silver Member
posted
I'm using developer's Studio and I used the Expression Builder to do a selection criteria and choose the Matches Pattern option.

I'm trying to find a data in the column that is in this format

999-999999-99

I've tried putting it in as 9's and as #'s. I can't seem to get it to find anything.

I also tried the like statement with the same results.

I can't find anywhere that documents what syntax it needs for the pattern.
 
Posts: 45 | Registered: March 18, 2005Report This Post
Master
posted Hide Post
LIKE '___-_____-__' should work _ is wildcard single char in SQL.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Silver Member
posted Hide Post
quote:
LIKE '___-_____-__'


That would give me all of the ones with numerics and alphas. I'm only wanting the one's with alphas

99-999999-99 is what I want, not anything like
aa-999aaa-99 etc.
 
Posts: 45 | Registered: March 18, 2005Report This Post
Master
posted Hide Post
Doh! yes...

You could use CHKFMT function but this would require testing on wf server rather than DBMS.

WHERE EDIT(FIELD,'9') GE '0' AND EDIT(FIELD,'9') LE '9' AND EDIT(FIELD,'$9') GE '0' AND EDIT(FIELD,'$9') LE '9' AND ...
Will translate to server substrs but is extremely cumbersome

Best would be the incorrect where clause to speed up things on the server + CHKFMT.

Can anyone think of anything neater than this?

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



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Expert
posted Hide Post
quote:
That would give me all of the ones with numerics and alphas. I'm only wanting the one's with alphas

99-999999-99 is what I want, not anything like
aa-999aaa-99 etc.


From your examples it appears you want the numeric and NOT the alphas.

This may do the trick:

WHERE FLD1 LIKE '%%-%%%%%%-%%' AND FLD1 FROM '00-000000-00' TO '99-999999-99'

This might be enough:

WHERE FLD1 FROM '00-000000-00' TO '99-999999-99'


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
Fran

Unfortunately 0A will pass the FROM test.

Think its a good idea tho to use this test with the earlier mask to limit returned from dbms.

WHERE FLD1 FROM '0' TO '9'

Then for strictness sake you will need CHKFMT to weed out the ones that get through.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report 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     Where can I find documentation on using the Matches Pattern

Copyright © 1996-2020 Information Builders