Oracle xml db to research extract the date year
Version Oracle 11.2.0.3
[code]
drop table test;
create table test of xmltype.
Insert in the test
values (')
< employee
" xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "xsi: noNamespaceSchemaLocation =" "> ".
< location >
< joiningDate id = "on site" >
2012 06-18 of < hireDate > < / hireDate >
< / joiningDate >
< joiningDate id = "offshore" >
2011 07-8 < hireDate > < / hireDate >
< / joiningDate >
< / location >
(< / employee > ');
commit;
I have a lot of these documents inserted into a 11.2.0.3 database.
I will return all employees who were hired on the spot in 2012
Select x.*
t-test,
XMLTable)
XmlNamespaces)
' http://www.w3.org/2001/XMLSchema-instance ' as "xsi"
),
' for $d/employee/location
where $d/joiningDate[@id="onsite"]/hireDate/text () = xs:date("2012-06-18")
return $from
in passing t.object_value
columns
HireDate date path 'joiningDate[@id="onsite"]/hireDate '.
) the form x
[/ code]
This is my test
But I don't have a specific date rather a campaign determined as 2012
What index to use to speed up this request please
What index to use to speed up this request please
There are different ways to do this.
Read this book to get a broader overview: http://www.oracle.com/technetwork/database-features/xmldb/overview/xmldb-bpwp-12cr1-1964809.pdf
The best way depends on whether you want to index the other values at the same time, or just this single date value.
Assuming that the latest, here are three options:
(1) virtual indexed column
alter table test add)
onsite_hiredate date)
(xmlcast)
XMLQUERY)
' / Employee/location/joiningDate[@id="onsite"]/hireDate'
passage object_value
contents of return
)
as date
)
) virtual
) ;
create indexes on test (onsite_hiredate) test_onsite_hiredate_ix;
or an FBI so you need to be specific:
create index test_onsite_hiredate_ix on test (extract (year onsite_hiredate));
SQL > select *.
2 test
3 where onsite_hiredate > = date '' 2012-01-01
4 and onsite_hiredate< date="" '2013-01-01'="">
Execution plan
----------------------------------------------------------
Hash value of plan: 3994140658
-------------------------------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
-------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1. 196. 2 (0) | 00:00:01 |
| 1. TABLE ACCESS BY INDEX ROWID | TEST | 1. 196. 2 (0) | 00:00:01 |
|* 2 | INDEX RANGE SCAN | TEST_ONSITE_HIREDATE_IX | 1. | 1 (0) | 00:00:01 |
-------------------------------------------------------------------------------------------------------
Information of predicates (identified by the operation identity card):
---------------------------------------------------
2 - access ("ONSITE_HIREDATE" > = TO_DATE(' 2012-01-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND)
'ONSITE_HIREDATE '.
(2) not structured XML index with the creation of a subset of single track
create indexes on indextype test (object_value) test_xml_uix is xdb.xmlindex
settings)
"TABLE test_ptab RUNNER.
"Paths (/ Employee/rental/joiningDate)"
);
Select *.
of the test
where (xmlexists)
"[' Employee/location/joiningDate[@id="onsite"]/hireDate[fn:year-from-date (.) = $yr].
passage object_value
, 2012 in 'year '.
);
(3) XML structured index
CREATE INDEX test_xml_sxi ON test (object_value)
INDEXTYPE IS XDB. XMLIndex SETTINGS (q'~)
Test_xtab XMLTable ' / employees '
COLUMNS on the spot date PATH 'location/joiningDate[@id="onsite"]/hireDate '.
~'
);
Secondary index:
create index test_xml_hiredate_ix on test_xtab (on-site);
SQL > select x.*
test 2 t
3, xmltable)
4 ' / employees '
5 passage t.object_value
6 columns
7 hiredate date path 'location/joiningDate[@id="onsite"]/hireDate '.
(8) the form x
9 where x.hiredate > = date '' 2012-01-01
10;
Execution plan
----------------------------------------------------------
Hash value of plan: 897007560
-----------------------------------------------------------------------------------------------------
| ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
-----------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1. 42. 2 (0) | 00:00:01 |
| 1. NESTED LOOPS | | 1. 42. 2 (0) | 00:00:01 |
| 2. TABLE ACCESS BY INDEX ROWID | TEST_XTAB | 1. 25. 2 (0) | 00:00:01 |
|* 3 | INDEX RANGE SCAN | TEST_XML_HIREDATE_IX | 1. | 1 (0) | 00:00:01 |
|* 4 | INDEX UNIQUE SCAN | SYS_C0014535 | 1. 17. 0 (0) | 00:00:01 |
-----------------------------------------------------------------------------------------------------
Information of predicates (identified by the operation identity card):
---------------------------------------------------
3 - access("SYS_SXI_0".") On the SITE "> = TO_DATE (' 2012-01-01 00:00:00 ',' syyyy-mm-jj)"
HH24:mi:SS'))
4 - access("T"."$SYS_NC_OID «= «SYS_SXI_0».») OID")
Tags: Database
Similar Questions
-
Hello
IAM using obiee 11g, hold extract the date year
CAST (YEAR ("ABC". "DATEADDED") as varchar (4)) "
so used like that
But I want as if the year is 11 2011 then only I want y at - it a direct function that does this.
Thank youYou can use the right right function (year 2). Will return 11 if the year 2011
-
Foglight v6 - FaultException: impossible to extract the data of inventory of the collector
After having modernized our virtual center to V4, the foglight fails to report all the details and only has the following alert:
"FaultException: impossible to extract the data of inventory of the collector: the parameter name cannot be null or an empty string."
' Parameter name: key to make sure the collection agent service is running.
If anyone else has had this problem and how to solve?
Thank you
KarimHi Joviyach,
I logged a call with Vizioncore and the resolution is as follows:
the problem you have is related to a VMware problem experienced during the upgrade to vSphere 4.0 as detailed in: kb.vmware.com/.../search.do
Bascially, you must run a SQL command of your Virtual Center via MS SQL Management Studio that will identify one or more VMs who have a missing entry in the VPX_VIRTUAL_SCSICONTROLLER table. Once this information is determined that you would follow the steps 2 to 6 of the reolution... basically remove these virtual machines of the inventory and adding them back.
When these steps are complete, you will re-start the vFoglight Collector of Vmware and Vmware vFoglight connector services. -
Hi, please help me whit this query
Im trying to extrate the data in a file csv and im using the ULT_FILE package
I have this query that read the file and the first field, but if the field has a different length does not work as it shouldFor example if I had this .csv file:
1, book, laptop
2, pen, Eraser
3, notebook, paper
And in the table, I had to insert like this
ID descrption1 description2
laptop 1 book
Eraser pen 2
paper laptop 3
For now, I have this query, which displays only with DBMS:
Declare
-Variables
Cadena VARCHAR2 (32767).
Vfile UTL_FILE. TYPE_DE_FICHIER;
Dato varchar2 (200); -Date
dato1 varchar2 (200);
dato2 varchar2 (200);
Identifier varchar2 (5): = ', '; -Identifier (en)
v_ManejadorFichero UTL_FILE. TYPE_DE_FICHIER; -For exceptions
-Table variables
I_STATUS GL_INTERFACE. % OF STATUS TYPE.
I_LEDGER_ID GL_INTERFACE. TYPE % LEDGER_ID;
I_USER_JE_SOURCE_NAME GL_INTERFACE. TYPE % USER_JE_SOURCE_NAME;
I_ACCOUNTING_DATE GL_INTERFACE. TYPE % ACCOUNTING_DATE;
I_PERIOD_NAME GL_INTERFACE. TYPE % PERIOD_NAME;
I_CURRENCY_CODE GL_INTERFACE. CURRENCY_CODE % TYPE;
I_DATE_CREATED GL_INTERFACE. DATE_CREATED % TYPE;
I_CREATED_BY GL_INTERFACE. CREATED_BY % TYPE;
I_ACTUAL_FLAG GL_INTERFACE. TYPE % ACTUAL_FLAG;
I_CODE_COMBINATION_ID GL_INTERFACE. TYPE % CODE_COMBINATION_ID;
I_ENTERED_DR GL_INTERFACE. TYPE % ENTERED_DR;
I_ENTERED_CR GL_INTERFACE. TYPE % ENTERED_CR;
I_ACCOUNTED_DR GL_INTERFACE. TYPE % ACCOUNTED_DR;
I_ACCOUNTED_CR GL_INTERFACE. TYPE % ACCOUNTED_CR;
I_TRANSACTION_DATE GL_INTERFACE. TRANSACTION_DATE % TYPE;
I_REFERENCE1 GL_INTERFACE. REFERENCE1% TYPE;
I_REFERENCE2 GL_INTERFACE. REFERENCE2% TYPE;
I_REFERENCE3 GL_INTERFACE. REFERENCE3% TYPE;
I_REFERENCE4 GL_INTERFACE. REFERENCE4% TYPE;
I_REFERENCE5 GL_INTERFACE. REFERENCE5% TYPE;
I_REFERENCE10 GL_INTERFACE. REFERENCE10% TYPE;
I_GROUP_ID GL_INTERFACE. GROUP_ID % TYPE;
BEGIN
Vfile: = UTL_FILE. FOPEN ('CAPEX_ENVIO', 'comas.csv', 'R');
loop
UTL_FILE. GET_LINE(Vfile,Cadena,32767);
dato1: = substr (cadena, instr(cadena, identificador,1,1)-1, instr(cadena, identificador,1,1)-1);
dato2: = substr (cadena, instr (cadena, identifier, 1, 1) + 1, instr(cadena, identificador,3,1)-3);
dbms_output.put_line (dato1);
dbms_output.put_line (dato2);
-The evidence
-dbms_output.put_line (cadena);
-dbms_output.put_line (substr (dato, 3, instr(dato, identificador,1,1)-1));
-dbms_output.put_line (substr (dato, instr (dato, identifier, 1, 2) + 1, instr(dato, identificador,1,1)-1));
-dbms_output.put_line (substr (cadena, 1, length (cadena)-1));
end loop;
UTL_FILE. FCLOSE (Vfile);
-----------------------------------------------------------------------------------EXCEPTIONS------------------------------------------------------------------------------------------------------------------------------------------------------------
EXCEPTION
When no_data_found then
dbms_output.put_line ('Todo Correcto');
When utl_file.invalid_path then
UTL_FILE. FCLOSE (V_ManejadorFichero);
RAISE_APPLICATION_ERROR (-20060,'RUTA DEL ARCHIVO NULLIFIED: (');)
WHEN UTL_FILE. INVALID_OPERATION THEN
UTL_FILE. FCLOSE (V_ManejadorFichero);
RAISE_APPLICATION_ERROR ('-20061,'EL ARCHIVO NO PUDO SER ABIERTO ");
WHEN UTL_FILE. INVALID_FILEHANDLE THEN
UTL_FILE. FCLOSE (V_ManejadorFichero);
RAISE_APPLICATION_ERROR (-20062, 'INVALIDO MANAGER');
WHEN UTL_FILE. WRITE_ERROR THEN
UTL_FILE. FCLOSE (V_ManejadorFichero);
RAISE_APPLICATION_ERROR (-20063, 'ESCRITURA ERROR');
WHEN UTL_FILE. INVALID_MODE THEN
UTL_FILE. FCLOSE (V_ManejadorFichero);
RAISE_APPLICATION_ERROR (-20064, 'MODO INVALIDO');
WHEN UTL_FILE. INTERNAL_ERROR THEN
UTL_FILE. FCLOSE (V_ManejadorFichero);
RAISE_APPLICATION_ERROR (-20065, 'ERROR INTERNO');
WHEN UTL_FILE. READ_ERROR THEN
UTL_FILE. FCLOSE (V_ManejadorFichero);
RAISE_APPLICATION_ERROR (-20066, 'LECTURA ERORR');
WHEN UTL_FILE. FILE_OPEN THEN
UTL_FILE. FCLOSE (V_ManejadorFichero);
RAISE_APPLICATION_ERROR ('-20067,'EL ARCHIVO ARE ESTA ABIERTO ");
WHEN UTL_FILE. THEN ACCESS_DENIED
UTL_FILE. FCLOSE (V_ManejadorFichero);
RAISE_APPLICATION_ERROR (-20068, 'REFUSED ACCESS');
WHEN UTL_FILE. DELETE_FAILED THEN
UTL_FILE. FCLOSE (V_ManejadorFichero);
RAISE_APPLICATION_ERROR (-20069, 'OPERACIÓN BORRADO FALLO');
WHEN UTL_FILE. RENAME_FAILED THEN
UTL_FILE. FCLOSE (V_ManejadorFichero);
RAISE_APPLICATION_ERROR (-20070, 'OPERATION SOBREESCRITURA FALLO');
END;
Hello
Try something like this:
POS1: = INSTR (cadena, idntificador, 1, 1);
POS2: = INSTR (cadena, idntificador, 1, 2);ID: = SUBSTR (cadena, 1, pos1 - 1);
description1: = SUBSTR (cadena, pos1 + 1, (pos2 - pos1)-1);
Description2: = SUBSTR (cadena, pos2 + 1);where pos1 and pos2 are numbers.
Rather than use UTL_FILE, consider creating an external table. You won't have to write any PL/SQL, and this means that you won't be tempted to write a bad article of EXCEPTION.
-
extracts the date of a DD-MON-RR part
I would like to extract and compare only the part of the date to a date, for example, I would like to know if an entrydate is equal or less than 9/1.
But the date of the entry are all format DD-MON-RR. How to remove the part of the year and compare only the part of the month and day?
Select entrydate
students
where... < 9/1 - here is the part he needed to work on.
Thank you
a large partHello
Something like
WHERE TO_CHAR (entrydate, "MMDD") > '0901'
I hope that answers your question.
If this isn't the case, please post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.
Explain, using specific examples, how you get these results from these data.
Include special cases, you need to manage; for example, entrydate is exactly 1 September (before or after him), or entry_date is 06:00 on 1 September.
Always say what version of Oracle you are using (for example, 11.2.0.2.0).
See the FAQ forum: Re: 2. How can I ask a question on the forums?
-
Impossible to extract the data of an additional column in the table advance
Hello
We have an obligation to add an extra column to the table of advanced search. In addition, we need sort the table using this additional column.
Now, we have achieved the following:
1. the required VO was already extended previously and the additional column (LAST_UPDATE_DATE) is already present in the definition of the EO. So, we just added the tag for LAST_UPDATE_DATE in YOUR XML in the form:
< ViewAttribute
Name = "LAST_UPDATE_DATE".
IsPersistent = "false".
Type = "Oracle.jbo.domain.date"
ColumnType = "DATE".
AliasName = 'LAST_UPDATE_DATE. '
Expression = "LAST_UPDATE_DATE."
SQLType = 'DATE' >
< / ViewAttribute >
2 added a new MessageStyledText column, and updated the following property:
Prompt = LastUpdateDate. Discover the Instance = TaskPerzSumVO. Display attribute = LAST_UPDATE_DATE. Sort Allowed = true
The field is now visible in table advance and whenever we seek, attaches the value as ' 1901-01-01'. While I checked manually in the respective table, we have the appropriate data. But in the front end we do not get the data in our additional column of table in advance. In addition, if we try to sort the table by clicking the column LAST_UPDATE_DATE, we get the NPE error. Spec of NullPointerException is as follows:
# # 0 in detail
- java.lang.NullPointerException
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:989)
Kindly help us to obtain the appropriate data in the additional column. Thank you!
Kind regards
Zahid
Hi Zahid,
This is the error:
29000: unexpected exception caught: oracle.jbo.NoObjException, msg = Houston-25003: TaskEO.LAST_UPDATE_DATE object of type entity activity not found
Tag entity by its use should have only name of EO and not the name of the attribute.
Use instead under the tag:
EntityUsage = "TaskEO".
Also, I mentioned that rather tags manually, add it please try Wizard VO to add this attribute in EO attributes available list.
-
Extracting the data from relational tables in 11.1.2.1
I want to extract the following data sets from relational tables
1 attribute and his partner basic member
2 Smartlist value of an account
Have a code to extract such data? It will be useful in pointing to the correct table names.
Thank youYou will find the table schemas in the [documentation for EPMA | http://www.oracle.com/technetwork/middleware/bi-foundation/epm-data-models-11121-354684.zip]. If this does not work, there are other options to export hierarchies in text files. You can use the lifecycle management or the [EPMA line Generator | http://docs.oracle.com/cd/E17236_01/epm.1112/epma_file_gen_user/launch.html].
Kyle Goodfriend
http://www.in2hyperion.comPlease make sure that you assign your post as answered when an appropriate response is provided (or useful when it takes place) as well as other benefits.
-
Extract the data from the web service response
Hello
I called a web service and in response to XML data, now I have to extract the values and store them in the array
My steps,
1 call WebService
2 answer stored in the CLOB column
3, then used after the request
SELECT loc.*
OF my_xml PO,.
XMLTable (XMLNAMESPACES)
"urn: schemas-microsoft-com: XML-diffgram-v1" as "diffgr".
,'http://api. .com / "as"ns0"
)
,'/ ns0:DataSet / diffgr:diffgram/NewDataSet/OptOutAll '
PASS xmltype.createxml (PO.xml_data)
COLUMNS
"E-mail" TANK (100) path "Email."
'Reason' TANK (150) PATH 'reason '.
) As loc
WHERE ROWNUM < = 10;
I wrote using this example
But it does not work, do not know why
/ ZabIf I use the XML (stored in the table XMLType TMP_XML) below:
2012-05-09T22:40:00+02:00 information 111111 Subscriber confirmed 2012-06-07T22:30:00+02:00 information 111111 Subscriber confirmed 2012-06-14T00:20:00+02:00 information 111111 Subscriber confirmed 2012-06-19T20:50:00+02:00 information 111111 Subscriber confirmed Then I can do:
SQL> SELECT x.* 2 FROM tmp_xml t 3 , XMLTable( 4 XMLNamespaces( 5 'http://www.w3.org/2003/05/soap-envelope' as "soap" 6 , 'urn:schemas-microsoft-com:xml-diffgram-v1' as "diffgr" 7 , 'http://api.***.com/' as "ns0" 8 ) 9 , '/soap:Envelope/soap:Body/ns0:GetOptOutAllResponse/ns0:GetOptOutAllResult/diffgr:diffgram/NewDataSet/OptOutAll' 10 PASSING t.object_value 11 COLUMNS OptOutTime TIMESTAMP WITH TIME ZONE PATH 'OptOutTime' 12 , MailingList VARCHAR2(100) PATH 'MailingList' 13 , Reason VARCHAR2(150) PATH 'Reason' 14 ) x 15 ; OPTOUTTIME MAILINGLIST REASON ----------------------------------- ------------------------------ -------------------------------------------------------------------------------- 09/05/12 22:40:00,000000 +02:00 information Subscriber confirmed 07/06/12 22:30:00,000000 +02:00 information Subscriber confirmed 14/06/12 00:20:00,000000 +02:00 information Subscriber confirmed 19/06/12 20:50:00,000000 +02:00 information Subscriber confirmed
Are you getting something different?
-
Extract the data from the ReadyNAS Duo 3 to disk?
Hello
I have a ReadyNAS Duo chassis crashed with two drives of 3 TB in it. Both discs seem to work very well.
How can I do to retrieve the data from disks of theses? they were in a RAID 1 configuration, so I guess I just need to extract one of the disks. Does it matter which drive is it?
I started to connect one of the disks to an installation of Ubuntu and I can find from the disc with respect to the available partitions, but I get no info on the file system used, only that it is flagged as RAID.
Because I don't want ot destroy all the data I was very careful when working with the partitioning tool. So far, I've installed and looked parted, gparted, gdisk and a few others.
Since I'm really new to Linux, I need more detailed assistance with indicators to be used to access the drive.
Any input is highly appreciated.
Christoffer
Look at this: http://kb.netgear.com/app/answers/detail/a_id/29961?utm_source=community&utm_medium=announcement&utm...
-
Extracting the data from QVariantMap
I have the following data :
QVariant (QVariantMap, QMap ((' data', QVariant (QVariantMap, QMap ((' current_condition', QVariant (QVariantList, ((QVariantMap, QMap... QVariant QVariant (QVariantMap, QMap ((' weather', QVariant (QVariantList, ((QVariantMap, QMap... QVariant QVariant (QVariantMap, QMap ((' weather_desc', QVariant (QVariantList, ((QVariantMap, QMap... QVariant
m_model-> insert(data.value
() .value ("data") .toMap ().value("weather").toList () .at (0) .toMap ()); Using the above line, I am able to extract relevant data from "current_condition and"weather".
What should I add to the line above to also extract data from 'weather_desc '?
Any help would be appreciated. Thank you.
Thank you! It is much easier to read when formatted, it's the first thing I did.
{ "data": { "current_condition": [ { "cloudcover": "0", "humidity": "18", "observation_time": "02:36 AM", "precipMM": "0.0", "pressure": "1007", "temp_C": "39", "temp_F": "102", "visibility": "10", "weatherCode": "113", "weatherDesc": [ {"value": "Sunny" } ], "weatherIconUrl": [ {"value": "http:\/\/www.worldweatheronline.com\/images\/wsymbols01_png_64\/wsymbol_0001_sunny.png" } ], "winddir16Point": "N", "winddirDegree": "10", "windspeedKmph": "46", "windspeedMiles": "29" } ], "request": [ { "query": "Melbourne, Australia", "type": "City" } ], "weather": [ { "date": "2013-01-04", "precipMM": "0.0", "tempMaxC": "37", "tempMaxF": "98", "tempMinC": "19", "tempMinF": "66", "weatherCode": "113", "weatherDesc": [ {"value": "Sunny" } ], "weatherIconUrl": [ {"value": "http:\/\/www.worldweatheronline.com\/images\/wsymbols01_png_64\/wsymbol_0001_sunny.png" } ], "winddir16Point": "N", "winddirDegree": "3", "winddirection": "N", "windspeedKmph": "21", "windspeedMiles": "13" } ] } }
To access weatherDesc in usage by time:
Data.value
.value("data").toMap ().value("weather").toList () .at (0) .toMap ().value("weatherDesc").toList () .at (0) .toMap .value ("value") ()) This will return "Sunny."
For readability, I suggest if this string to:
QMap
dataMap = data.value ().value("data").toMap(); QList weatherList = dataMap..value("weather").toList(); QVariant firstWeatherEntry = weatherList.at(0); QMap weatherEntryMap = firstWeatherEntry.toMap(); QList weatherDescList = weatherEntryMap.value("weatherDesc").toList(); QVariant firstWeatherDescEntry = weatherDescList.at(0); QMap weatherDescEntryMap = firstWeatherDescEntry.toMap(); QString value = weatherDescEntryMap.value("value").toString(); // "Sunny" Also, you can check intermediate outcomes at each stage by calling
qDebug()< weatherlist="">< "\n";="" and="" so="">
-
Portlet cannot extract the data
Hello
I created an adf application that retrieves data from the Employees table.
I run to the local wls and everything works fine.
I created an entry portlet.
I have deployed my portal (right click on the application--> deploy...).
I created a page to add my portlet here.
I ran the page and it is impossible to extract all the data.
From the console, I had a reference of message incomplete connection for connection object: op
Any ideas how I can retrieve the data?
Christos
The first thing that the error message complains of a connection named "op" while your server has set 'opekepeDS '. Second thing, it is that jdbc, data sources are defined with a tiny "jdbc" instead of the uppercase 'JDBC' you used.
Check the connection of the application. The name of the data source must match the name defined on the server.
Timo
-
Regular expression to extract the date
Hi all
Please show me how can I extract date of statement, that date has four forms such as
2008-08-08 or 08/08/2008 or 2008-agu-8 or 8.8.2008
the follwing query can extarct in this form 08/08/2008.
SELECT REGEXP_SUBSTR ("the Conference will be on 08/08/2008 ',' [0-9] {1,} / [0-9] {1,} / [0-9] {2,}'") FROM dual;
concerning
Isabelle
Published by: Isabelle on 29 July 2012 10:17Specifically, he writes that
the date has four following forms: 2008-08-08 or 08/08/2008 or 2008-agu-8 or 8.8.2008
then why you will keep nagging on 10/11/12?
@OP: here is a starting point, as I understand it:
with dirtydates as ( select 1 myrow, 'The date is 8.8.2012' mydate from dual union all select 2 myrow, 'The date is 19.Aug.2012' mydate from dual union all select 3 myrow, 'The date is 20-08-2012' mydate from dual union all select 4 myrow, 'The date is 21-8-2012' mydate from dual union all select 5 myrow, 'The date is 22/8/2012' mydate from dual) select myrow, mydate, regexp_substr (mydate , '[0-9]{1,2}[[:punct:]]([0-9]{1,2}|[[:alpha:]]{3})[[:punct:]][0-9]{4}' ) datesubstr from dirtydates order by 1 ; MYROW MYDATE DATESUBSTR ---------- ----------------------- ----------------------- 1 The date is 8.8.2012 8.8.2012 2 The date is 19.Aug.2012 19.Aug.2012 3 The date is 20-08-2012 20-08-2012 4 The date is 21-8-2012 21-8-2012 5 The date is 22/8/2012 22/8/2012 5 rows selected.
It's a regular expression simple-thing. You can use: punct: or the list of the ones you want, like [.-/]
-
How to extract the date of birth of the employee Table
Hi experts,
I'm new to SQL, help for my problem Pls
I saw an employee table
CREATE TABLE 'NIM_EMP '.
(VARCHAR2 (20) "EMP_NO")
"EMP_NAME' VARCHAR2 (100),
VARCHAR2 (50) "EMP_DESIG."
'HIRE_DATE' DATE,
NUMBER OF "EMP_SAL."
NUMBER OF "EMP_DEPT."
DATE OF THE "DATE OF BIRTH".
) ;
with data is as
Emp_No - 203
EMP_Name - Thérèse
EMP_Desg - system administrator
HIRE_Date - 10/12/2011
EMP_SAL - 25000
EMP_DEPT - 10
DATE OF BIRTH - 09/02/1987
Problem-1 - I want to show the birthday information to all users, because "it is today the anniversary of Mr.Upendran as - 25 years"
Problem-2 - "today, Mr. Upendran is completed a year of Service in our concern" (this is based on the Date of HIRING)
How to extract data from SQl
Thanks in advance,
Thérèse913370, you are right in both cases. I have corrected my code for the raw material.
The second question may be fixed, because there is no sex information in the table. -
How to extract the data in a grid format in an area of the bean in forms 6i?
Hello
I need help from all the gurus and the experienced people in forms 6i. I'm currently building the shape that will have certain text fields and a bean area that displays the records that I had entered. Suite to the essentials is the basic form structure, I am developing
1. There will be a search form that will have two text fields 'Emp ID' and 'Name Emp' and two buttons 'New' and 'find '.
2. There is an alternative, which will have an area of bean that allows to display the following columns in it in the form of a GRID
a. Emp ID
(b) name of the Emp of
This form will be also two 'Emp ID' and 'Name Emp' text fields.
3. when I press 'New' in the search engine so the second form should open and it will be empty. I can enter data into text fields and save the form. The area of the grid (the bean area) must be empty.
4. when I reopen the search form and enter the 'Emp Id' I just created in the previous step and click on the "Search" button then the following form should open and the "Emp Id" and the text "Emp name" fields must be populated with the data that I created in step 3 and the bean area must also display the record in the form of a grid.
I'm ok with all parties except the part of area of bean. Can you help me hpw to develop the form with the area of the bean and extract data when wanted and display as a grid?Take a look at the link I provided. Francis already has an example of implementation of a Java data grid on a form. The direct link is: http://forms.pjc.bean.over-blog.com/article-1830062.html
Craig...
-
Extract the data from an attachment in Adobe Reader 8
Hello
We have an obligation to read adobe pdf attachment data. We create the PDF file in Adobe Live Cycle Designer ES. The discussion I understand that we can get the name and the size of the attachment using the dataobjects. But I need the contents of the attachment. I would like to know if there is any code to extract the attachment data.
Thanks in advance.
You can read the contents of a file attached by using the doc.getDataObjectContents method: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.475.html
You'll just have to analyze content correctly using JavaScript.
Maybe you are looking for
-
Since the last update failed to read my videos
When I go to play my videos pro will just will not load or my photos have one in the lower right corner?
-
Could not connect with my apple ID
Hi, can I use my apple ID to connect to icloud.com and other sites, but I can't do this on my Macbook and iPhone. It is said: Verification failed This action could not be performed. Try again.
-
What is "media downloads" in respect of the use of the data?
"" I noticed that ' downloads media ' take a huge part of the use of 3G data on my phone (usually 40 ~ 60% of the total use). No idea what it is, and other people see this kind of behavior? I deleted all the motoblur widgets (but note that they are r
-
How to reformat Satellite A50 112?
HelloCan someone tell me how to reformat a Toshiba Satellite A50 112Thank youGazza
-
Question about port forwarding WRT54GX2 router
I am transmitting the 52199 port to my computer for a server of media for J River Media Center 17. I get an error saying that my port is not properly transmitted. I can access the media on my network wireless on my phone. There is something pressi