How to scan "_" values in a table
How to scan "_" values in a table. When I used LIKE '% _ %' does not work.[url http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/conditions007.htm#sthref2907] Escape
SQL> with x as
2 (select 'a_b' x from dual union all
3 select 'ab' x from dual)
4 select *
5 from x
6 where x like '%_%';
X
---
a_b
ab
Elapsed: 00:00:00.21
SQL>
SQL>
SQL> with x as
2 (select 'a_b' x from dual union all
3 select 'ab' x from dual)
4 select *
5 from x
6 where x like '%\_%' escape '\';
X
---
a_b
Elapsed: 00:00:00.00
SQL>
Tags: Database
Similar Questions
-
How to find null values in the table
Hi experts,
my version is oracledb10g:
I am doubted simple.
for example:
create table ex1 (e varchar2 (20));
Insert ex1 (null).
insert into ex1 (e)
number of will be: 2
I can easily find the value "e".
so my question is:
How can I find null values in the table and I want to remove the null values from the table.ADF 7 wrote:
Hi experts,my version is oracledb10g:
I am doubted simple.
for example:
create table ex1 (e varchar2 (20));
Insert ex1 (null).
insert into ex1 (e)
number of will be: 2
It depends on what you expect. If you issue count (*) you ask Oracle "how many lines there. If you issue a County (
) you ask Oracle 'how non null values for are there. " ADF 7 wrote:
I can easily find the value "e".
so my question is:
How can I find null values in the table and I want to remove the null values from the table.
delete from
where is null; Ideally you would simply place a NOT NULL constraint on the column in question, thus prohibiting NULL values into the system (assuming that your business needs, it is that the column MUST always have a value).
-
How to load the values into a table?
In my jspx page, I have a combo and a table... Based on the values of the drop-down list, when I click on a button, I want to load the values into a table... The data in the table are from 5 database tables. I created a viewObject readonly... What to do to load the values from the table, I click on a button?Ensure that you have defined a variable to bind your view object.
Read-only or not, this is what would make the Execute with action of parameters available.
John
-
How to get the values of the table of the ADF to bean class?
Hi all
My 11.1.1.6 Jdev
Here I do not use BC ADF in my project. I'll put values in the ADF table with bean.
In the table, I put a checkbox. When I selected (Checkbox) a few rows in table and submit. In the submit method, I want to get all the values of line checkbox selected in my bean class.
How can I get the values. ???
Here my table UI code
< af:table var = "row" rowBandingInterval = "0" id = "t1" value = "#{pageFlowScope.BinderSolutionsBean.uiBinderProperties} '"
styleClass = "AFStretchWidth" emptyText = "no record found".
Binding = "#{pageFlowScope.BinderSolutionsBean.binderTree}" >
< af:column sortable = "false" headerText = "Script ID" id = 'c4' >
< af:panelGroupLayout id = "pgl4" >
< af:selectBooleanCheckbox id = 'sbc1' > < / af:selectBooleanCheckbox >
< af:spacer width = "5" / >
< af:outputText value = "#{row.scenarioId}" id = "ot5" / > "
< / af:panelGroupLayout >
< / af:column >
< af:column sortable = "false" headerText = "Quote ID" id = "c1" >
< af:outputText value = "#{row.quoteId}" id = "ot4" / > "
< / af:column >
< af:column sortable = "false" headerText = "NASP ID" id = "c2" >
< af:outputText value = "#{row.naspId}" id = "ot2" / > "
< / af:column >
< af:column sortable = "false" headerText = "GCH ID" id = 'c3' >
< af:outputText value = "#{row.gchId}" id = "ot3" / > "
< / af:column >
< af:column id = "c6" headerText = "Term" >
< af:outputText value = "#{row.term}" id = "ot9" / > "
< / af:column >
< af:column sortable = "false" headerText = "Status" id = "c5" >
< af:outputText value = "#{row.status}" id = "ot6" / > "
< / af:column >
< / af:table >
follow some above recommendation such as the creation of additional attribute. You will also need the key in your collection, while making the data for your chart.
You must write a custom selectionListener. On valueChangeEvent of box, get the key of a line and add the line at the bean.
Maybe it's little help for you
-
Re: How to make the values in the table as required
Hi all
I use JDev11.1.2.3.0
I have 5 TariffRate (LOV), quantity fields (text input), BillQuantity (text input), amount(input text), calculated quantity (text input). These fields are in the format.not table in the form.here, that the logic is
BillQuantity = quantity * calculated the amount
amount = quantity * calculated the quantity * TariffRate
Here rate rate, calculated quantity, quantity which is mandatory.but I am not able to set the amount and the amount calculated as mandatory.if I select tariffrate in LOV immediately asking amount and quantiy calculated when the property set to true, or quantity.hints.mandatory the problem is that I'm not able to select the value of tariff rate for the second time , now I need to select the quantity and the quantity calculated values first without selecting the rate rate.so how I can configure mandatory for quantity and calculated quantity.can someone help me please.
I guess you are hit by "required field" error because you refresh the dependent fields (for example, the amount and the calculated quantity) by PPR declarative (for example "partialTriggers" attributes of these fields in the tariff rates field reference). In this way, when you choose a new tariff, ADF Faces includes the fields of PPR - ed in the life cycle, they are validated and they result in errors of "required field".
You can work around this behavior in the following way:
- Remove attributes of mandatory fields that depend on the rate of "partialTriggers" (i.e. loose quantity and the quantity calculated rate by removing the attributes 'partialTriggers' of the Quatity field and calculated quantity);
- Add a ValueChangeListener for the rate field. In the ValueChangeListener add commands for programming up to date dependent fields, for example:
{} public void tariffRateValueChanged (ValueChangeEvent valueChangeEvent)
AdfFacesContext.getCurrentInstance () .addPartialTarget (quantityField);
AdfFacesContext.getCurrentInstance () .addPartialTarget (calculatedQuantityField);
}
This way ADF Faces will not include the quantity field and the quantity calculated in the life cycle JSF (and they will not be verified for non-empty values). I use this trick for a long time and it really works.
Dimitar
-
How to insert duplicate values in another table.
angle of attack!
I created two tables a and b
create table one
(key primary code number);
create table b
(code number,
DAT date);
insert into the table of a (code)
values (1234);
insert into the table of a (code)
values (1235);
commit;
Select * from a;
one
-----
1234
1235
-----
insert into the table of a (code)
values (1234);
commit;
ERROR on line 1:
ORA-00001: unique constraint (GMS. SYS_C0030897) violated
{color: #ff0000} * I need, when the user inserts duplicate data, must be inserted into another table b.* {color}
How can I do in forms 6i? Help, please. Thanks in advance.
Hello
What is the relationship with the forms?
Anyway, you can create a trigger on table A that intercepts the error in an exception block, and then create a new row in table B.
If the error comes from a forms based block, intercept the error in a trigger insert.François
-
How to find missing values in the table?
Hi all..
Please help me.
For example:
I have a. table
in this table, I have a folder with the number 1 up to 10 serial number.
And then, in table B, I put number between 1 and 10.
and I use the number 1, 2, 3, 6, 8, 10.
I want to find missing values between 1 and 10. So, can I select with query for this case?
It's the value of query output:
4, 5, 7, 9
Sorry for the bad language.
Thank you all.
Select
r
Of
(
Select Rownum r
Of the double
Connect by Rownum<= (select="" serialto="" from="">=>
)
where are > = ((select serialfrom from tablea))
less
Select the series from tableb
-
How do I load the csv into table values
Hi Experts,
could you please tell me how to load csv values in the table.
for example, I have a column given as: E01_0, actual work, FY12, Local, Total (data type is string)
by manually
Kind regards
Surya
Published by: surya on 6 March 2012 10:20Hi Surya,
You can use the external table to load csv data.CREATE TABLE EXT_TABLE (COL1 VARCHAR2 (256))
EXTERNAL ORGANIZATION
(TYPE ORACLE_LOADER DEFAULT DIRECTORY DUMPDIR
(SETTINGS) ACCESS
RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY ', '.
SURROUNDED OF POSSIBLY "" "
MISSING FIELD VALUES ARE NULL
)
LOCATION('TEST.) CSV')
)
REJECT THE LIMIT 0.Then EXT_TABLE, you can insert your values into your target table.
-
kindly tell how to use the unique value of a table with the index 0
kindly tell how to use the unique value of a table with the index 0
Hi
Yep, use Index Array as Gerd says. Also, using the context help (+ h) and looking through the array palette will help you get an understanding of what each VI does.
This is fundamental LabVIEW stuff, perhaps you'd be better spending some time going through the basics.
-CC
-
How to find the value max and min for each column in a table 2d?
How to find the value max and min for each column in a table 2d?
For example, in the table max/min for the first three columns would be 45/23, 14/10, 80/67.
Thank you
Chuck,
With color on your bars, you should have enough experience to understand this.
You're a loop in the table already. Now you just need a function like table Max and min. loop. And you may need to transpose the table 2D.
-
How to insert a value of triggers in the table?
Mr President.
I have the following trigger
CREATE OR REPLACE TRIGGER lineitem_trg BEFORE UPDATE OF lineitem ON voucherdet FOR EACH ROW BEGIN :NEW.LINEITEM := TO_CHAR ( TO_NUMBER (:OLD.LINEITEM) + 1 , 'FM00' ); END lineitem_trg; /
Now to how to add this triggers a value in the table
The value of this trigger is part of the primary key with voucher_id which is obtained by the voucher_id_seq
This is my database as below
CREATE TABLE "NOM" ( "ACCT_ID" VARCHAR2(7) NOT NULL ENABLE, "ACCT_NAME" VARCHAR2(50) NOT NULL ENABLE, "O_BAL" NUMBER(13,2), "ITAX_ID" VARCHAR2(7), "SALES_TAX_NO" VARCHAR2(20), "PL_SUPPLIER" VARCHAR2(1) DEFAULT 'N', "STOCK_REPORT" VARCHAR2(1) DEFAULT 'N', "ACCT_TYPE" VARCHAR2(4), CONSTRAINT NOM_PK PRIMARY KEY ("ACCT_ID")ENABLE, CONSTRAINT NOM_ACCT_TYPE_FK FOREIGN KEY ("ACCT_TYPE") REFERENCES "ACCT_TYPE" ("ACCT_TYPE") ENABLE ); CREATE TABLE "VOUCHER" ( "VOUCHER_ID" VARCHAR2(8) NOT NULL ENABLE, "VOUCHER_DATE" DATE DEFAULT sysdate, "POST_DATE" DATE DEFAULT sysdate, "DEBIT" VARCHAR2(7), "CREDIT" VARCHAR2(7), "VOUCHER_SOURCE" VARCHAR2(2), CONSTRAINT VOUCHER_PK PRIMARY KEY ("VOUCHER_ID")ENABLE, CONSTRAINT VOUCHER_NOM_DEBIT_FK FOREIGN KEY ("DEBIT") REFERENCES "NOM" ("ACCT_ID") ENABLE, CONSTRAINT VOUCHER_NOM_CREDIT_FK FOREIGN KEY ("CREDIT") REFERENCES "NOM" ("ACCT_ID") ENABLE ); CREATE TABLE "VOUCHERDET" ( "VOUCHER_ID" VARCHAR2(8) NOT NULL ENABLE, "DEBIT" VARCHAR2(7) NOT NULL ENABLE, "CREDIT" VARCHAR2(7) NOT NULL ENABLE, "PARTICULARS" VARCHAR2(100), "AMOUNT" NUMBER(21,2), "LINEITEM" VARCHAR2(4) DEFAULT '01', "V_ID_ITAX" VARCHAR2(11), "V_ID_PAY" VARCHAR2(11), "CHALLAN_NO" VARCHAR2(10), CONSTRAINT VOUCHERDET_PK PRIMARY KEY ("VOUCHER_ID", "LINEITEM")ENABLE, CONSTRAINT VOUCHERDET_DEBIT_FK FOREIGN KEY ("DEBIT") REFERENCES "NOM" ("ACCT_ID") ENABLE, CONSTRAINT VOUCHERDET_CREDIT_FK FOREIGN KEY ("CREDIT") REFERENCES "NOM" ("ACCT_ID") ENABLE, CONSTRAINT VOUCHERDET_VOUCHER_FK FOREIGN KEY ("VOUCHER_ID") REFERENCES "VOUCHER" ("VOUCHER_ID") ON DELETE CASCADE ENABLE );
CREATE SEQUENCE VOUCHER_ID_SEQ INCREMENT BY 1 START WITH 1; begin execute immediate 'create or replace trigger VOUCHER_ID_TRG '||chr(10)|| ' before insert on "ALIZA"."VOUCHER" '||chr(10)|| ' for each row '||chr(10)|| 'begin '||chr(10)|| ' if inserting then '||chr(10)|| ' if :NEW."VOUCHER_ID" is null then '||chr(10)|| ' select VOUCHER_ID_SEQ.nextval into :NEW."VOUCHER_ID" from dual; '||chr(10)|| ' end if; '||chr(10)|| ' end if; '||chr(10)|| 'end;'||chr(10); end; /
Concerning
And I explained to you why it is false.
Go one read what I put above, and I gave an example of (with command and control elements) in the other thread.
If you want the user a composite key as the primary key by using the primary key of the voucher and something else, do this thing, just a sequence that is obtained from a sequence value (not gapless, but always unique). And then you always build your LINEITEM values for display based on this sequence for example
LPAD (to_char (ROW_NUMBER () over (partition by order VOUCHER_ID by LINEITEM)), 2, '0') as a CONTROL element
It's when you query the data to display it, is not to store it in the database. In the database, you simply store an internal sequence number in LINEITEM.
Do not try and store a sequence for your lineitem gapless. It is false.
-
Please how can I use a value in a table of the adf in an actionListener to a button I created in a popup and thanks
What is your version of JDev?
Actually your question is not clear to me, but as I understand, it is you the table in the page and you have popup inside this popup you have the button you need when you click on the button to read the value of the selected table row. In the listener action button, so if you can get the current row of the table and after that you can get any attribute of the line as:
DCIteratorBinding iter = (DCIteratorBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("TableIteratorName"); // from pageDef. Row r = iter.getCurrentRow(); Object value1 = r.getAttribute("attribute1"); Object value2 = r.getAttribute("attribute2");
-
Hello community, I have a problem when creating a function. The purpose of this function is to check the table of weather gave yesterday or not. We must check this on different tables on different sachems. We are creating a function with input variables.
CREATE OR REPLACE FUNCTION IN_SCHEMA.IS_YDAYDATA_TO_TABLE
(
in_schema IN VARCHAR2,
in_tablename IN VARCHAR2,
in_datefield IN VARCHAR2,
)
RETURNS INTEGER
AS
-Declaring variables
v_is_true INTEGER.
BEGIN
SELECT
CASE
WHEN MAX (in_datefield) = TRUNC(SYSDATE-1)
THEN 1
ON THE OTHER
0
END
IN
v_is_true
Of
in_schema.in_tablename
;
RETURN v_is_true;
END;
/
When creating, I got error: [error] ORA-00942 (44:19): PL/SQL: ORA-00942: table or view does not exist
How to use the values of the input variables on the table select statement names?
Hello
Here's a way you can use dynamic SQL statements for this task:
CREATE OR REPLACE FUNCTION IS_YDAYDATA_TO_TABLE
(
in_schema IN VARCHAR2,
in_tablename IN VARCHAR2,
in_datefield IN VARCHAR2,
in_first_date DATE DEFAULT SYSDATE - 1,.
in_last_date DATE by DEFAULT NULL
)
RETURNS INTEGER
AS
-IS_YDAYDATA_TO_TABLE returns 1 if in_schema.in_tablename.in_datefield
-contains all the dates in the in_first_date of the range through included in_last_date
- and it returns 0 if there is no such lines.
-If in_last_date is omitted, the search only the data on in_first_date.
-If in_first_date is omitted, it defaults to yesterday.
-Time parts of the in_first_date and in_last_date are ignored.
-Declaring variables
sql_txt VARCHAR2 (1000);
v_is_true INTEGER.
BEGIN
sql_txt: = 'SELECT COUNT (*).
|| 'FROM ' | in_schema | '.' || in_tablename
|| 'WHERE ' | in_datefield | ' > =: d1'
|| «AND» | in_datefield | '< > >
|| 'AND ROWNUM = 1';
dbms_output.put_line (sql_txt |) '= sql_txt in IS_YDAYDATA_TO_TABLE"); -For debugging
Sql_txt EXECUTE IMMEDIATE
IN v_is_true
With the HELP of TRUNC (in_first_date) - d1
TRUNC (NVL (in_last_date
in_first_date
)
) + 1 -- d2
;
RETURN v_is_true;
END is_ydaydata_to_table;
/
DISPLAY ERRORS
If you must use dynamic SQL statements, put all the SQL statement in a single string variable, such as sql_txt in the example above. In this way, you can easily see exactly what will be executed. Comment out the call to dbms_output under test is completed.
Try to write functions that will address not only the question that you have now, but similar questions that you may have in the future. For example, now that interest you only to the verification of the data of yesterday, but later, you might want to check another day or range of days. The above function combines the convenience of a function simple (looks like yesterday data if you don't tell him otherwise) with the power of a more complex function (you can use the same function to check any day or range of days).
-
How to insert the value from the FORM to another database table?
Hi all
I have the following problem.
I have a form that has a tabular layout for the MATURED_FD_DTLtable. (all about 20 line items)
CREATE TABLE MATURED_FD_DTL
(
ACCT_FD_NO VARCHAR2 (17 BYTE) NOT NULL,
CUST_CODE NUMBER (9),
FD_AMT NUMBER (15),
FD_INT_BAL NUMBER (15),
TDS NUMBER (15),
CHQ_NO NUMBER (10),
CREATED_DATE DATE,
CREATED_BY VARCHAR2 (15 BYTE),
PREV_YR_TDS NUMBER (15),
ADD_FD_AMT NUMBER (15),
DESCRIPTION VARCHAR2 (100 BYTE),
P_SAP_CODE NUMBER (10),
P_TYPE VARCHAR2 (1 BYTE)
)
By clicking on 'SAVE' button, all values will be automatically is stored in the MATURED_FD_DTLdatabase table.
But I want to insert these values in another table called TEMP.
I want to insert values of form only, no table select.
How can I do this?
Help me.
Is Oracle Designer 6i.
Answer:
BEGIN
Commit_form;
PREMIER_ENREGISTREMENT;
LOOP
insert into TEMP_MATURED_FD_DTL
SELECT * FROM MATURED_FD_DTL WHERE ACCT_FD_NO =: acct_fd_NO;
WHEN THE OUTPUT: SYSTEM. LAST_RECORD = "TRUE";
NEXT_RECORD;
END LOOP;
PREMIER_ENREGISTREMENT;
COMMIT;
MESSAGE ("RECORD UPDATED AS PAID '");
MESSAGE (' ', no_acknowledge);
END;
-
How to find this value in the oracle database to find out the table
Hi expert,
I know there is a value in the oracle database, please show me how to find this value in the oracle database to find out the table that contains this value.
Thank you very much918440 wrote:
Hi expert,I know there is a value in the oracle database, please show me how to find this value in the oracle database to find out the table that contains this value.
Thank you very much
Go to the online documentation and discover the data dictionary. You may be interested in reading about ALL_TAB_COLUMNS, but you will need to know what you want until you can query the view to find information
Maybe you are looking for
-
Why is a USB to reduce cable included with 4 AppleTV?
It doesn't have a Lightening port on it. I must be missing something?
-
How long it take for EZ Serv to get a replacement LCD?
I just sent my beloved X 61 Tablet for return to the problem of detachment of bezel/LCD (SXGA +). I was told by EZ Serv information center and EZ Serv representative that they have to order a spare for my LCD. They will specify no time as it takes to
-
I need a solution for a problem to view lab application and Installer
-
Problem with the transfer of the applications on a a new Xperia Z3 Compact SD card
Hello Yesterday, I brought a Z3C and Iam really satisfied with the phone. Today, I wented to "NetOnNet" (the store where you can buy home-technic animals) and brought a "Transcend, adapters, UHS - I, 64 GB, class 10, up to 45 Mbps, Premium 300 x" car
-
Bonds of attachment becomes inactive
When I receive an email with attachment, I can open and view the content. The link has blue lettering. When I click on the front to send it to friends, the connection becomes idle, the lettering becomes dark and the State, "fact X." I have a Dell d