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     [CLOSED] USING LIKE OPERATOR IN SQL PARMATOR

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] USING LIKE OPERATOR IN SQL PARMATOR
 Login/Join
 
Member
posted
What is the snytex to use LIKE with SQL? I know I have to somehow add % to the end of this but nothing I try works.

WHERE CUSTOMER_MASTER.CUSTOMER.CUSTOMER_ID LIKE '&CUSTOMER_ID';

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


WebFOCUS 7.72
Windows, All Outputs
 
Posts: 4 | Registered: February 17, 2011Report This Post
Master
posted Hide Post
Try
WHERE CUSTOMER_MASTER.CUSTOMER.CUSTOMER_ID CONTAINS '&CUSTOMER_ID';


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Report This Post
Expert
posted Hide Post
GOOGLE: SQL Like

Then, Add to Favorites...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
<JG>
posted
A first point on call is the on-line documentation in Dev Studio.

Open the online help, select the index tab and enter like in the search box.

WebFocus LIKE processing is slightly different to SQL processing.
 
Report This Post
Platinum Member
posted Hide Post
Hi

Which database are you using ?


WebFOCUS 7610
Windows
 
Posts: 121 | Registered: September 25, 2007Report This Post
Gold member
posted Hide Post
Try this:

  
WHERE CUSTOMER_MASTER.CUSTOMER.CUSTOMER_ID LIKE '&CUSTOMER_ID.EVAL%';


WebFOCUS 8
 
Posts: 74 | Location: Gahanna, OH | Registered: September 22, 2009Report This Post
Expert
posted Hide Post
Thanks everyone for your valuable input.

Sue, suggestion from our technical:

Assuming that no error messages are generated and that this is just producing no records, it may be that trailing blanks are the issue which could be coming from the source of the amper variable (usually an html form).

If this is the case, the trailing blanks will need to be removed so that the percent wild card will lay directly next to the last non blank character (unless you really want to look for them).

Here is an example which will print all LASTNAMES that begin with an A. Please note there are several ways to accomplish this. The example shows 2: one using UPCASE and the other using TRIM. This was extracted/modified from the following solution: http://techsupport.information...om/sps/21812077.html

-SET &CUSTNAM='A ';

-SET &CUSTNAMLEN=ARGLEN(&CUSTNAM.LENGTH,&CUSTNAM,'I2');
-SET &CNAM1FMT = 'A' || &CUSTNAMLEN;
-SET &WHCUST = UPCASE(&CUSTNAMLEN,&CUSTNAM,'&CNAM1FMT');
-SET &WHCUST2=TRIM('B',&CUSTNAM,&CUSTNAMLEN,' ',1,'&CNAM1FMT');

TABLE FILE EMPDATA
PRINT PIN LASTNAME FIRSTNAME
WHERE LASTNAME LIKE '&WHCUST..%'
END



Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1948 | Location: New York | Registered: November 16, 2004Report 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     [CLOSED] USING LIKE OPERATOR IN SQL PARMATOR

Copyright © 1996-2020 Information Builders