Home » Developer & Programmer » Forms » Oracle Forms - Multiple Values in a Field - Question (Forms 12c, Database12c)
Oracle Forms - Multiple Values in a Field - Question [message #677128] Tue, 20 August 2019 17:17 Go to next message
balajiray
Messages: 6
Registered: August 2019
Junior Member
Hi
I am trying t test out adding multiple invoice #'s in one field separated by comma and use that field value
in an in() statement.

Eg:
select * from billing_hist where invoice_number in(:block.item);
I want to add multiple invoice #'s in this field separated by comma and use the query in a cursor to further process the business rules.

I am able to enter one invoice # and make it work. The moment i add the second invoice # it fails.
Any suggestions will be helpful.

regards,
Ray.
Oracle Forms - Multiple Values in a Field - Question [message #677129 is a reply to message #677128] Tue, 20 August 2019 17:24 Go to previous messageGo to next message
balajiray
Messages: 6
Registered: August 2019
Junior Member
Hi

I have to add multiple values in a single field and use that field in the where clause.

select * from bill_hist where invoice_number in(:block.item);

I want to enter multiple invoice #'s in the item field separated by comma's and use that in the query as shown above.
Then i want to use the query in a cursor to further process data.

Is this possible. Please add your suggestions.

regards,
Ray.
Re: Oracle Forms - Multiple Values in a Field - Question [message #677130 is a reply to message #677129] Tue, 20 August 2019 18:01 Go to previous messageGo to next message
BlackSwan
Messages: 26640
Registered: January 2009
Location: SoCal
Senior Member
Welcome to this forum

Please read and follow the forum guidelines, to enable us to help you:
OraFAQ Forum Guide
How to use {code} tags and make your code easier to read
Re: Oracle Forms - Multiple Values in a Field - Question [message #677139 is a reply to message #677130] Wed, 21 August 2019 09:02 Go to previous messageGo to next message
cookiemonster
Messages: 13747
Registered: September 2008
Location: Rainy Manchester
Senior Member
That's because a field with commas in it is not the same as an actual comma separated list as far as oracle is concerned.
read this varying in list
Re: Oracle Forms - Multiple Values in a Field - Question [message #677140 is a reply to message #677139] Wed, 21 August 2019 10:07 Go to previous messageGo to next message
BlackSwan
Messages: 26640
Registered: January 2009
Location: SoCal
Senior Member
OP posted & has not yet returned to read any response
Re: Oracle Forms - Multiple Values in a Field - Question [message #677156 is a reply to message #677139] Fri, 23 August 2019 08:05 Go to previous messageGo to next message
balajiray
Messages: 6
Registered: August 2019
Junior Member
hey, thanks, i will try and let you know.

regards,
Ray.
Re: Oracle Forms - Multiple Values in a Field - Question [message #677158 is a reply to message #677156] Fri, 23 August 2019 14:24 Go to previous message
balajiray
Messages: 6
Registered: August 2019
Junior Member
Hi

The below query worked for us. Thanks for all the help.

select * from bill_hist
where instr(:block.item, invoice_number) > 0;

regards,
Ray.
Previous Topic: Forms 11g Installation Configuration Error
Next Topic: Primary Key in detail block
Goto Forum:
  


Current Time: Sun Dec 08 15:18:01 CST 2019