Q
Problem solve Get help with specific problems with your technologies, process and projects.

Working with wild card characters in query

I'm writing an iSeries query. I need to include all of the items in a date range and then exclude two product types using a wild card. What is the wild card needed? Here is an example of the selection criteria I am using.

Select Records

Type comparisons, press Enter. Specify OR to start each new group.
Tests: EQ, NE, LE, GE, LT, GT, RANGE, LIST, LIKE, IS, ISNOT...


 
AND/OR  Field             Test   Value (Field, Number, 'Characters', or ...)
        IBIRDT            GT     2000001
 AND    IITEM             NE     '*CA'
 AND    IITEM             NE     '*EC' 

Wild card characters in a query is '%' instead of '*". It seems like you are trying to exclude data that has 'CA' characters at the end of the field so it should be:
IITEM NLIKE '%CA'

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Ask your programming questions--or help out your peers by answering them--in our live discussion forums.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.


This was last published in March 2004

Dig Deeper on RPG iSeries programming

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close