Home » Developer & Programmer » Forms » Oracle Forms search criteria
Oracle Forms search criteria [message #466304] Mon, 19 July 2010 00:34 Go to next message
orafaqsmheann23
Messages: 13
Registered: June 2010
Junior Member

Hi,

I would like to know how can I retrieve both values below in rms forms 9i.

Both values pertains to one id.
id - 00012345 (with zeroes)
id - 12345 (w/out zeroes)

The id is use as one of earch criteria.

Thanks a lot
Re: Oracle Forms search criteria [message #466307 is a reply to message #466304] Mon, 19 July 2010 01:00 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator

  • enter query mode (<Enter query>)
  • into the ID item enter :a (colon a). It indicates that you'd want to enter a more complex search criteria and represent it with a variable name "a". Could be any other letter or name, but that's simple enough
  • press <Execute query>. A window will open. It makes it possible to enter the whole WHERE clause
  • type:
    where :a in ('00012345', '12345')
    or
    where :a like '%12345'
    or any other criteria you find useful
  • push the <OK> button (or whichever it is; can't remember exactly)
  • records that satisfy the condition are returned
Re: Oracle Forms search criteria [message #466313 is a reply to message #466307] Mon, 19 July 2010 01:11 Go to previous messageGo to next message
orafaqsmheann23
Messages: 13
Registered: June 2010
Junior Member

Thanks littlefoot.

I tried the LTRIM on the where clause on the both sides.

select 'x'
from ID_table
where ltrim(id,'0') = ltrim(:b_a.ti_id,'0')
and it returns the record.

Re: Oracle Forms search criteria [message #466354 is a reply to message #466313] Mon, 19 July 2010 03:15 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If you are happy with LTRIM, why not? I said:LF

or any other criteria you find useful
Previous Topic: Populating non database column
Next Topic: Inserting multiple selected records into database when click the button
Goto Forum:
  


Current Time: Fri Sep 20 06:58:12 CDT 2024