How to check if a table contains a table
I have an array array1 say array that contains several tables. I have another table say array2. Now, I want to check whether or not arrray1 contains array2. How can I check this?
The way hard and obvious, but as strcmp(), you can move to the table following once you are unable to find a match.
Tags: iOS Developer
Similar Questions
-
How to check if a table exists in the database or not?
People,
Hello. I use the server of Oracle 11 GR 1 material with Oracle Linux 5 database.
My instance of database is named HRCS90, which the user access Id is MyName, and his identification of user SYS system.
I have a few questions about user ID to access the PSRECDEL and PSROLEDEFN table in the HRCS90 database as below:
SQL > select * from PSRECDEL;
His output under the SYS user: table or view does not exist.
His output under user myName: no selected lines. This means that the table THAT PSRECDEL exists, and myName user can access.
SQL > select * from PSROLEDEFN;
His output under SYS and MyName: table or view does not exist.
My questions are:
How to check if a table really exists in the instance of database HRCS90 or not?
Thanks in advance.
If a table is present in the database, it must be present in DBA_OBJECTS. If he fell, he would be present in the TRASH. If he fell purged, it is not available in the database, Cant it confirm you this object is not in the database? See a little test here
SQL > CREATE TABLE TESTTAB (ID);
Table created.
SQL >
SQL > SELECT MASTER, OBJECT_NAME FROM DBA_OBJECTS WHERE OBJECT_NAME = 'TESTTAB.
OBJECT_NAME OWNER
------------------------------ ---------------------------------------------
SCOTT TESTTAB
SQL >
-Drop table (without purging. So now, it will be in the recyclebin)
SQL > DROP TABLE TESTTAB;
Deleted table.
SQL >
SQL > SELECT * FROM DBA_RECYCLEBIN WHERE ORIGINAL_NAME = "TESTTAB;
OBJECT_NAME ORIGINAL_NAME OWNER
------------------------------ ------------------------------ --------------
SCOTT BIN$ 8LKloIv3SYWA0WJ33GS + Aw == $0 TESTTAB
Now see this case when you use PURGE. If it won't move the table to the trash. First of all I am clear the existing dba_recyclebin to the user entries. Then I'm falling table using purge.
SQL > PURGE TABLESPACE USERS USER SCOTT.
Purged tablespace.
SQL >
SQL > SELECT * FROM DBA_RECYCLEBIN WHERE ORIGINAL_NAME = "TESTTAB;
no selected line
SQL > CREATE TABLE TESTTAB (ID);
Table created.
SQL >
SQL > SELECT MASTER, OBJECT_NAME FROM DBA_OBJECTS WHERE OBJECT_NAME = 'TESTTAB;
OBJECT_NAME OWNER
------ ----------
SYS TESTTAB
SQL > DROP TABLE TESTTAB PURGE;
Deleted table.
SQL > SELECT * FROM DBA_RECYCLEBIN WHERE ORIGINAL_NAME = "TESTTAB;
no selected line
SQL > SELECT MASTER, OBJECT_NAME FROM DBA_OBJECTS WHERE OBJECT_NAME = 'TESTTAB;
no selected line
Since there is no entry to both DBA_OBJECTS and DBA_RECYCLEBIN. So that means that the particular object is not in the database.
-
How to check if a table of the corruption in a schema
Hi team,
Is there a way I can check if a table is corrupted in a schema?
DB version: 10.2.0.4
OS: AIX 5.3user13364377 wrote:
Hi team,Is there a way I can check if a table is corrupted in a schema?
DB version: 10.2.0.4
OS: AIX 5.3If you are looking for this: this will help you find corruption in DB
My database is corrupted and will be following crashes in mode $ v as,.
select * from v$database_block_corruption; FILE# BLOCK# BLOCKS CORRUPTION_CHANGE# CORRUPTIO --------------- --------------- --------------- ------------------ --------- 6 10 1 8183236781662 LOGICAL 6 42 1 0 FRACTURED 6 34 2 0 CHECKSUM 6 50 1 8183236781952 LOGICAL 6 26 4 0 FRACTURED
View v$ database_block_corruption will be filled if oracle finds corruption. And to check the longer existence of corruption, you can use RMAN
RMAN> backup validate check logical database; OR RMAN> run { allocate channel d1 type disk; allocate channel d2 type disk; allocate channel d3 type disk; allocate channel d4 type disk; backup validate check logical database; }
This refill this view...
Once you have identified the block, you can find segments that are really affected.
Please see following MOS
How to identify all the objects in the database corrupt reported with RMAN [472231.1 ID] -
How to check where the table field has been used as a foreign key in the database
Hi I have a field in my table Office I had office_code field, this field has been used in the tables of diffirent as foreign key is a sql I can wirte to see all the tables that have used this field as a foreign key
Edited by: adf009 09/05/2013 10:37
Edited by: adf009 09/05/2013 10:38Check this box
SELECT * FROM user_constraints WHERE table_name='EMP' and CONSTRAINT_TYPE='R';
Type = 'R' means referential integrity constraint type.
-
How to check if a list contains elements of another list
Hi all
I'm just checking if a text list contains items form another list and do something. I tried:
Tlist contains phrases of the text (for example, test1, test2, test3)
phrases = ["test1", "test2"]
n = phrases.count)
tList.getPos (phrases.item [n])
Alert ("should not be included in the list")
But it does not all ideas, why?There might be a quicker way, but I think you need to loop through at least one of your lists. Maybe something like this:
-
It's my code, but it does not work:
{module_webapps id = "28860" filter = 'all' resultsPerPage = '20' hideEmptyMessage = 'false' template = "" collection = "seeWinners" "}
{% for article on seeWinners.items-%}
{% If items.seeWinners ==""-%}
< p > winning number yet, come back again < /p >
{endif %}
{% endfor}
Please can someone tell me what is the problem?
Thank you.
No need for the loop.
Just get the length of the array.
{module_webapps id = "28860" filter = 'all' resultsPerPage = '20' hideEmptyMessage = 'false' template = "" collection = "seeWinners" "}
{% If seeWinners.items | size == 0-%}
No winners yet, check again
{endif %}
Later edit: and if you are already in the loop, you have the length of the array loop with: {{forloop.length}}
-
How to check if a block contains all records in it?
Hello
I need to check if there are any records in a block. According to the test result, I then do something else as a result. Is there a system variable or the construction-ins that I use to check this status? I want to do something like:
IF the block is empty then
do action1
ON THE OTHER
do action2
END IF;
Any help or suggestions eraf appreciated.
MichaelYou can use a calculated for this item:
Create an IT_COUNT element in a BL_CONTROL control block, set 'calculation mode' to 'Summary' and choose the block to check that 'down the block"and a non-NULL-article in the block as"Summary"as a formula of calcution choose 'Count '.Now you can use in your code,
IF :BL_CONTROL.IT_COUNT>0 THEN ..
-
Syntax to check whether an item contains a particular value
Hello
In my rtf model, I'm changing the background color according to the value of a security of people. I am unable to verify the exact values, but all of the titles are the same, but contain the same value in the full title (e.g. Secretary main vs vs Support Secretary Executive Secretary). So instead of checking where TITLE = 'Secretary', I need to know how to check where the TITLE contains "Secretary". I don't understand the syntax.
Any help would be appreciated!
TOne way is to test instring Secretary.
InStr('abcabcabc','a',2)
The instr function returns the location of a substring in a string. The syntax of the instr function is:InStr (string1, string2, [start_position], [nth_appearance])
string1 is the string to search for.
string2 is the substring to search for in string1.
start_position is the position in string1 where the search will begin. The first position in the string is 1. If the start_position is negative, the function account back start_position number of characters from the end of string1, then research toward the start of string1.
nth appearance is the appearance of Nth of string2.
-
How to check the slider back row contains data or not
Hi all
How to check whether or not the cursor returned row contains data in one of its field.
Thank you and best regards,
Prakash PUse ROWCOUNT %
Use% NOTFOUND example of
DECLARE id number; desc varchar2(10); CURSOR cursor_one IS SELECT id, desc FROM table; BEGIN OPEN cursor_one; LOOP FETCH cursor_one INTO id, desc; EXIT WHEN cursor_one%ROWCOUNT > 20 OR cursor_one%NOTFOUND; ... END LOOP; CLOSE cursor_one; END;
-
How to check the value of the space of the tablespaces and tables when errors occur?
Hi Experts,
For example, lets say we get ORA-01653: unable to extend table of error. How to check the size of the table and a tablespace? And how understanding is full?
Thanks for your help
Hello
Select df.tablespace_name "Tablespace"
totalusedspace 'Used MB',
(df.totalspace - tu.totalusedspace) "MB free.
DF. TotalSpace 'Total MB. "
round (100 * ((df.totalspace-tu.totalusedspace) / df.totalspace))
"PCT free."
Of
(select nom_tablespace,
Round (Sum (bytes) / 1048576) TotalSpace
from dba_data_files
Group by tablespace_name) df,.
(select round (sum (bytes) /(1024*1024)) totalusedspace, nom_tablespace)
from dba_segments
you group by tablespace_name)
where df.tablespace_name = tu.tablespace_name
and df.tablespace_name = "
"; For example, lets say we get ORA-01653: unable to extend table of error. How to check the size of the table and a tablespace? And how understanding is full?
Is to say clearly to the question (you can let us know what you have understood so we can fix)
[oracle@machine1 ~] $01653 oerr ora
01653, 00000, "impossible to extend %s.%s table by %s in %s tablespace»
* Cause: Failed to allocate a certain measure the required number of blocks for
a segment of the table in the specified tablespace.
* Action: Use ALTER TABLESPACE ADD DATAFILE statement to add one or more
storage of files indicate.
-Thank you
Pavan Kumar N
-
How to check that the variable 'does not contain' value?
Hello
I use CP 7.0.1.237.
We want to use the widget text box for a custom quiz and verify a response. While we understood how to check the existence of certain key words, we are not able to find a way to check that the content does NOT contain certain keywords. For example, we want to ensure that the text entered in this widget does not contain a "Transformation" and "Non-compliant.
Is this possible at all?
Thank you
Anthony
Anthony, it works perfectly. Created this conditional action with 4 decisions. I used the interaction of training text scrolling in CP8 (because now you can control the variable - which means I might have a Reset button):
First decision:
Second decision (the third is similar to the following)
Fourth and final decision
I put the variable words (v_first... v_fifth), it's a reflex I use since I shared actions that much. The variable associated to the ETB (you can now reset an empty var in CP8) is v_TextArea and the Boolean value that will decide if positive feedback (StarOK) should be shown is v_TA_OK. If you want to display a negative feedback, put this in the ELSE part of the final decision.
FYI: it took 15 minutes, including the creation of assets and the variables and tests. Personally I would have needed more time to do it in JS, but that's just me.
Lieve
-
How to check, all pdPage contains 3DAnnot or not?
We have only pdPage object and how to check, this page contains a 3DAnnot or not?
And how to remove Page annot?
PDPageCountAnnots().
PDPageGetAnnots()
PDAnnotGetType()
PDPageRemoveAnnot()
-
How to check the index, on the number of columns in the table is created
How to check on the number of columns in the table the index has been created. ??
OR
How check index, on the number of columns in the table that it is been created?890306 wrote:
How to check on the number of columns in the table the index has been created. ??>
OR
How check index, on the number of columns in the table that it is been created?
query USER_IND_COLUMNS
SQL> desc user_ind_columns Name Null? Type ----------------------------------------- -------- ---------------------------- INDEX_NAME VARCHAR2(30) TABLE_NAME VARCHAR2(30) COLUMN_NAME VARCHAR2(4000) COLUMN_POSITION NUMBER COLUMN_LENGTH NUMBER CHAR_LENGTH NUMBER DESCEND VARCHAR2(4)
Handle: 890306
Status level: Beginner
Join date: October 8, 2011
Messages total: 13
Total Questions: 5 (5 open)Why all the question still pending?
Published by: sb92075 on December 3, 2011 17:21
-
How to check the status of the statistics on a table?
Hello
I started the statistics collection on a few large tables in my database.
How to check the status of statistics about a table? Are there views of data dictionary or tables to monitor the progress of the collection of statistics.
Regds,
MalikaHi all
You can check with this little script.
It lists details of sid for long as running session
When he started
What last update
How long still to the left
"ACTIVE/INACTIVE" session state etc.---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-Author: James Syed_
-Script_name: sid_long_ops.sql
-Description: list details of sid for long running the session as when it began when the last update how long still to the left.fixed lines 200
Neck LESS to a25Select
a.SID,
a.Serial #.
b.Status,
a.opname,
TO_CHAR (a.START_TIME,' DD-me-AAAA HH24:mi:ss) START_TIME,
TO_CHAR (a.LAST_UPDATE_TIME,' DD-me-AAAA HH24:mi:ss) LAST_UPDATE_TIME,.
a.time_remaining as 'time remaining dry. "
a.time_remaining/60 as "Min remaining time."
a.time_remaining/60/60 as 'remaining time in HR.
V $ session_longops a, v$ session b
where = select a.sid
a.sid = & sid
And time_remaining > 0;----------------------------------------------------------------------------------------------------------------------------------------------------------------
The sample output:
--------------------SQL > @sid_long_ops
Enter the SID value: 474
13 old: a.sid = & sid
13 News: and a.sid = 474SID, SERIAL # STATUS START_TIME LAST_UPDATE_TIME remaining time LESS dry time remaining minutes remaining HR time
--------------------------------
474 2033 ACTIVE collection schema statistics June 6, 2012 20:10:49 June 7, 2012 01:35:24 572 9.53333333.158888889Thank you & best regards
Syed James.
Oracle Apps DBA
Mobile: + 91 9966270072
E-mail: [email protected] -
How to check the table have are all views in oracle
Hello
How to check the table have are all views in oracleSELECT * FROM user_dependencies WHERE type='VIEW' AND referenced_type='TABLE' AND referenced_name ='Your_Table_Name'
You can use dba_dependencies to find views in the different schema.
Maybe you are looking for
-
Windows medial 11 in Win XP will not play the .dvr-ms files
I can't get the .dvr-ms files to play in Win Media 11, Win XP.Thank you
-
Tried to uninstall the program "best offers" via Control Panel, add or remove programs. I selected the program, click Change/Remove, and a dialog box appears which redirects me to thebestoffers.com/uninstall. The best I can do is get an uninstall p
-
The security certificate presented by this website was not issued by a trusted certificate the certificate presented by this website was issued for different address websits. I am applying to the website https://chart.donhr.navymil/main.aspx I tried
-
As you no doubt painfully, so Facebook WhatsApp essentially abandoned their BB10 applications. WhatsApp is very popular in the Netherlands, and without him, my phone is essentially useless. Would it not possible to install Android applications? If BB
-
Allowing the search indexing functionality in Windows 7
Hi, I'm not all that good on computers, trying to speed up my computer windows 7, pinned http://www.computingunleashed.com/speed-up-windows-7-ultimate-guide-to.html and follow his advice to improve the performance on my computer. I have disabled the