QBE: More specific options (AND/OR...)?

timallen

timallen

Well Known Member
In Query By Example (QBE), is there a way of specifying, for example, AND and OR clauses?

I have found, for example, that I can use a clause like
!=XJDEOFF1
to specify a NOT. Also, in *some* fields, I can say
>01/01/2000
to specify dates in the year 2000 or later.

But I would really like to be able to specify:
>01/01/2000 && <01/01/2001
OR
=1|2

But there doesn't seem to be a way. Does anyone have a list of the possible clauses in QBE?
 
Tim,

One thing that you need to know is that when you use the '*' (asterisk) at the end of your QBE line, OneWorld will consider what's inside the QBE using the LIKE operator. That mean you will be able to use all possible control caracter from the LIKE clause in the QBE line. I tested this under SQL, I know you are under Oracle but give it a try !

Example : (forget the double quotes in example)

"box number [23]2*" will find "box Number 22" and "box Number 32"

"box number [^23]2*" will find "box Number 12" , "box Number 42", "box Number 52", etc...

Look at this from SQL Server help (I hope this also apply in Oracle) :


% Any string of zero or more characters. WHERE title LIKE ‘%computer%’ finds all book titles with the word ‘computer’ anywhere in the book title.

_ (underscore) Any single character. WHERE au_fname LIKE ‘_ean’ finds all four-letter first names that end with ean (Dean, Sean, and so on).

[ ] Any single character within the specified range ([a-f]) or set ([abcdef]). WHERE au_lname LIKE ‘[C-P]arsen’ finds author last names ending with arsen and beginning with any single character between C and P, for example Carsen, Larsen, Karsen, and so on.

[^] Any single character not within the specified range ([^a-f]) or set ([^abcdef]). WHERE au_lname LIKE ‘de[^l]%’ all author last names beginning with de and where the following letter is not l.

Tell me about it

Christian Audet
 
Thanks for your response, Christian.

I tried using your wildcards in our Oracle based system, but they did not work for me.

For example, in Batch Versions, with the R98403, I tried
XJDE000[12]*
and
XJDE00[01]1*
for version. Not only did it not work, but the QBE changed the versions searched for like this:
XJDE000[12
XJDE00[01]

So it looks like the SQL server system lets these wildcards work, but not Oracle.

Thanks for your help, though.
 
Back
Top