PL/SQL :: Extract Values From Text In Reporting Environment

Jun 26, 2012

I need write a query based on a bunch of user supplied IDs. The IDs will be pasted as plain text, one per row, by end user in a memo field in the reporting environment, and I need to do something like this:

SELECT PHONE_NUMBER FROM TELEPHONE
WHERE
ID IN('MEMO_ID1', 'MEMO_ID2',.....)

Reporting environment does not provide any tools to automatically convert plain text into IDs.

View 9 Replies


ADVERTISEMENT

Extract Data From Oracle To Text Files?

May 13, 2004

I would like to extract some data value from oracle to a text file...and i m not sure how to set the delimiter between the columns data value

SET echo off
SET space 0
SET pagesize 0

SPOOL a.txt

SELECT emp_id, name, add
FROM table1
/
SPOOL OFF

Where do i set the delimiter?

Can i do something like in SQL*Loader?

fields terminated by ',' enclosed by '"'

I would like the text file to be display as
"123","ABCD","123 abc road"
"234","XYZ","234 xyz road"

View 5 Replies View Related

SQL & PL/SQL :: Extract Numbers From Text / Multiply / Get Result

Feb 27, 2013

Have 2 small tasks for regexp..where we need to extract numbers from the text & multiply & get the result.

Input field varchar2 : 5x a day x 10 days
Output : 5 * 10 = 50
Select regexp_replace('5x a day x 10 days', '[^[:digit:]]' from dual;

The code extracts numbers ..but doesn't multiply & give the result.Have one more scenario as well.

Input field varchar2 : take 2 tablets (800 mg) by oral route every 4 hours while awake for 10 days
Output : 2 * 800 * 4 * 6 * 10 = 384000
Select regexp_replace('take 2 tablets (800 mg) by oral route every 4 hours while awake for 10 days', '[^[:digit:]]' from dual;

For the above code, if it's hours ..we need to convert into day by multiplying with the required factor to make it a day.

View 9 Replies View Related

SQL & PL/SQL :: How To Extract Full Text From Clob Where Having Distinct Select

May 23, 2013

I am only able to extract only 4000 characters from the clob column "DESCRIPTION".how to get more characters or max for that column with the same query concept?

select distinct
o.id "Organization ID",
en.entity_id "Contact ID",
en.entity_cd "Note Entity Code",
ed.entity_name "Note Entity",
en.entity_id "Note Entity_id",

[code]....

View 28 Replies View Related

SQL & PL/SQL :: Extract Data From Local Database Table To Text File?

Jun 27, 2013

i want to extract data from my local database table to text file using plsql

View 4 Replies View Related

SQL & PL/SQL :: Extract Email ID From A String / Text Using Oracle Regular Expressions

Oct 14, 2013

code to extract email id (full email id) from a string/text using Oracle Regular Expressions.

Example -

"This is my String with email abc.efg@hij.com to test" O/p - abc.efg@hij.com

View 9 Replies View Related

PL/SQL :: Extract Values From A Column

Aug 26, 2013

I need to extract the values and store it in seperate column. write the function to extract the data from column.I am having column DOC_NO from which i have to extract dob, gender, nationality Doc_no:  

9005070288080 DOB : 900507- yyddmm  Gender : 0288- if less than 5000 then female else male Nationality: 080-  0 means India 1 means foreigner. 

View 4 Replies View Related

PL/SQL :: Extract Values Of Strings?

Jun 20, 2012

extract the value of the strings for REQUEST_GROUP_CODE and REQUEST_GROUP_APPL_SHORT_NAME. As you can see I have to deal with whitespace differences, case differences etc. I need the values between the quotes for each one. get ACCOUNTING and AR for the first example. I am using db version 11g r1.

WITH TEST AS
(SELECT 'REQUEST_GROUP_CODE="ACCOUNTING" REQUEST_GROUP_APPL_SHORT_NAME="AR" TITLE="AR:AR_SRS_TITLE_ACC_RPTS"' str FROM dual
UNION ALL
SELECT 'REQUEST_GROUP_CODE = "PRINT_CONSINV"REQUEST_GROUP_APPL_SHORT_NAME = "AR"TITLE =

[code]...

View 5 Replies View Related

PL/SQL :: Extract Values From String To Variables?

Jul 16, 2013

I need to extract values from string to variables as below.

declare
str varchar2(100):='Acknowledgment=1234,Order Requester=5678,Site Contact=9999,Other Contact=1456,Pre=1234,23445,56767';
l_a varchar2(100);
l_or  varchar2(100);
l_s  varchar2(100);
l_ot  varchar2(100);
l_pre  varchar2(100);
Begin
l_a:='1234';
l_or:='5678';
l_s:='9999';
l_ot:='1456';
l_pre:='1234,23445,56767';
end;
/

But here challenge is order of alignment change dynamically. ex as below. 

str varchar2(100):='Order Requester=5678,Acknowledgment=1234,Site Contact=9999,Other Contact=1456,Pre=1234,23445,56767';
str varchar2(100):='Pre=1234,23445,56767,Order Requester=5678,Acknowledgment=1234,Site Contact=9999,Other Contact=1456';

 So how to extract Acknowledgement to l_a,Order requester to l_or ...

View 9 Replies View Related

Backup & Recovery :: Moving From One Windows Environment To Another Linux Environment?

Jun 19, 2012

I'm trying to move my backup sets from windows database environment, to OEL 5.7 environment on another server.

I've found a manual [URL] by which I am trying to do it.I took backup sets from last night's backup using RMAN,and the current parameter(initSID.ora) file from the running live database.Now i need to configure control files in the pfile accordingly.

1. can i take current control files from the running system, to restore and recover backup sets from last night, to the state the database was at backup time?

2. how can i find out if control files are backed up and know by RMAN? "list backup completed after '2012-JUN-19';" >> gives me Archive redo logs, datafiles, but don't see the control files(or don't reconize them).

View 15 Replies View Related

Insert Rows Based On Text Values?

Mar 22, 2007

I am an Oracle beginner and I am having some trouble with the following insert query.

I am inputting values into text boxes and then this is carried out as a trigger upon clicking a button.

INSERT INTO client VALUES(':student.txtclientid', ':student.txtclientname', ':student.clientaddress', 13564338);
INSERT INTO enrolment VALUES(':student.txtclientid', ':student.lstoccurrence', null, null);

The above text boxes are all working fine as I have viewed the values using the message command. My proplem is that if i leave the fields blank it inserts ':student.txtclientname' into the row, otherwise it returns "Could not insert record"

View 1 Replies View Related

Forms :: How To Insert Column Values Into Text Items

Dec 30, 2011

I have created the Textitem with five instances.

i am trying to assign column values to text item through query.

if my table contain one record,it shown in textitems.But if my table contains more records it is showing ora-1422 err.how to solve it.

View 1 Replies View Related

Reports & Discoverer :: How To Return Values In A Text Or Boiler Plate

Feb 15, 2012

Well i like to display the Values in Boiler Plate/Text. For Example, i have Report with Address Columns. for Tin No: i have Hard coded as TIN: 34XXXXXX01 and i like to change this hard coded item as TIN: 34XXXXXX02 so during Runtime if the input is changed the above item to be changed.

Inputs given in Report Parameter;

if the input is given as 81

TIN: 34XXXXXX01

if the input is given other than 81

it should print as TIN: 34XXXXXX02

How to give it in the Boiler plate.?

View 6 Replies View Related

SQL & PL/SQL :: Reporting Using Cursor

Nov 8, 2010

I am using Oracle 11G. I have set of tables in a schema - DDXX_UTIL.

Table Names wll be with the high level qualifiers DDXX_REJ_EMP*

DDXX_REJ_EMPLOYEE
DDXX_REJ_EMPLOYEE_DEPEND
DDXX_REJ_EMPLOYEE_ADDRESS
DDXX_REJ_EMPLOYEE_SAL
DDXX_REJ_EMPLOYEE_EXP

My requirement is to get the number of rejections happened on that day after the batch cycle for the tables with the high level qualifier DDXX_REJ_EMP* and list out each table followed by the rejection cause and count.

Expected Result
-----------------------------------------------------------------
TABLE NAME : DDXX_REJ_EMPLOYEE
REJECTION_CAUSE COUNT
ID LIST MISSING 25
MANDAORY FIELDS IS NULL 56

TABLE NAME : DDXX_REJ_EMPLOYEE_DEPEND
REJECTION_CASUE COUNT
ID LIST MISSING 25
MANDAORY FIELDS IS NULL 56

Given below is the create statement for one of the table.

CREATE TABLE DDXX_UTIL.DDXX_REJ_EMPLOYEE
(
REJECTION_CAUSE VARCHAR2(510 BYTE),
INTEG_REJ_DATE VARCHAR2(10 BYTE)
);

SAMPLE_DATA
DDXX_REJ_EMPLOYEE
REJECTION_CAUSE INTEG_REJ_DATE
INVALID ID 31-OCT-10
INCORRECT FIELD 31-OCT-10
INVALID ID 31-OCT-10
INCORRECT FIELD 31-OCT-10

I need to group by the rejection cause and integ_rej_date for all the tables.

View 5 Replies View Related

OEM Grid Control 10g Reporting

Aug 19, 2011

I am using OEM Grid control 10g for monitoring/reporting purposes and a bit new to OEM.I am able to generate database alerts sent via email say for DB_abc1 and also generate reports.I installed Oracle 10g agent on a another box and lets say with DB_abc2 running on it,and did not realise that there was a database control already installed on that box, so I

1.Uninstalled database control on DB_abc2 box.
2.Uninstalled Oracle 10g agent and re-installed it on DB_abc2 box.
2.Was able to configure the DB_abc2 database from OEM Grid control gui ie the dbsnmp user password and was able to connect to it.

But when I put in alert for things like ORA-XXXX errors I am not getting any emails, also when I put in database usage reports(to be sent via emails) the reports are not picking up any data, they are empty.

I checked the agent on the box in question and the heart beat is OK, and I manually uploaded using "emctl upload" and it is sucessful.The only alerts I am getting for DB_abc1 is the agent up/down thats it.

DB_abc1 is a 9208 database and DB_abc2 is 10201 database.

View 2 Replies View Related

SQL & PL/SQL :: How To Show Only Address For Yes Tax Reporting Site

Aug 22, 2013

I have a sql to pull all payments from vendors for a specific time period; however, now tasked to only show the Address of each Tax Reporting Site. I have tried several commands but have not been successful.

View 7 Replies View Related

Using Total Recall With Streams - Reporting Database?

Jun 2, 2010

this Topic was already discussed in "Physical standby on oracle 11g - Reporting needs" but without finishing.

View 5 Replies View Related

SQL & PL/SQL :: To Create Columns From Distinct Rows In Reporting

Feb 22, 2010

I have a table PRODUCT with following structure:

Productcode Productname Quantity
AF Ade Fgh 100
LO Ldo Ope 50
SK Ske Kro 47
....

There may be any number of records in the table. Now I need to print distinct products in different columns such as.

AF LO SK
100 50 47

There may be any number of products...I need to print all those products as different columns as shown above. How to write the Stored procedure for this?

View 2 Replies View Related

Performance Tuning :: Copy Data From Transaction (DB1) To Reporting (DB2)

Nov 26, 2010

We are copying our transaction tables data into another database for our reporting applications (say every day midnight refresh will happen).

The Transaction Database has some 30tables. Existing system is following below points and it is taking 2hours to complete.

1) Truncate data from reporting database (or schema)

2) Direct path Insert into reporting database (or schema) as select * from transaction tables.

