Solved

Oracle - default_where in oracle forms

Posted on 2014-09-19
5
260 Views
Last Modified: 2014-09-19
I an using default_where.

SET_BLOCK_PROPERTY('qc_poch_again',default_where,'procedure_id = v_poch_procedure_id and term_date is null and EQUIP_TYPE_ID = :parameter.equip_type_id1 and qc_type_id = :qc_daily.qc_type_id AND qc_subtype_id = :qc_daily.qc_subtype_id');
                   GO_BLOCK('qc_poch_again');               
               EXECUTE_QUERY;


 But wanted to know if I can use procedure_id in (1205,1224)

'procedure_id = v_poch_procedure_id
0
Comment
Question by:anumoses
  • 3
  • 2
5 Comments
 
LVL 73

Accepted Solution

by:
sdstuber earned 500 total points
Comment Utility
you should be able to,  but...

if your variable is just a string like '1205,1224'   then it won't work. because it simply looks like a list  but is still only one string
0
 
LVL 6

Author Comment

by:anumoses
Comment Utility
Yes procedure_id is a number data type.
0
 
LVL 73

Expert Comment

by:sdstuber
Comment Utility
I don't know what you're trying to tell me.
I was referring to the variable, not the column.
0
 
LVL 6

Author Comment

by:anumoses
Comment Utility
ok got the answer. So its not possible. Thanks
0
 
LVL 73

Expert Comment

by:sdstuber
Comment Utility
it should still be possible but not necessarily convenient.  A simple variable substitution won't do it.

Assuming your  v_poch_procedure_id is a string like '1205,1224'

you could use a function to parse the string and turn it into a collection and then do something like this

procedure_id member of (str2tbl(v_poch_procedure))

you can search EE for str2tbl, I've posted code for it several times,  Tom Kyte wrote the original, you could check his site too.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now