How to find a particular string in the entire schema?
Hello world
My version of DB is
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi PL/SQL Release 10.2.0.1.0 - Production "CORE 10.2.0.1.0 Production" TNS for Linux: Version 10.2.0.1.0 - Production NLSRTL Version 10.2.0.1.0 - Production
Suppose I have a so-called "EMAIL_ID" column in the employee table. The name of the employee is "abcd" and his email_id "[email protected]". ""
The column name is changing "EMAIL_ID' to 'Email_Address' due to the bad standard naming convention.
Now I only have a constant value that is " " [email protected] "... So is it possible if I write a query with this value and I'll have the list of
tables and the exact column name where this mail_id exist?
Kind regards
BS2012.
DECLARE ncount NUMBER; vwhere VARCHAR2(1000) := ''; vselect VARCHAR2(1000) := ' select count(1) from '; vsearchstr VARCHAR2(1000) := '[email protected]'; BEGIN FOR k IN (SELECT a.table_name ,a.column_name FROM user_tab_cols a WHERE a.data_type LIKE '%VARCHAR%') LOOP vwhere := ' where ' || k.column_name || ' = :vsearchstr '; EXECUTE IMMEDIATE vselect || k.table_name || vwhere INTO ncount USING vsearchstr; IF (ncount > 0) THEN dbms_output.put_line(k.column_name || ' ' || k.table_name); END IF; END LOOP; END;
Tags: Database
Similar Questions
-
How to find recently created procedures in the current schema?
Hi all
in which oracle table I find recently created procedures with data timestemp as well?
Thank you.
Kind regards
Robert
Hi Robert,.
Watch dba_objects or all_/user_objects.
Something like that for the last day:
select * from dba_objects where LAST_DDL_TIME > sysdate -1 and OBJECT_TYPE in ('PROCEDURE','PACKAGE','PACKAGE BODY','FUNCTION') and owner = '
'; concerning
Kay
-
Hello, my bare of tools a missing person is left and not of I don't know how to find I is still in the tool to crop my image.
Go to the window menu and choose Tools.
-
How to choose a particular directory in the connection to the FTP server window. He used to have she and her party?
The user interface has changed a bit. The folder field is now in the screen that follows to connect to the FTP server.
Adobe help Muse | Download a Site from Muse Adobe on a third-party hosting service
Abhishek
-
How to find these different namespaces in the schema?
Hello
I heard that this schema contains different namespaces. How to find these different namespaces in the schema?
I checked with this, but it is throwing "table or view does not exist.
Select the namespace of v$ librarycache.
Thank you
PraveenAre you referring to this? From the reference manual of the SQL language under the schema object names and qualifiers
7. part of a namespace, no two objects can have the same name.
The following schema objects share a namespace:
Tables
Display
Sequences
Private synonyms
Autonomous procedures
Autonomous stored functions
Packages
Materialized views
User-defined typesEach of the following schema objects has its own namespace:
Index
Constraints
Clusters
Database triggers
Private database links
DimensionsBecause tables and views are in the same namespace, a table and a view in the same schema cannot have the same name. However, the tables and indexes are in different namespaces. Therefore, a table and an index in the same schema may have the same name.
Each schema in the database has its own namespaces for objects that it contains. This means, for example, two tables in different schemas are in different namespaces and can have the same name.
Each of the following schema objects also have its own namespace:
User roles
Public synonyms
Links to public database
Storage spaces
Profiles of school boards
The files (PFILEs) settings and server settings (SPFILEs) filesBecause objects in these namespaces do not appear in the drawings, these namespaces cover the entire base.
That's why you can do:
SQL> create table t (id number, descr varchar2(10)); Table created. SQL> alter table t add constraint t check (mod(id,2) = 0); Table altered. SQL> create index t on t(id); Index created. SQL> create trigger t 2 before update on t 3 begin 4 dbms_output.put_line('T Trigger'); 5 end; 6 / Trigger created.
but not:
SQL> create view t as select * from t; create view t as select * from t * ERROR at line 1: ORA-00955: name is already used by an existing object
or
SQL> create procedure t 2 begin 3 null; 4 end; 5 / create procedure t * ERROR at line 1: ORA-00955: name is already used by an existing object
John
-
How to find inserted last record in the table.
Version: Oracle 10g
I have a table called 'Manufacturing' and 3 columns as mfno, itemname, quantity.
How to find inserted last record in the table 'manufacturing '.
As I got to know that the Rowid is not a result perfect result. Please provide your inputs.user13416294 wrote:
Version: Oracle 10gThis is not a version. It's a product name. A version is 10.1.0.2 or 10.2.0.4, etc.
I have a table called 'Manufacturing' and 3 columns as mfno, itemname, quantity.
How to find inserted last record in the table 'manufacturing '.Not possible as your data model do not answer for him. As simple as that.
If there is a need to determine an order or associate some time to an entity, then that should be part of the data model - and a relationship, or one or several attributes are necessary to represent this information. Your data model in this case is therefore unable to meet your requirements.
If the requirements are valid, set the data model. In other words - your question has nothing to do with Oracle and nothing to do with the other pseudo columns in Oracle, the rowscn or the rowid. It is a question of pure data modeling. Nothing more.
-
Hi all
Here's the scenario:
- My computer crashed. were to return to complete export (expdp 11.2.x to impdp 12 c). successfully done.
- Configured ADR blah blah... can access the admin of the apex.
- Problem is: administration interface does not SEE my workspaces apex Apex (only the workspace IN-HOUSE).
- After investigation it seems that APEX (after the upgrade) is somehow configured / run with: schema APEX_040200 and not
APEX_040100 (as I have improved Apex in the old database versions).
5. If I'm running the following:
ALTER session set current_schema = APEX_040100;
Select short_name, display_name
of wwv_flow_companies
where source_identifier is not null;
I SEE all my beloved workspaces.
6 my questions:
a. How can I force APEX to use the specific schema: APEX_040100 instead of APEX_040200?
b. or are there other alternatives to assign these workspaces in the current environment?
Concerning
Etay G
Hello Brad,
Thank you for your response. Appreciated.
- You are right. Indeed, this should be the correct answer:
- I forgot to mentioned I tried this (before the procedure below):
- (https://docs.oracle.com/cd/E59726_01/install.50/e39144/trouble.htm#BABCBEAD)
- Yet, as I had a little corrupted environment Apex after import (impdp), COMPREHENSIVE database this method of revocation (above) has failed several times to me.
- What solved my problem was is mentioned here: https://community.oracle.com/thread/2565074?start=0&tstart=0
- Here's what I have (solves the problem):
- Deleted APEX_040200 Apex 4.2 installation().
- Text left in DB is the only APEX_040100
- Then, the version 5.0.3 and it worked!
More importantly, after the installation of APEX, all workspaces, users, etc. are automatically correctly resided in APEX.- I think that if you have only 1 version of apex corrupted in DB. It should work as well. Remove again, schema using the above script (check version) with caution (after backup, etc.).
Kind regards
Etay G
-
In CC Dramweaver Adobe how to make my Web page fill the entire window?
In Adobe Dreamweaver CC how to make my Web page fill the entire window?
A width of 100% CSS.
Body {width: 100 %}}
Nancy O.
-
copy the entire schema to the new database
Hi... What is the best way to copy the entire schema (25 GB) to the new database ther.
Thank youWhat is best way to copy the entire schema (25 GB) to the new database ther.
Import/export
Import export/Datapump DataPump (if the database is in 10g)
DEC using the database link -
How to find on-site quantity on the specified date
I have this request to find available courses:
[code]
SELECT mp.organization_code org, msi. ATTRIBUTE13, msi. ATTRIBUTE7,
SUM (NVL (mmt.transaction_quantity, 0)) onhand
OF mtl_system_items_b msi.
mtl_parameters mp,
mtl_material_transactions mmt
WHERE mp.organization_id = msi.organization_id
AND mmt.organization_id (+) = msi.organization_id
AND mmt.inventory_item_id (+) = msi.inventory_item_id
and mmt.transaction_quantity <>0
GROUP BY msi. ATTRIBUTE13, mp.organization_code, msi. ATTRIBUTE7
[\code]
If I add this line:
[code]
"AND mmt.transaction_date (+) < ' 01-sep-2015."
[\code]
will I have the date on the quantity available so far?
because when I add it, it shows less value...
' 01-sep-2015' is not a string, a date, so you can reasonably make a comparison of the range (lower to higher etc.) against it.
Try instead:
AND mmt.transaction_date (+)<>
If this gives you what you want, I don't know that you haven't posted your tables or data in the example, or shown what number you encounter, or the expected output you want.
-
How to find and read files on the computer
Lost important documents on the desktop. They have also disappeared from my flash drive.
How can I get in the files stored on my computer? How to find important files, I lost?
Windows Vista IE 8
Hello
Try to follow the steps in this link and check if it helps: recover lost or deleted files http://windows.microsoft.com/en-US/windows-vista/Recover-lost-or-deleted-files
-
I am struggling with the XML search and replace in Catalog Manager tool. I want to find a particular column, but due to generic problems, I want to find with the intact double quotes and then replace with double quotes too. For example:
Front: "CSM_MBR_ASA_INP_EFF_DT"
After: "Effective Member ASA entry Date"
The problem with just the text, is that there are columns like CSM_MBR_ASA_INP_EFF_DT_NEW used in the reports that I don't want to touch.
When I do the exact search and replace as above, I get no results.
"
-
How to find my WEP key and the name of my network?
I need to reset my wireless printer to scan. It asks for my WEP key and I thought it was one that is not correct. How to find the right WEP key and my correct network name? I have a laptop HP Pavilion dm4 with HP scanner/printe wireless
You must log - on to your AP or wireless router and look for the 'Wireless' or similar tab for your WEP key and the network name (SSID). Or you may be able to locate the information by going to control Panel\All Control Panel Items\Network and Center sharing on your laptop.
Frank
-
How to find if an invoice to the AP is approved automatically or manually?
Hello
I have a question about invoices in Payables.
How know if an invoice is approved manually or automatically, is approved?
Like, for example, a company, all less than $ 50 bills can be approved without the consent of the Manager. These invoices can be automatically approved. But all these bills over $ 50 must be approved by the Manager.
Do we not have this kind of scenario? If so, how do we identify them in oracle tables. What table and column that specify this source.
Thank you
Hello
You can find it by referring to the WFAPPROVAL_STATUS column in the AP_INVOICES_ALL table.
If your workflow design is not not approve invoices less than $ 50,
then the approval status of invoices less than $ 50 would be the value in WFAPPROVAL_STATUS as '' NOT NECESSARY ''.If your design workflow is to approve the Bills above $ 50
then the approval status of the Bills above $ 50 would be the value in WFAPPROVAL_STATUS as 'WFAPPROVED '.Apart from the above, there are several other statuses available for invoice approval such as,.
REQUIRED approval is required for a Bill, but no authorization is launched
INSIDER = approval is required for a Bill, and approval is launched
REJECTED = approval is required for a Bill, and the approver rejects the approval
MANUAL APPROVED approval is required for a Bill, but with approval of Force the invoice has been approvedKind regards
Ivruksha -
How to find a list with all the shortcuts in EBS R12
How everything,.
Someone knows how to find all the shortcuts for R12 as CTRL + F11, F11, F4... etc?
Thanks in advance,
Bahchevanov.Someone knows how to find all the shortcuts for R12 as CTRL + F11, F11, F4... etc?
You can search all of this (help > keyboard help).
Thank you
Hussein
Maybe you are looking for
-
17-x014ur HP: HP 17-x014ur held for second HDD
I want to know, if in my laptop is the place for the second hdd? I can't find a plug about it on the site
-
error 2615 while trying to make a dvd from a video podcast
trying to make a dvd from a video podcast, I tells me unable to complete a task error 2615?
-
Standby hibernation instead of switch mode
I put our machine Windows XP for going mode sleep after 30 minutes. However, it seems to be in hibernation instead. The system will stop, and we need to press the power button to turn it on again. I checked the Hibernate tab, and Hibernate is not sel
-
Windows XP - Download Confirmation window - HELP?
I'm re-identification all my windows 'stuff' (settings/folder options, desktop, etc.) after having to reformat my hard drive, and I find I have forgotten how I did some of them LOL In the browsers I use, I have a download statusbar that I use and in
-
Cannot read dvd OMP. DVD will not auto play and got an error msg stating that the plug-ins have been disabled. How to activate the plug ins? I can't reinstall/repair WPM 11 under Vista. I tried to update without success. I ran sfc / scannow and t