Filling of LOV using like operator
Hello...IAM trying one fill a LOV using like operator.
I want a solution to this for the following problem...
I have a block of text as "inp" and I have a list box with the Name, addr, subject values.
After entering a substr in text box for example 'BA', and then select the name in the list box
He must complete a lov having names which appears the BA...
Like this
Radha Bai
Marie Charlotte
Belot
As much as BA is present, it must appear in the LOV.
I have genereated Lov with the following code
SELECT name from table-name, whose name like ' %: inp.
so I called the lov in when-item-changed.
But LOV is not filling.
I changed the code you select name from table_name where substr (name, 1, 1) as substr(:inp,1,1)
It displays the names starting with the first letter of the entry.
I want to fill the lov using %: % inp...
Someone help me...
Hai,
Try
SELECT NAME FROM TAB_NAME WHERE NAME LIKE '%' || :inp || '%'
Kind regards
Manu.
If this answer is useful or appropriate, please mark. Thank you.
Tags: Oracle Development
Similar Questions
-
How to pass the variable in the lov using like operator SQL
Hello.
I want to use a lov I pass a variable using like operator.
my query is
Select empno, name of the table where empno as ': ed %';
I want to show a % or B empno % so my empno is A001 to A199 AND B001 to B199
How can I do this?
regardsSet the property default_where to the block and run the query
set_block_property ('myblock ', default_where,' like upper (Ename)' |: mybind |) » %');
-
How to use 'LIKE' operator/substr/instr with if condition?
Hello
How to use 'LIKE' operator/substr/instr with if condition?
I can use the following function:
<? xdofx:InStr('ssStatus','Open',1) = '0'? >
which returns true or false depending on ssStatus as Open *.
But when I try to use <? If: xdofx:instr('ssStatus','Open',1) = '0'? > calculating <? end if? >
It gives an error.
Any suggestion? OR a solution?
Thank you.
Published by: user12427117 on March 10, 2011 20:42
Published by: user12427117 on March 10, 2011 20:46You can try to use
0? >
Use contains to AS
-
Hello
I have a table with columns. Values in a column (vendor_source) has unique sides. as "32587abc".
I wanted to remove the single sides for values of this column. I used as an operator in sql.
But there is no chance.
Please help me in this regard.
Concerning
BRMWhwn you want to reference a quote as a value, you must put twice as shown below
update your_table set vendor_source = repalce(vendor_source,'''') where vendor_source like '%''%' --"If you dont use this filter also, it will work"
If you are looking for something else,
View the sample data (CRETAE TABLE and INSERT scripts) and the expected results.
And, what you have tried - and error messages, if applicable.Published by: JAC on November 7, 2012 11:47
-
Can I use 'like' operator in the column virtaul
Hello
can I use as an operator in the column virtaul as below?
or how can I use it?
----------------------------------------------------------------------------------------------------------------
create table tab1
(
C_N_NUMBER VARCHAR2 (25).
ACE RESET_STS (CASE C_N_NUMBER
WHEN as 'RESET %' THEN 'NO RESET' OTHER END NULL) VIRTUAL
) ;
------------------------------------------------------------------------------------
Rgds,
PCHello
you, the correct syntax iscreate table tab1
(
C_N_NUMBER VARCHAR2 (25).
ACE RESET_STS (CASE
WHEN C_N_NUMBER like 'RESET %' THEN 'NO RESET' OTHER END NULL) VIRTUAL
) ;Jirka
-
How to use 'not like' operator in BI Publisher
We build a report using BI publisher and need to put a check where you should see only the lines where the code does not start with S. We are aware of the starts - with operator in BI publisher, but when we try to use it with no, BI publisher generates an error. Can you please let us know how to use the not operator with "starts - with" or "contains" bi publisher?
Also how to use 'not like' operator in BI Publisher?
Any help will be really appreciated.
Thank youYou can use
not(starts-with(ELEMENT_NAME, 'A')
-
How can I fill the records using the value LOV
Create a form based on the use of the following output Table EMP
Create a database block IE control-> Dept No. block
Create a database block - EMP
Create a LOV to the Dept not according to the dept table.
For the current No. Dept. Complete records of the employees
How can I fill the records using the value LOV?
Thank youHello
Create trigger KEY-LISTVAL for control_block.dept_no with code similar to the following:
IF SHOW_LOV ('LOV_NAME') THEN SET_BLOCK_PROPERTY ('EMP_BLOCK', DEFAULT_WHERE, 'DEPT_NO = ' || :CONTROL_BLOCK.DEPT_NO); GO_BLOCK ('EMP_BLOCK'); EXECUTE_QUERY; END IF;
Hope this helps
Best regards
Arif Khadas
-
How to fill LOV using values of execution
Hello!!
I use jdeveloper 11.1.1.5
I had created VO GlJrnlHd as an af:form and GlJrnlLnVO as an af:table I had also created a viewlink between TwoTable
I have a LOV in GlJrnlLnVO [GjlAcct] when my user clicks the Lov must be values in the LOV using below queryy
Select * from gllvlacct where glalplant =: plant [this plant must be get from the Runtime that is, factory of GlJrnlHd]
How can I achieve this.,.Hapin
In my workplace, I can't open that link, it is behind our proxy. -
Problem with the selection list dynamic LOV using bind variables
I have the following SQL to fill a selection list:
Select d, ch from
(
Select ft. FAMT_NAME d, pi. R FAM_ID_T of FAMILY_TRA ft
Join the ck list
on ck.family = ft.famt_name and ck.newseq in (: NEWSEQ_QUERY_SQL)
)
Where NEWSEQ_QUERY_SQL is a part of the application that is defined by a calculation of page and essentially returns a list of values NEWSEQ based on some parameters of the user query. For example:
Select distinct (ck.newseq) in the ck list where rownum < 20
The query above works fine with SQL Developer and returns two columns needed (display_value, return_value)
However, it returns no line, when it is used to fill the LOV to a selection list.
If I replace the: NEWSEQ_QUERY_SQL with a list of NEWSEQ hard-coded, it works:
Select d, ch from to)
Select ft. FAMT_NAME d, pi. FAM_ID_T r
of FAMILY_TRA ft join checklist ck on (ck.family = ft.famt_name and ck.newseq in ('K0242900', 'K0217200'))
) ;
I can even replace: NEWSEQ_QUERY_SQL with hard-coded SQL and it works:
Select d, ch from
(
Select ft. FAMT_NAME d, pi. R FAM_ID_T of FAMILY_TRA ft
Join the ck list
on (ck.family = ft.famt_name and ck.newseq in (select ck.newseq from the list ck where rownum < 20))
)
But if there is a connection variable (: NEWSEQ_QUERY_SQL), it doesn't.
Selection lists are driving me crazy! They seem incredibly capricious.Hello:
You cannot link a "sql statement" that bind the value you're trying to do.
P2_FAMILY_LIST must be the SQL statement you executed for the LOV. Something likeselect d, r from ( select ft.FAMT_NAME d, ft.FAM_ID_T r from FAMILY_TRA ft join checklist ck on (ck.family = ft.famt_name and ck.newseq in (select ck.newseq from checklist ck where rownum < 20)) )
CITY
-
Filter Table ADF | with the Like operator
Dear all,
I use JDeveloper 12 c.
I have an obligation to provide the filter on the table with the 'Like' operator
I'm following Ashish Awasti method on it. Ashish Awasthi (Jdev/ADF) Blog: filter on af:table column programmatically, Invoke 'FilterableQueryDescriptor' t...
All very well here. In "FilterableQueryDescriptor" default search operator is "begins by". Is it possible to change the operator "starts by ' to 'Like' operator.
Please suggest.
Thank you
Vieira
An addition: If the op just wants to use the like operator, it must use the data of the field in the table, as is. View implizite criteria build for filter uses
(((Countries.COUNTRY_NAME COMME (: bindName ||))) (('%')) OR (: bindName IS NULL)))
for the startswith operator. Yes ther EI '%' added automatically. It should be replaced by
(((Countries.COUNTRY_NAME COMME (: bindName)) OR (: bindName IS NULL)))
to be a true sql 'like' operator. Then, the user must enter the filter with the '%' residue criteria to perform a generic search.
Adding a '%' before the setting is counterproductive because it can be a bottleneck. The PB needs to do a full table scan to get the result!
Then it would not behave as the sql like operator that you can search for '? URO % "for"europa". If, for example, a line with "western europe" is your setting ' %? % ships ' grab this line too.
Timo
-
Calculate the use of operating rooms
I received this question in an e-mail.
I will post it here, as well as my own answer-, so that other people with the same problem can find and learn, and that responses can be given (here there are smart people who might have alternative solutions of large .)
Here's the post with the question:
------------------------------------------
Hi Kim,
I'm stuck in a SQL query.
I want to calculate the use of operating rooms. follwing is my data structure
create the table room_usage
(in_time DATE,
out_time DATE,
mr_no VARCHAR2 (15).
room_no, NUMBER (3));insert into room_usage
values
(to_date('11-Feb-15 8:33:00 AM', 'dd-mon-rr hh:mi:ss am'),
to_date('11-Feb-15 10:17:00 AM', 'dd-mon-RR hh:mi:SS am'),
'00052740',
733);
insert into room_usage
values
(to_date('11-Feb-15 10:56:00 AM', 'dd-mon-rr hh:mi:ss am'),
to_date('11-Feb-15 12:36:00', 'dd-mon-RR hh:mi:SS am'),
'00111780',
733);
insert into room_usage
values
(to_date('11-Feb-15 12:56:00 PM', 'dd-mon-rr hh:mi:ss am'),
to_date('11-Feb-15 2:46:00 PM', 'dd-mon-RR hh:mi:SS am'),
'00111777',
733);
insert into room_usage
values
(to_date('11-Feb-15 3:02:00 PM', 'dd-mon-rr hh:mi:ss am'),
to_date('11-Feb-15 6:12:00 PM', 'dd-mon-RR hh:mi:SS am'),
'00052713',
733);
insert into room_usage
values
(to_date('11-Feb-15 6:51:00 PM', 'dd-mon-rr hh:mi:ss am'),
to_date('11-Feb-15 7:57:00 PM', 'dd-mon-RR hh:mi:SS am'),
'00052760',
733);
insert into room_usage
values
(to_date('12-Feb-15 8:51:00 PM', 'dd-mon-rr hh:mi:ss am'),
to_date('12-Feb-15 9:57:00 PM', 'dd-mon-RR hh:mi:SS am'),
'00082760',
733);
Select IN_TIME, OUT_TIME, (OUT_TIME - IN_TIME) * 24 * 60 stay, MR_NO, ROOM_NO
of room_usage
When trunc (IN_TIME) between February 11, 15 'and 12 February 15'
order of in_timein_time out_time stay_min mr_no room_no
11 February 15 08:33 11 February 15 10:17 104 00052740 733
11 February 15 10:56 11 February 15 12:36 100 00111780 733
11 February 15 12:56 11 February 15 14:46 110 00111777 733
11 February 15 15:02 11 February 15 18:12 190 00052713 733
11 February 15 18:51 11 February 15 19:57 00052760 733
12 February 15 20:51 12 February 15 21:57 00082760 733But I also want to get time slots to USE NOT. This is the result I want
in_time out_time stay_min mr_no room_no
11 February 15 12:01:00 AM February 11, 15 08:32 511 no use of 733
11 February 15 08:33 11 February 15 10:17 104 00052740 733
11 February 15 10:18 11 February 15 10:55 37 no use of 733
11 February 15 10:56 11 February 15 12:36 100 00111780 733
11 February 15 12:37 February 11, 15 12:55 18 no use of 733
11 February 15 12:56 11 February 15 14:46 110 00111777 733
11 February 15 14:47 11 February 15 15:01 14 no use of 733
11 February 15 15:02 11 February 15 18:12 190 00052713 733
11 February 15 18:13 February 11, 15 18:50 37 no use of 733
11 February 15 18:51 11 February 15 19:57 00052760 733
11 February 15 19:58 11 February 15 23:59 241 no use of 733How can I get that.
A problem like this is easy to solve with the model clause:
Select in_time, out_time, round ((out_time-in_time) * 24 * 60) stay_min, mr_no, room_no
of room_usage
model
partition (room_no, trunc (in_time) d)
dimension (row_number() on rn (partition room_no, trunc (in_time) order of in_time))
measures (in_time, out_time, mr_no)
rules iterate (1000) until (presentv (in_time [iteration_number + 1], 1, 2) = 2)
(in_time [iteration_number + 0.5] = presentv (out_time [iteration_number], [iteration_number] out_time, trunc (in_time [iteration_number + 1])) + interval minute '1'
, out_time [iteration_number + 0.5] = presentv (in_time [iteration_number + 1], in_time [iteration_number + 1], trunc (out_time [iteration_number] + 1))-'1' minute of interval
, mr_no [iteration_number + 0.5] = 'no use '.
)
order of in_time -
How to fill subtotal var using cfloop collection?
I've redesigned a simple shopping cart that uses the cfloop collection. What I'm trying to do is to find a way to add all the awards in a Total variable part, but I can't make it work. Here are the basics of what I use:
< cfloop collection = "#session.cart #" item = "i" > ""
definitions
session. Cart [i] [1] = prod_id
session. Cart [i] [2] = prod_name
session. Cart [i] [3] = price
session. Cart [i] [4] = Date
session. Cart [i] [5] = quantity
Script to add or remove section
< cfscript >
If (not (isdefined ("session.cart"))) {/ / check to make sure that the structure of the shopping cart exists.}
session. Cart = structnew();
}
The structure of the element that we will use to store the items in the basket is going to have five parts...
// 1. The product id
// 2. The name of the element
// 3. The unit price
// 4. The Date of sale
// 5. Quantity
tempvalue = listtoarray (' #attributes.id #, #attributes.name #, #attributes.price #, #attributes.date #, #attr ibutes.quantity #');
If the item is not yet in the shopping cart, simply add it to cart
If (not (structKeyExists (session.cart, attributes.name))) {}
StructInsert (session.cart, attributes.name, tempvalue);
}
If the item is already in the shopping cart, update the quantity of items
else {}
tempvalue [5] = [attributes.name] session.cart [5] + attributes.quantity;
StructUpdate (session.cart, attributes.name, tempvalue);
}
< / cfscript >
Once the amount has been changed I use the following to change the price
< cfset NouveauPrix = (session.cart [i] [5] * session.cart [i] [3]) >
----------------------------------------------------------------------
The cart says:
| product name (session.cart [i] [2]) | quantity (session.cart [i] [5]) | newPrice (session.cart [i] [5] * session.cart [i] [3]).
How can I add the newPrice column to give me a subtotal?
Looks like your NouveauPrix var is used to report on the cost of the line item in your basket (e.g. cost * units). You have several ways to calculate the subtotal for all follow-up items:
(1) If you do not display the value of "newprice" in your interface, you can use an operator += to append the value of each entry in your table, when you assign it:
(2) you can create a variable to hold the totalPrice you add the value of your NouveauPrix to for each iteration of your table:
(3) you can perform your calculation of the Sub-total in your code where you need to display the total in a loop in your table and generating totals:
-
How to use as operator for several values
Hi all
I want to obtain the column values for the column - filed_name which ends by ('X 1', 'X 2' 'X 3' 'X 4' 'X 5' 'X 0' 'XA' 'XB' "XM" "XP" 'X' "CM" "MT") of the variable_info table
I tried to use as shown below
SELECT * FROM VARIABLE_INFO WHERE FieldName like (' %x 1 "," %X 0 ");
but getting error
ORA-00907: lack of right parenthesis
can someone tell me how to use as operator for multiple values?
Thank you/kumarYou need not a subquery, just make sure that you use parentheses to group your GOLD requirements
SELECT RELATION , FIELD_NAME , ATTRIBUTE , FIELD_DESCRIPTION, SOURCE FROM VARIABLE_INFO WHERE RELATION NOT IN ( 'CHAI', 'ITAB', 'ITB2', 'ITB3', 'MINI', 'NOTE', 'MINC', 'FINI', 'FTIM', 'FWTG', 'FMLY', 'FMIS', 'FSUM', 'MEMB' ,'FINC', 'FASO') AND (SUBSTR(FIELD_NAME,-2) in ('X1', 'X2' ,'X3', 'X4', 'X5', 'X0', 'XA', 'XB', 'XM' ,'XP' ,'CM','MT') OR substr(FIELD_NAME,-1) in ('X') OR substr(FIELD_NAME,1) in ('J') ) AND (ATTRIBUTE LIKE 'NUM%' OR ATTRIBUTE = '-') ;
The error you are getting sounds like a problem with the definition of VARIABLE_INFO. It seems the synonym or something that it points to rear edge
For example:
CREATE SYNONYM X FOR DUAL; CREATE SYNONYM Y FOR X; CREATE OR REPLACE SYNONYM X FOR Y; SELECT * FROM Y; SQL Error: ORA-01775: looping chain of synonyms
Kind regards
Bob -
Hi all
We use as operator for the search feature (oracle 10G).
could someone help me in managing null, when we use as operator.
Ex:
Select empno, ename, d.deptno
from emp e, Dept. d
where e.deptno = d.deptno
and e.ename like '% JO %';
We have a text box to the end before you enter the name of the employee (ename) or part of ename. When the user does not use this option, he leaves it empty.
so in the query above, if ename is null then alors my query fails.
could someone help me handle this scenario.
My query should still give me all employee IDS, if the ename is empty.
using the dynamic sql is not advisable.
Thank you
ManjuSomething like this->
satyaki>select * 2 from v$version; BANNER ---------------------------------------------------------------- Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod PL/SQL Release 10.2.0.3.0 - Production CORE 10.2.0.3.0 Production TNS for 32-bit Windows: Version 10.2.0.3.0 - Production NLSRTL Version 10.2.0.3.0 - Production Elapsed: 00:00:00.26 satyaki> satyaki> satyaki>select * 2 from emp 3 where upper(ename) like nvl('%'||upper('&str')||'%',upper(ename)); Enter value for str: old 3: where upper(ename) like nvl('%'||upper('&str')||'%',upper(ename)) new 3: where upper(ename) like nvl('%'||upper('')||'%',upper(ename)) EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- 9999 SATYAKI SLS 7698 02-NOV-08 55000 3455 10 7777 SOURAV SLS 14-SEP-08 45000 3400 10 7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30 7566 JONES MANAGER 7839 02-APR-81 2975 20 7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30 7698 BLAKE MANAGER 7839 01-MAY-81 2850 30 7782 CLARK MANAGER 7839 09-JUN-81 4450 10 7788 SCOTT ANALYST 7566 19-APR-87 3000 20 7839 KING PRESIDENT 17-NOV-81 7000 10 7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30 7876 ADAMS CLERK 7788 23-MAY-87 1100 20 EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- 7900 JAMES CLERK 7698 03-DEC-81 950 30 7902 FORD ANALYST 7566 03-DEC-81 3000 20 13 rows selected. Elapsed: 00:00:00.02 satyaki> satyaki>/ Enter value for str: sa old 3: where upper(ename) like nvl('%'||upper('&str')||'%',upper(ename)) new 3: where upper(ename) like nvl('%'||upper('sa')||'%',upper(ename)) EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- 9999 SATYAKI SLS 7698 02-NOV-08 55000 3455 10 Elapsed: 00:00:00.08
Kind regards.
LOULOU.
-
In numbers, I can't use then ' / ' operator to divide 2 cell, when I use Shft + 7 does not appear "/", appear ' + '.
Apple saw fit to replace the ' / ' with the Obelus ("÷") that often resembles a plus. Look very carefully and you will see the point above and below the line.
Also if you look at the result, 6/3 is 2 step 8 if the operator acted as the addition operator
Maybe you are looking for
-
Hello I have mac pro mf839 and buy Cable HDMI to VGA but my screen (samsung) did not show something! How can it work? How to detect my monitor under macOS
-
due to a problem, I needed to re - install FireFoxWhen I tried to customize the toolbar there are far fewer available buttons and the 'Open closed tab' button is not theremy other computer has
-
I synchronize with success of songs in iTunes on my iMac on my iPhone. However, I would like to transfer the same songs to my wife's iPhone. Just connect the iPhone to my iMac? I don't want to confuse or change the settings for synchronization, I alr
-
Help! My Hp Mini showed that...Password check failedFatal error... System stoppedCNU9359B3P
-
Satellite A200 - 10W PSAECE - BIOS need for Vista 64-bit
Hello I'm having problems trying to update my BIOS under Vista 64-bit of the system. The plashnt.sys driver generates an error when loading.On the update of the BIOS page I can't find no 64-bit BIOS update for my laptop Satellite A200-10W (PSAECE). A