REGEXP_LIKE Pattern match, select a Table to use in SQL (not PL/SQL)
Hellohopefully I can explane my understandable problem...
I would like to have the "Match-Pattern" of the "REGEXP_LIKE (-chain, from research 'Match-Pattern') ' selected in a table.
Imagine I have a table called "patterns" with a field that contains the matched-filter (s)
Select * from templates:
KEY MODEL
---------- ----------------------------------------
ZIP_CHECK ^ 0 [1-9] [0-9] {3} $. ^ [1-9] [0-9] {4} $
CHARONLY [^ [: alpha:]]
Now I would like user of the (current) PATTERN for the CHARONLY key in a select statement REGEXP_LIKE.
Pseudo-code (which does not) for "show all names addresses where name contains not only the characters":
Select the name of the address
where regexp_like (name, (select the reason for bosses where key ='CHARONLY));
Someone has an idea?
Thank you
Frank
Jac says:
It will work. In your case, it does not because your boss is not going...Good operating mode... I hope that, for CHARONLY, you mean ^ [[: alpha:]] * $
I think that he did it, as his requirement will be
"all names addresses where name does not contain only characters.
with patterns as (
select 'a' key, '[^[:alpha:]]' pat from dual
)
, data as (
select 'test123' v from dual union all
select 'test' from dual
)
select
*
from data
where
regexp_like (
v,
(select pat from patterns
where
key = 'a'
))
V
"test123"
You are right, if the requirement would
"all the names of addresses where name does contain only characters.
Let's wait and see ;-)
Tags: Database
Similar Questions
-
Selection of approval tasks using adapters-could not retrieve the information of the user
Hello
I created the reconciliation of flat file (IOM 9.1) users. According to the requirement, approval must be provided before users are provisioned to Active Directory, using the 2 conditions.
If the user is in the "Executive", level 2 approval is required so that if the user is the "Senior" position, single approval.
The field to distinguish the condition is 'Position' defined in the UDF. I have created an approval process for Active Directory with level 2 approvals already.
I created an adapter that checks the position of the user and returns responses. I use this adapter in a task to "check the Position of the user. This task above the 2 'immediate head' approvals and approvals for 'second level '.
Depending on the response, the trust levels are supposed to be selected.
But when I'm trying to retrieve the position of the user into the adapter using the key of the user (usrKey), the value of usrKey spending like '1' (xelsysadm key) instead of the user key which I created through reconciliation flat file. What could be the reason for this? Need your help guys.Mary,
Is a correct method for OIM9.1
tcResultSet requestResultSet = (newRequestKey) tcrequestIntf.getRequestTargets;
Please import import Thor.API.Operations.tcRequestOperationsIntf;
Thank you
HemantPublished by: Hemant-IOM on November 2, 2012 03:08
-
I'm looking for a way to create a dynamic table / grid somewhat like a sheet or spread html table. but I want to create all the cells via a loop.
The following diagram was created using php to execute a loop and writing on the cells and the duration for each cell in the grid/table. But I have no idea where to start in flash builder to build something like this.
Some cells will last 2 to 4 columns as shown in the following diagram.
Any suggestions on how to create this type of table or grid in Flash Builder?
I looked through most of the components, but I'm not sure which component to use.
Help in this would be greatly appreciated.
Thank you to
Maurice
It's ok, I thought about it.
just by using containers grid Flash builder 4.5
-
Use of SQL fetchlet to create a custom plug-in management
Hello
I would be grateful if you could someone help me on this:
I need to extract data from the tables of the EMF and create a personalized management of OEM Plug-in so that it is controllable OEM itself. To get the data from the database table, I use fetchlet SQL coz it offers the possibility to use the SQL statement in it. Here is the code that I have developed in the target file - type.xml.
< TargetMetadata META_VER = "1.0" TYPE = "emf_filer" >
< display >
< NLSID label = "emf_filer" > error Management Filer < / Label >
< / display >
< Metric NAME = "emf_filer" TYPE = "TABLE" >
< display >
< NLSID label = "emf_filer_resp" > answer < / Label >
< / display >
< TableDescriptor >
<!-< ColumnDescriptor NAME = "tcpPing" TYPE = "NUMBER" >
< display >
< NLSID label = "netapp_filer_resp_tcpPing" > TCP Ping, milliseconds < / Label >
< / display >
< / ColumnDescriptor >->
< ColumnDescriptor NAME = 'Status' TYPE 'NUMBER' = >
< display >
< NLSID label = "emf_filer_resp_status" > status < / Label >
< / display >
< / ColumnDescriptor >
< ColumnDescriptor NAME = 'PROGRAM_NAME"TYPE ="STRING">
< display >
< NLSID label = "PROGRAM_NAME" > program name < / Label >
< / display >
< / ColumnDescriptor >
< ColumnDescriptor NAME = "PROGRAM_TYPE" TYPE = "STRING" >
< display >
< label NLSID = "PROGRAM_TYPE" > program Type < / Label >
< / display >
< / ColumnDescriptor >
< ColumnDescriptor NAME = "RICEW_ID" TYPE = "STRING" >
< display >
< label NLSID = "RICEW_ID" > rice Id < / Label >
< / display >
< / ColumnDescriptor >
< ColumnDescriptor NAME = "Request_id" TYPE = "NUMBER" IS_KEY = "TRUE" >
< display >
< NLSID = "Request_id" label > ask Id < / Label >
< / display >
< / ColumnDescriptor >
< ColumnDescriptor NAME = "EBIZ_INSTANCE_NAME" TYPE = "STRING" >
< display >
< label NLSID = "EBIZ_INSTANCE_NAME" > the Instance name < / Label >
< / display >
< / ColumnDescriptor >
< / TableDescriptor >
< QueryDescriptor = "SQL" FETCHLET_ID >
< property NAME = "MachineName" SCOPE = "INSTANCE" > MachineName < / property >
< property NAME = 'Port' SCOPE 'INSTANCE' = > Port < / property >
< property NAME = "SID" SCOPE = "INSTANCE" > SID < / property > "
< property NAME = "Username" SCOPE = "Username" > apps < / property >
< property NAME = "password" SCOPE = "password" > password < / property >
< property NAME = "ServiceName" SCOPE = "INSTANCE" > ServiceName < / property >
< property NAME = 'DECLARATION' SCOPE 'INSTANCE' = >
BEGIN
SELECT PROGRAM_NAME, PROGRAM_TYPE,
RICEW_ID, REQUEST_ID, EBIZ_INSTANCE_NAME FROM XX_EMF_MESSAGE_HEADER WHERE STATUS = 'ERROR' AND RICEW_ID = 'INT DL019 ';
END;
< / property >
<!-< property NAME = 'SQLINPARAM1' SCOPE = 'ENV' > HOSTNAME < / property >
< property NAME = 'SQLOUTPARAMPOS' SCOPE = 'GLOBAL' > 2 < / property >
< property NAME = 'SQLOUTPARAMTYPE' SCOPE = 'GLOBAL' > SQL_CURSOR < / property >->
< property NAME = "NUMROWS" SCOPE = 'GLOBAL' > 40
< / property >
< / QueryDescriptor >
< ExecutionDescriptor >
< NAME getTable = "emf_filer" / >
< NAME GetView = "emf_View" FROM_TABLE = "emf_filer" >
< Column NAME = "PROGRAM_NAME" / >
< Column NAME = "PROGRAM_TYPE" / >
< Column NAME = "RICEW_ID" / >
< Column NAME = "REQUEST_ID" / >
< Column NAME = "EBIZ_INSTANCE_NAME" / >
< filter COLUMN_NAME = 'REQUEST_ID' OPERATOR = 'GT' > 0 < / filter >
< / GetView >
< / ExecutionDescriptor >
< InstanceProperties >
< InstanceProperty NAME = "Username" CREDENTIAL = 'TRUE' optional = "FALSE" NEED_REENTER = "FALSE" HIDE_ENTRY = "FALSE" >
< display >
< label NLSID = "UserName_emf" > user name < / Label >
< / display >
< / InstanceProperty >
< InstanceProperty NAME = "password" CREDENTIAL = 'TRUE' optional = "FALSE" NEED_REENTER = "TRUE" >
< display >
< NLSID label = "password_emf" > password < / Label >
< / display >
< / InstanceProperty >
< InstanceProperty NAME = "MachineName" CREDENTIAL = 'FALSE' optional = "FALSE" >
< display >
< label NLSID = "MachineName_emf" > the receiving computer name < / Label >
< / display >
< / InstanceProperty >
< InstanceProperty NAME = "Port" CREDENTIAL = 'ALF '.
:
:
:
:
:
My question here is:
According to Oracle, it is important to use the matrics with status response. How can I accommodate matrics of response with this code. What are the columns except status I need to mention? If I use just a response that is to say of matrics then what I will use in clause in ExecutionDescriptor FROM [< GetView NAME = "emf_View" FROM_TABLE = "emf_filer" >]? I would be grateful if someone could point out my problems.
Thanks for your help.
Kind regards
ASFirst of all, you should always change the SCOPE of your credentials... EXAMPLE, if you're going to find them in your InstanceProperties or GLOBAL if you plan to hardcode for now (but you'll want to change possibly instance).
The SQL statement should return data in the order and the number of columns you have for your measurement, so if you have only a single column to your measure of response (Status), you will need to return just one thing in your select clause. Probably something like:
Select 1 double
The problem with the help of the SQLFetchlet to determine the status column on the metrics of your answer, it's that if the database is down, there is no way to return 0 for the status column. If the DB is down, the SQLFetchlet won't be able to connect and the collection will return nothing (because of the error). The status column is used to determine the high/low status in the repository, but it is also used to determine the percentage of availability. If you want this number to be precise, you probably want to create a script that can ping the database to see if it is or not. I guess that the Oracle database has a script to do that for the extent of his response, then you should consider to copy, to use with your own type of target and using the OSLineToken Fetchlet instead of the SQLFetchlet to the extent of the intervention.
-
Insert data into the table without using the insert or select the command
Hello
Is there anyway to insert data from one table to another table, without using insert, and then select the command in the same pattern.
Note: the two tables have the same structure.ALTER table... Swap partition...
-
using listener of selection for table cause some problems
Hello
I'm using jdev 11.1.1.4.0
My use case:
I have the master/detail table
When the user changes data in the secondary table then it click directly to anather record in the main table
I need to display alert message ("you must save changes first") and prevent the movement, so I do the following:
in the main table, I used bean manged in SelectionListener attribute called onTableSelect(SelectionEvent selectionEvent) like this:
If (ADFUtils.getApplicationModuleForDataControl("CodesModuleDataControl").getTransaction () .isDirty ()) {}
FacesContext context = FacesContext.getCurrentInstance ();
context.addMessage (null, new FacesMessage (FacesMessage.SEVERITY_WARN, getValueFromResourceBundle("hr.view.vcBundle","global.msgUnsavedChanges"), null));
* / / HERE, I need to move the selection to the previous record *.
}
else {}
Table richeTableau = (RichTable) selectionEvent.getSource ();
CollectionModel tableModel = (CollectionModel) table.getValue ();
JUCtrlHierBinding adfTableBinding = tableModel.getWrappedData ((JUCtrlHierBinding));
DCIteratorBinding tableIteratorBinding = adfTableBinding.getDCIteratorBinding ();
Object selectedRowData = table.getSelectedRowData ();
JUCtrlHierNodeBinding nodeBinding = (JUCtrlHierNodeBinding) selectedRowData;
Key rwKey = nodeBinding.getRowKey ();
tableIteratorBinding.setCurrentRowWithKey (rwKey.toStringFormat (true));
}
the code is working properly but in the main table, the culmination of save becomes different from the table itterator,
My question is how can I move point highest record in the table according to it itterator.
Best regardsIn the selectionListener, you can get the previously selected like this lines:
public void onSelectionListener(SelectionEvent selectionEvent) { Key removedKey = null; List removedkeys = null; RowKeySet removed = selectionEvent.getRemovedSet(); for (Object l: removed) { removedkeys = (List)l; for (Object k: removedkeys) { removedKey = (Key)k; logger.finer("previously selected row key: " + removedKey.getAttribute(0)); } }
If you want to select the line above again, you can do something like the following:
DCIteratorBinding someiteratorIT = ADFUtils.findIterator("SomeIterator"); someiteratorIT .setCurrentRowWithKeyValue((String)removedKey.getAttribute(0)); getT4().setSelectedRowKeys(removed); AdfFacesContext.getCurrentInstance().addPartialTarget(getT4()); }
where getT4() is the richeTableau.
Published by: John on March 19, 2012 13:55
-
insert into multiple tables by using select in stored procedure
I use oracle 10g R2. I want to insert records in two tables by using a select query (insert into tablename select...) in a stored procedure. How can I insert records into a table two at the same time using a select statement?
My second question is also related to the first... can I use mechanism clustering here because the two tables are based on the same structure and data? One contains data from 24 hours and there are records of 10 days.
Thank you.If you find the answer of Aman as useful/correct, please mark her answer respectively and close the debate. I think his answer is correct as always / a lot of time.
Concerning
Girish Sharma -
Hi all.
Please is - can someone provide some guidance on how to...
1. take a value from a temporary table, the match against another table that contains the first values 'equivalent' value.
2. take this exchange value, call something (using the slider or the variable?) so I can add to my API to load it into ORACLE...
Apology of this sounds confusing, I hope you know everything what I want to do...
Manythanks...
Stevenand call the API
declare v number; begin SELECT oracle_loc_code into v FROM SU_IEXP_LOCATIONS , SU_TEMPLOYEE_DETAILS WHERE chris_loc_code =location_id ; Hr_Assignment_Api.update_emp_asg_criteria (v); end;
-
export by programming a zone selected the table in an array of strings
I am able to select an area of a table programmatically using selstart and property nodes selsize, but once I have selected area I can't export the data into an array of strings. proven value property node. Returns all of the data, not the data, I am interested in. help very much appreciated.
Hi eword.
You can use "Subset of the table" to get the part you're looking for.
Mike
-
How to check a table is used by how interface as well as the name of the interface
Hi Experts,
I have only one requirement that a single table, as example abcd table is used by how many interfaces and I also want to list of interfaces where abcd table is used.
Thank you.
Arun
Hi 2691855,
In the models pane of ODI Studio you can expand your store data and used by to see where it is used:
(I use ODI 12 c so it refers to the maps but it works the same way for the interfaces in ODI11g).
You can also use a query on the repository to retrieve all the associations table/interface.
For example:
select NVL(S.TABLE_NAME, S.SRC_TAB_ALIAS) source, I.TABLE_NAME target, I.POP_NAME from SNP_POP i, SNP_DATA_SET ds, SNP_SOURCE_TAB s where I.I_POP = DS.I_POP and DS.I_DATA_SET = S.I_DATA_SET -- and S.TABLE_NAME = '
' It will be useful.
Best regards
JeromeFr
-
To loop through the table and use the values returned in another query
Hello
I tried to do something very simple, but still can not.
I am trying to iterate on a table and use each line of a column in a where clause to display a query clause.
For example:
I want to retrieve all users of dba_users pass it to a clause where clause in a query to show for example account_status and profile of each user. But I want to do it in a way if I can turn the result in an html table.
I tried too much really, so I'll post something that does not work, but which I think will show the problem I have,
BEGIN FOR i IN (SELECT username from dba_users order by 1) LOOP EXECUTE IMMEDIATE 'select account_status from dba_users where username like ''||i.username||'''; END LOOP; END; /
Example of what I want to achieve:
Suppose that there are two users, SYS, and SCOTT:
USERNAME PROFILE ACCOUNT_STATUS ------------------------------ ------------------------------ -------------------------------- SYS DEFAULT OPEN USERNAME PROFILE ACCOUNT_STATUS ------------------------------ ------------------------------ -------------------------------- SCOTT DEFAULT OPEN
Thanks in advance for your time,
OD
Hi Bill,
Bill Citad kirjoitti:
What a join or a sub query going to help me? honestly
-- join select s.sql_id, h.loads_total from dba_hist_sqlstat h join v$sql s on ( h.sql_id = s.sql_id ) where rownum < 3 ; -- subquery select sql_id, loads_total from dba_hist_sqlstat where sql_id in ( select sql_id from v$sql where rownum < 3 ) ; -- correlated subquery select sql_id, loads_total from dba_hist_sqlstat where exists ( select null from v$sql where sql_id = dba_hist_sqlstat.sql_id ) and rownum < 3 ; -- lateral inline view (12c) select s.sql_id, h.loads_total from dba_hist_sqlstat, lateral( select sql_id from v$sql where sql_id = h.sql_id ) s where rownum < 3 ;
-
Select any table except a few tables
Database 11g:
--------------------
I would like to give a right to select user on all the tables, except in a few tables. I thought to give "Select any table", but this does not also some paintings, should not access.
2nd way is to go... one by one, select wise schema and grant privileges using script. But it's a lot of time because we have the very large number of tables.
Is there another way by which we can accomplish this easily.
You must grant select to each table. Please do not choose any table - which is almost never appropriate.
If it's so hard, just write a query like:
Select "grant select on" | table_name | "from some_user '.
from user_tables
where table_name not in ('FOO', 'BAR', "Etc.")
and reel the results to a file.
If it is necessary, consider granting privileges to a role and then assign this role to a user - will make it easier to manage if you ever have to do the same for other users.
-
Insert into MDQ_OLD select * from table (lt_monitorMdq);
I'm trying to insert into a table that has only a single column, which is a column of a user defined type (UDT). The UDT is nested, that is one of the attributes of the UDT is an another UDT.
I aim to insert into the table like this pseudo-code:
INSERT INTO T1 SELECT * FROM THE UDT;
CREATE TABLE MDQ_OLD (myMDQ UDT_T_MONITOR_MDQ)
NESTED TABLE myMDQ
(T1_NEW) ACE STORE
THE NESTED TABLE MONITOR_MDQ_PRIM_RIGHTS
STORE AS T2_NEW);
The MONITOR_MDQ_CLI procedure. Read below returns the parameter lt_monitorMdq which is a UDT type as announced. The statement "insert into select MDQ_OLD * table (lt_monitorMdq);" fails, while the second insert statement works.
Is it possible to get the first statement of work?
I'm on Oracle 11 g 2.
DECLARE
lt_monitorMdq UDT_T_MONITOR_MDQ;
BEGIN
MONITOR_MDQ_CLI. Reading (TRUNC (SYSDATE),
TRUNC (SYSDATE),
NULL,
NULL,
"MILLION BTU.
lt_monitorMdq); -Note lt_monitorMdq is an OUT parameter
-This insert does not work
Insert into MDQ_OLD select * from table (lt_monitorMdq);
BECAUSE me in 1... lt_monitorMdq.count
LOOP
Dbms_output.put_line ('lt_monitorMdq: ' | .mdq_id lt_monitorMdq (i));
-This integration works
INSERT INTO MDQ_OLD (MYMDQ)
VALUES (UDT_T_MONITOR_MDQ (UDT_R_MONITOR_MDQ)
lt_monitorMdq (i) .gasday,
1,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
() UDT_T_MONITOR_MDQ_PRIM_RIGHT
() UDT_R_MONITOR_MDQ_PRIM_RIGHT
1,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
(NULL)));
END LOOP;
END;
have you tried:
INSERT INTO MDQ_OLD (myMDQ) VALUES (lt_MonditorMDq);
curiosity:
Is there a particular reason, why you have created a table with a single column of type UDT instead of:
CREATE TABLE... OF UDT_T_MONITOR_MDQ;
I can tell you from experience that using a nested table, you can easily query the data in the nested table.
MK
-
How to select only the part by using the sql query
Hello
I have the task to retrieve only the integral of the input text by using the sql query.
The entry is as follows
Entry for the price setting
$12.5 (FYI without space)
$ 12.5 (FYI single space)
$ 12.5 (double space FYI)
$12.5 (FYI multiple space)
$12.5 (FYI multiple space)
Output expected of 12.5
The price is the type varchar2 column in the store_price table.
Please let me know how to achieve this.
Thanks in advance.
If this is always the case that you get a $ followed by a number of places, you can use something like:
Select to_number (ltrim ('$ 12.5',' $')) DOUBLE
or
SELECT ltrim ('$ 12.5',' $') OF double
but take care of your nls_numeric_character settings if they are defined so that, for example, a comma is the decimal separator, you will have a problem.
HTH
-
mode patterns expdp, exclude certain tables, but still had exported
OS: linux redhat
DB: 11.2.0.3
Try to export several patterns, but to exclude the two tables, but in the export log, I still see these exported tables.
Here is the file by:
UserID = "/ as sysdba".
= export directory
dumpfile = exp_schema_without_two_tables.dmp
logfile = exp_schema_without_two_tables.log
Customer Schemas
EXCLUDE = TABLE: "IN (' CLIENT.)" ACCTLOGINS ',' CUSTOMER. (USERLOGINS') ".
It worked successfully, however check the newspaper know those:
Object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS treatment
Processing object type SCHEMA_EXPORT/POST_SCHEMA/PROCOBJ
. . exported "CUSTOMER." "' ACCTLOGINS ' 10,617 GB 82914685 lines
. . exported "CUSTOMER." "' USERLOGINS ' 6,171 GB 82921278 lines
Can you guys help me to make it work?
Thank you
Hello
I think that the previous answers were ponting allows you to remove the schema. proefix in the clase exclude - at the moment its attempts to exclude a table called "CUSTOMER. ACCTLOGINS' not a table called ACCTLOGINS owned by the CUSTOMER.
You change parfile to this
UserID = "/ as sysdba".
= export directory
dumpfile = exp_schema_without_two_tables.dmp
logfile = exp_schema_without_two_tables.log
Customer Schemas
EXCLUDE = TABLE: 'IN ('OF THE ' ACCTLOGINS,' USERLOGINS') '.
And as others have mentioned dony use / as sysdba - this works largely ok, but do not for general use only exceptionally.
See you soon,.
Rich
Maybe you are looking for
-
Satellite Z930 - USB driver missing
Satellite Z930-13N USB driver type by Intel xHCI shows the following error message: "This device does not work properly because Windows cannot load the drivers required for this device. (Code 31) » Anyone can shed some light on it with a solution? I
-
Equium A200-1VO: update Bios issue
Someone at - it updated the Bios here with the latest offer.I wanted to do because the port for express adapter card seems to not work properly. But all I get is an error message - 120 of Winphlash saying the Bios is incorrect, but I downloaded it tw
-
Csrss.exe pic 100% CPU for Win 2003 Server
Hello Recently, I've migrated a physical server to virtual (Server 2003 R2 Std). After that, I see high utilization of the processor in the csrss.exe process. I tried to check in via Process Explorer. Csrss.exe displays as much CPU being picked up in
-
\\mycomputername is not accessible. you might not have permission to use this network resource. comtact the administrator of this server to find out if you have access permissions.
-
In addition, Visual Studio shows a split second start screen, then disappears without any messages. Moreover, the same result occurs if I use the installation for each program file. In other words, the execution of the installation executable starts