3) Rebuild index and Enable constraints.

Note: Each tables data will vary from 30lakhs to 50lakhs. Dump/import/export is not advised by the client.

I want to cut down the time i.e., below 2hours. Instead of above method. Can go for a field in each table specifying the time of each records update/insert operation and then pick the modified records only and copy into reporting db.

View 4 Replies View Related

Replication :: Two Schemas To Be Moved / Replicated To New Reporting Database

Oct 19, 2011

I would like to know the Replication method which is fast and the best approach,we need two schemas to be moved/replicated to a new reporting database.It appears that data is to be flown in one way,do we proceed with Materialized view replication or please clarify about Oracle Streams and Advanced replication. what are the factors to decide the replication method.

View 3 Replies View Related

Security :: Audit User Connection On Reporting Database?

Jun 9, 2011

I want to audit user connection on my reporting database, and send a report to application team on monthly basis, with a list of users who are not connected for a month and remove them.

What would be best method, i know there is LOGON trigger, or database level auditing.

View 14 Replies View Related

PL/SQL :: Create Reporting View Based On Date Column

Jul 30, 2012

My DBA gave me a table with only one date column say Table1.Date. Its in the format of Date and say it is = 7/23/2012.

Now i have to create my own Reporting View(which is used for reporting) based on that date column like below:

It should be a column with values in the following format =
2012-07
2012-06
2012-05 etc....upto
2010-01

So i started out my creating like this:

select
to_char(Table1.Date,'yyyy-mm')
from Table1
Union

[Code]....

.and so on till i get 2010-01.

there has to be a better way to do this.

View 7 Replies View Related

Forms :: Filter Hard Coded Values In List Item (Tlist) Based On Value Entered In Text Item

May 22, 2010

I have 2 items in my form:

1) Text Item
2) Tlist

Upon form load, TList will be populated with predefined item. The behavior i am trying to achieve is to have a text item so user could entered specific text which will then filter the values in TList .

View 1 Replies View Related

Reports & Discoverer :: Reporting Against Ap Invoice Hold Release Name In Oracle 11.5.10

May 9, 2012

why we seem to be unable to report against the ap invoice hold release date using Discoverer in Oracle 11.5.10? the person who wrote our current report used a decode statement to look at the last update date of the release lookup code to create a release date, but i am trying to recreate this in a different tool (Qlikview) and just wanted to understand why we seem to be unable to report on the field as is!

View 4 Replies View Related

Data Guard :: Implement Logical Standby Database For Reporting Purposes

Apr 14, 2010

I working on a Production Environment, where our Database is running on a IBM-AIX platform.I need to implement Logical standby database for reporting purposes, in order to improve the performance.Now the transaction and the reporting is done at the same site itself.I want to know that, operating system and platform architecture (RAM size, no. of CPUs, ORACLE_HOME etc..) on the primary and standby systems must be same or can be different. complete configuration for Dataguard. My os version is,

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production

View 1 Replies View Related

Application Express :: Prefix Text Entered Into Text Area With Userid And Timestamp?

Sep 12, 2012

Have got basic form on a table and have a textarea which holds Notes added by user.

So Notes database field is updated on Save / Apply changes button being pressed.But would really like any text added / appended to the Notes field to be prefixed by userid and date / timestamp.

Is it possible via dynamic actions or Javascript to have any new text added / typed to be auto prefixed as per above.

Would only want the first key press in the filed to trigger the auto-prefix and if added text was deleted then the auto prefix to be deleted as well ?? If user doesn't press Save / Apply changes obviously want to leave existing Notes as is.

View 5 Replies View Related

Forms :: Is There Text Changed Trigger With Text Item Function

May 5, 2010

Is there text changed trigger with text item function like when_list_changed trigger of list item?

View 7 Replies View Related

Forms :: MS Word Rich Text Format In Text Item

Apr 17, 2012

Can I use rich text item on oracle form10G with some simple features like BOLD, UNDERLINE, ITALIC and if possible one more feature like spell check.

I Google my requirement, but mostly I found win word attachment. Further more if I can save this type of data in field then how can I print in report.

View 3 Replies View Related

Text :: Index Memory Parameter For Oracle Text Indexes

Sep 17, 2013

I am on Oracle 11.2.0.3 on Linux and have implemented Oracle Text.I created Oracle Text indexes with default setting. However in an oracle white paper I read that the default setting may not be right. Here is the excerpt from the white paper by Roger Ford:URL....(Part of this white paper below....)Index Memory.                                  

As mentioned above, cached $I entries are flushed to disk each time the indexing memory is exhausted. The default index memory at installation is a mere 12MB, which is very low. Users can specify up to 50MB at index creation time, but this is still pretty low. This would be done by a CREATE INDEX statement something like: CREATE INDEX myindex ON mytable(mycol) INDEXTYPE IS ctxsys.context PARAMETERS ('index memory 50M');  Allow index memory settings above 50MB, the CTXSYS user must first increase the value of the MAX_INDEX_MEMORY parameter, like this:  begin ctx_ adm. set_ parameter('max_index_memory', '500M'); end;  The setting for index memory should never be so high as to cause paging, as this will have a serious effect on indexing speed. On smaller dedicated systems, it is sometimes advantageous to temporarily decrease the amount of memory consumed by the Oracle SGA (for example by decreasing DB_CACHE_SIZE and/or SHARED_POOL_SIZE) during the index creation process.

Once the index has been created, the SGA size can be increased again to improve query performance." (End here from the white paper excerpt)My question is:

1) To apply this procedure (ctx_adm.set_parameter) required me to login as CTXSYS user. Is that right? or can it be avoided and be done from the application schema? This user CTXSYS is locked by default and I had to unlock it. Is that ok to do in production?

2) What is the value that I should use for the max_index_memory should it be 500 mb - my SGA is 2 GB in Dev/ QA and 3GB in production. Also in the index creation what is the value I should set for index memory parameter  - I had left that at default but how should I change now? Should it be 50MB as shown in example above?

3) The white paper also refer to rebuilding an index at some interval like once in a month:   ALTER INDEX DR$index_name$X REBUILD ONLINE; We are on Oracle 11g and the white paper was written in 2003.

View 5 Replies View Related

Forms :: Text Box To Accommodate Large External File Text

Dec 30, 2010

I have a requirement in one of my forms screen.I have a text box(large text area) which should display a help text file when i move my cursor on the topics displayed on the screen.know the code and the properties to be changed in the text box to accommodate large external file text.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved