Check which table has no column with the specific name number of tables
HelloInside my diagram I have 66 tables, each column last_update_date. Although all do not have the program_update_date column. The problem is that I want to go through all the tables and tables that don't have the program_update_date column. It should be noted that if the table does not have the column 2 program_update_date query will be used instead of the query 1.
Query1:
----------
Select last_extract_date,
TO_CHAR (min (largest (nvl (*last_update_date*, January 1, 10 '), nvl (*program_update_date*, January 1, 10 '))), "DD-MON-YY HH24:MI:SS") mi.
TO_CHAR (max (greatest (nvl (*last_update_date*, January 1, 10 '), nvl (*program_update_date*, January 1, 10 '))), "DD-MON-YY HH24:MI:SS") my
of table_names
Last_extract_date group
last_extract_date desc order;
query2:
----------
Select last_extract_date,
TO_CHAR (min (NVL(last_update_date,'01-Jan-10')), "DD-MON-YY HH24:MI:SS") mi.
TO_CHAR (Max (NVL(last_update_date,'01-Jan-10')), "DD-MON-YY HH24:MI:SS") my
of mispa_events
Last_extract_date group
last_extract_date desc order;
Please find the PLSQL code that must be used:
Declare
Cursor C_1 is
Single select table_name from user_tables; table_names varchar2 (240); BEGIN C_1 open; Loop Fetch C_1 in table_names; WHEN THE EXIT C_1% NOTFOUND;
EXECUTE IMMEDIATE ('select last_extract_date)
TO_CHAR (min (largest (nvl (last_update_date, "1 January 10"), nvl (program_update_date, "1 January 10"))), "MON-DD-YY HH24:MI:SS") mi.
TO_CHAR (max (greatest (nvl (last_update_date, "1 January 10"), nvl (program_update_date, "1 January 10"))), "MON-DD-YY HH24:MI:SS") my
of ' | table_names | »
Last_extract_date group
order of last_extract_date desc');
End loop;
Close C_1;
COMMIT;
End;
Help, please.
Thanks in advance.
Published by: P.Sam on June 14, 2010 17:00
Try this
SELECT table_name
FROM (SELECT table_name,
SUM (CASE
WHEN column_name = 'PROGRAM_UPDATE_DATE'
THEN 1
ELSE 0
END) cnt
FROM user_tab_columns
GROUP BY table_name)
WHERE cnt > 0
This will give you all the tables that has no ' PROGRAM_UPDATE_DATE in a column
Tags: Database
Similar Questions
-
How to take a column of duplicate names and fill a different column with the same names, excluding duplicates?
I find easier to use this copy separate Automator Service (download Dropbox).
To install in your numbers > Services, double-click menu just the package downloaded .workflow and if necessary give permissions in system preferences > security & privacy.
To use, just:
- Select the cells in the column with duplicate names.
- Choose separate copy in numbers > Services menu.
- Click once in the upper cell where you want the deduplicated values appear.
- Command-v to paste.
SG
-
Columns with the same name but different data or precision length.
DB version: 10 gr 2
In a diagram, I need to find all of the columns with the same name but different or precision data length (if the column is of type number). I know I have to use the USER_TAB_COLS view for this. But I need to find a logic to compare the names of columns and its lengths.something like
select t1.table_name , t1.column_name , t1.data_type , t1.data_length , t2.table_name , t2.column_name , t2.data_type , t2.data_length from user_tab_columns t1 , user_tab_columns t2 where t1.table_name != t2.table_name and t1.column_name = t2.column_name and t1.data_type = t2.data_type and t1.data_length != t2.data_length
... could be a starting point.
-
New virtual machine for the model with the specific name
Hello
I'm trying to add some model VM to VAPP using recomposeVApp (...). And it works well except that I can not change the name of the virtual machine while recomposing. It takes the name of the model. But how to add VMS to model with the specific name? I use the v1.0 API.
This is my code:
ReferenceType vmTemplateRef = new ReferenceType();
vmTemplateRef.setName ("MyNewVM"); This name is ignored. The name of the model is taken!
vmTemplateRef.setHref (vmRef.getHref ()); reference to the model
CompositionItemParamType vmItem = new CompositionItemParamType();
vmItem.setSource (vmTemplateRef);
create the type params VAPP recompose.
RecomposeVAppParamsType recomposeVAppParamsType = new RecomposeVAppParamsType();
recomposeVAppParamsType.setName (vAppRef.getName ()); The name of vApp. It is ok.added the element of the virtual machine.
The newItems < CompositionItemParamType > recomposeVAppParamsType = list
. getItem().
newItems.add (vmItem);Task task = vapp.recomposeVapp (recomposeVAppParamsType);
Thank you
Hello
For after this code fragment:
vmTemplateRef.setName ("MyNewVM"); This name is ignored. The name of the model is taken!
The model name is ignored because vmTemplateRef is the only reference to the object that will be used for the operation of recomposition. If changing the name it will be always ignored.
I think that changing the name of the virtual machine template for recompose cannot be done as follows:
(1) operation recomposeVApp().
(2) get the recomposed VAPP
(3) download the children-> VM you want to change.
(4) change the name of the virtual computer.
I hope this helps!
-
Querying the oracle table that has a column with the name of "FILE".
Hi all
I need to have an oracle table that has the column with the name "FILE".
I can query all columns with the query "select * from table".
But I'm not able to use the query "select the table file.
This table is converted from ms access to oracle and I need to have this column with the name "FILE".
Any suggestions?
Thank you
Abdellaoui
Hello
FILE is a keyword from Oracle, so it's not a good name,
Use FILEDATE, or DATE_FILED, or something else that is not in V$ RESERVED_WORDS. KEYWORD as the name column.
If you need to use the FILE, then you must use quotation marks.
-
How to obtain the list of virtual machines in a cluster with the specific name
Get-Cluster "Group 1" | Get - VM | where {$_.name - eq "owp *"} | Select name
I've tried to filter the virtual machines with a specific name of a cluster by using a single command line but I am not going do anything...?
I get results if I just Get-Cluster "Cluster 1' | Get - VM, but I want excluded other virtual machines to help to be enjoyed.
Use - as instead of-eq
Get-Cluster 'Cluster 1' | Get-VM | where {$_.name -like "owp*"} | select name
-
CF8 cfquery multiple table join with the same names of columns - default
This seems to be a defect in the CF8 cfquery object. I'm at a loss as to a solution or a good work around. With regard to the substance, this query is generated dynamically on the fly based on what is happening in it a user. This isn't the most elegent SQL but work and return all columns. The app itself is a data viewer to look at the logs. Here is an example of a query being generated.
Select *.
of web_trans, web_info_trans, web_res_trans
where (web_info_trans.trans_dte > = '' 2008-12-1)
and web_info_trans.trans_dte < '' 2008-12-2)
and (web_info_trans.trans_dte = web_trans.trans_dte)
and (web_info_trans.trans_num = 5060345)
and (web_info_trans.trans_num = web_trans.trans_num)
and (web_res_trans.trans_num = 5060345)
and (web_res_trans.trans_num = web_trans.trans_num)
and (web_trans.web_trans_cde = "NTUI")
and (web_trans.web_status_cde = 'P')
and (web_trans. TRANS_NUM < 5060347)
order of web_trans. TRANS_NUM / / desc
These three tables contain a similar column called ZIP_CDE. They contain different values, and when this query is executed in Microsoft Query Analyzer results are displayed correctly. Run this same query SQL with CFQUERY and the value of one of the other tables (web_trans) will eventually replace the value for the other columns called ZIP_CDE. The exact amount columns are retruned only values some how get corrupted.
This is a defect of cf8 is a book autour or an update that resolves this problem that I may have missed?
Thank you for the ideas.
Thus it seems still as a default since CF is essentially where, except for the return value play. Other query tools return results correctly so for me, it turns out be CF bug at a certain level.
Actually I'm swinging to agree with you here, but not for the same reason. CF actually * is * get all the columns back (as you say), it just doesn't expose a way to tell the difference between a column called 'x' and an another column called 'x', because the way to access the data in columns is simple queryname [columnName] [rowNumber] (or a Variant fo this, but all the amount of variations to that or abbrev. it). This code shows how he has all four columns of the original two queries (being a stand-in for tables, in this case):
Q1 = queryNew("");
Q2 = queryNew("");
queryAddColumn (q1, 'id', [1,2,3,4]);
queryAddColumn (q1, "data", ["one", "two", "three", "four"]);
queryAddColumn (q2, 'id', [1,2,3,4]);
queryAddColumn (q2, "data", ["tahi", "rua", "toru", "wha"]); It's Maori, in case you are interested
SELECT *.
Q1, q2
WHERE q1.id = q2.id
So CF knows there are four columns (a call getMetadata (q3) get also demonstrates this), but it does not expose a way to approach the second (or even greater) column of the same name. This is the bug/shortfall.
However, relying on an underlying coldfusion.sql.QueryTable method, you can rename the columns, so:
Then you're OK.
I would be normally reluctant to recommend doing this, because these methods change from version to version of CF, but it's your call whether this approach will help you.
To be honest, I'm with Owain who, even in SQL one generally doesn't work with columns with the same name, an alias them qualified with a table name/alias. As the table columns from of is not returned by SQL with the result set, it must be evidence against this by folding the columns in the first place.
Also, I wonder at the bottom of the extraction of data, you don't really know the structure, that is to say, do SELECT *. How can you know not even that is ours as the first column, second column, etc.? I don't think that SQL applies in fact a contract that, t - it? (I don't know).
What are you actually do here?
--
Adam
-
XOQ-01950: Cube contains several BuildSpecifications with the same name.
Hi all
When executing the option to maintain Cube he throws under question: any clue?
XOQ-01950: the AWCubeOrganization for cube 'NN_OLAP_POC. MARKET_SALES_CUBE"contains several BuildSpecifications with the same name.
Thank you
ExqThis error should show only upward when you create a cube (by importing XML), not when you maintain. So, I'll assume that's what you hear.
If you are importing XML that references an OLAP object that already exists, whereas the new definition replaces the old. The only exception to this rule is the BuildSpecification object. This kind of object is called, but it does not follow these conventions (for reasons of disorder of implementation). If you import the XML code that has a BuildSpecificaiton with the same name as one that already exists, then you will trigger the error you see. Here is a relevant example of XML.
The solution is to remove this section from the XML before importing it.
-
I have a pdf form that has 4 columns, with each column having 28 check boxes and text between. I did so he goes by column, but when I do anything for a checkbox it takes it out of line. How can I keep that from happening?
You talk about the tab order? If Yes, go to Edit - Preferences - forms and make sure the box "Automatically adjust tab order when changing fields" is NOT checked.
-
Check that this class has been marked with the annotation @Entity
Hello
We have a level of the shared lib App that makes all the APP associated with request for an application. And each application can use the lib goes to get the related JPA query to do.
To define the scope of the Joint Parliamentary Assembly between App. We have created the EMF for each application.
When an application to run and any associated APP action that it works fine, but when trying to run a second application we are seeing the following error message when you try to do a specific action JPA.
the @Entity annotation.
[2012 05-23 T 04: 08:16.839 - 07:00] [WC_Spaces] [ERROR] [] [oracle.webcenter.spaces] [tid: [ASSETS].] [ExecuteThread: '3' for the queue: "(self-adjusting) weblogic.kernel.Default"] [ecid: 5825b814-2931-4ad5-8dc3-3e18f66992b7-00000004,0] [APP: webcenterCustom] []
java.lang.IllegalArgumentException: unknown entity bean class: oracle.webcenter.spaces.internal.repository.WcSpaceHeader class, please check that this class has been marked with the @Entity annotation.
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:648)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:532)
at oracle.webcenter.spaces.internal.repository.SpaceRepositoryUtils.refreshSpaceRows(SpaceRepositoryUtils.java:1791)
Where WcSpaceHeader is an entity.
To create emf by App, this is the code
private static EntityManagerFactory getEntityManagerFactory()
{
String appName = Utility.getApplicationName ();
EntityManagerFactory emf = sEntityMgrFactory.get (appName);
if(EMF==null)
{
EMF = Persistence.createEntityManagerFactory ("SpacesReposPUnit");
sEntityMgrFactory.put (appName, emf);
SpacesConstants.LOGGER.info ("Caching" +)
("EMF for" + appName);
}
return of the emf;
}
My persistence.xml
<? XML version = "1.0" encoding = "US-ASCII"? >
< persistence xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance".
xsi: schemaLocation = "http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd".
version = "1.0" xmlns = "http://java.sun.com/xml/ns/persistence" >
< name of persistence - unit = "SpacesReposPUnit" transaction-type = "RESOURCE_LOCAL" >
<>provider
org.eclipse.persistence.jpa.PersistenceProvider
< / provider >
oracle.webcenter.spaces.internal.repository.WcSpaceHeader < class > < / class >
oracle.webcenter.spaces.internal.repository.WcSpaceUsrDetail < class > < / class >
oracle.webcenter.framework.service.jpa.WcCommonXlationEntity < class > < / class >
oracle.webcenter.spaces.internal.repository.WCNavigationActivity < class > < / class >
Properties of <>
< name = "eclipselink.session.customizer property"
value="Oracle.WebCenter.spaces.internal.repository.SpacesEclipselinkSessionCustomizer"/ >
< / properties >
< / persistence - unit >
< / persistence >
Another problem I see in this is that. When I create an EMF EM, (which is different for different app) and do a query, I get a class cast Exception.
[(self-adjusting)'] [ecid: 5825b814-2931-4ad5-8dc3-3e18f66992b7-00000004,0] [APP: webcenterCustom] []
java.lang.IllegalArgumentException: unknown entity bean class: oracle.webcenter.spaces.internal.repository.WcSpaceHeader class, please check that this class has been marked with the @Entity annotation.
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:648)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:532)It is a problem of class loader, somehow you have deployed the same classes in two places, have two versions of the classes.
How, exactly made things, where are your domain classes?
The questions is more likely that,
Persistence.createEntityManagerFactory ("SpacesReposPUnit");
always returns the same plant once it has been deployed.If you pass a map properties for createEntityManagerFactory and set the property "name eclipselink.session" a single value, then you should get a new plant.
-
[8i &; 10g XE] How to compare a column with the text of a column with numbers
This is probably a simple question, but I can't seem to find the answer. I tried variations on use to_number to_char and interpreters, all nothing will do.
The real problem is that I have a table with a column of numbers in a database 8i (datatype = NUMBER (3)) and a column with the text (datatype = CHAR (3)), and I need to compare two values.
This table has thousands of lines, but here's an example of the data in these two columns:
What I want to do is select the lines where the TXT and CHR VALUES do not match, then it would be (given my example):TXT CHR ----------- 001 1 001 2 002 2 XXX 1 003 3
But, I'm having difficulties in comparing two columns, because they are not the same type of data.TXT CHR ----------- 001 2 XXX 1
I tried to work on a simplified version of the problem in the 8i database both my 10g XE database:
But this also returns any line, and it isn't even the "XXX" in the text column to treat in this example.SELECT * FROM ( SELECT 1.000 AS nbr , TO_CHAR(1.000,'000') AS txt , CAST('001' AS CHAR(3)) AS chr FROM dual ) WHERE txt = chr ;
Can someone help me understand what it is that I'm missing?
Thank you!Hello
user11033437 wrote:
This is probably a simple question...Simple if you know the secret; maddening if you do not have.
... I tried to work on a simplified version of the problem in the 8i database both my 10g XE database:
SELECT * FROM ( SELECT 1.000 AS nbr , TO_CHAR(1.000,'000') AS txt , CAST('001' AS CHAR(3)) AS chr FROM dual ) WHERE txt = chr ;
Try:
TO_CHAR (1.000, 'FM000')
By default, TO_CHAR leaves place the beginning of the string to a sign less, in which case he should ever one, TO_CHAR (1,000, '000') returns makes 4 characters, not 3. "FM" in the format said TO_CHAR do not add a space.
If it does not, after the release of DUMP (txt) for the few lines that you can't match, so that we can see exactly what is in them.
-
Hello
I have MsSql running in the cluster environment and recently face the problem when there is a security agent installed in MsSql server, which the agent does nothing but only to capture the local database activity. The error led is as below:ID from step 1
Server NIBKSQLCLUST
Job name LSBackup_DRIB
Newspaper log shipping backup job step name.
Time 00:00:02
SQL severity 0
SQL Message ID 0
Operator by e-mail
Operator Net sent
Operator paged
Retries attempted 0
Message
2011-03-21 08:00:02.62 * error: could not retrieve parameters of backup for primary ID '26f46141-a676-41b2-8653-11f1b13de43a '. (Microsoft.SqlServer.Management.LogShipping) *.
2011-03-21 08:00:02.63 * error: could not connect to the server NIBKSQLCLUST. (Microsoft.SqlServer.ConnectionInfo) *.
2011-03-21 08:00:02.63 * error: a connection has been established with the server, but then an error occurred during the connection process. (provider: Named Pipes Provider, error: 0 - no process is on the other end of the pipe.) (.Net SqlClient data provider) *.
2011-03-21 08:00:02.63 - END OF THE TRANSACTION LOG BACKUP-
The process to run correctly when I turned off the security officer. Advice kindly the cause of this problem and is where all configurations should be set / changed in MsSql server.
Thank you
Boonlep coulibaly
Hello
I suggest you to send your request from the link and check.
-
An update on an index column with the same value generates an index to the top
An update on an index column with the same value generates an update of the index?
Thank youIn addition to my previous answer, see also
http://orainternals.WordPress.com/2010/11/04/does-an-update-statement-modify-the-row-if-the-update-modifies-the-column-to-same-value/
Riyaj Shamsudeen has this to say:
"+ We have an index on this column v1 and we update this column indexed too." Oracle was updating the indexed column? N ° if the values match the level of the indexed column, then the code of RDBMS isn't up-to-date index, a feature for optimization again. Only the row of table is updated, and the index is not updated. + "Hemant K Collette
-
I'm trying to figure if someone has my problem with the haptic on Macbook 12 "2016 function. The option is checked in the preferences system, but it does not work.
Thank you
Hello luigi10m,
Thanks for posting on the Community Support from Apple. From your post, it looks like your haptic feedback does not work when you click using your trackpad and the setting is enabled. I know that this is a great feature and it is important to make it work. I'll be happy to help you.
First of all, I would like to assure you that in system preferences > Trackpad > clicking silencer is not checked, that might help. In addition, it would be useful to reset the settings of the SCM. You can find instructions here: reset the management system (SCM) controller on your Mac - Apple Support
I'll also include those for you here:
- Stop the Mac.
- Plug the MagSafe or USB - C adapter to a power source and to your Mac.
- Use the built-in keyboard, press shift-control-Option on the left side of the keyboard, then press the power button at the same time.
- All the keys to unlock, then press the power button to turn on your Mac
Take care!
-
How can I play multiple instances of video (no problem reading of 12 movies at the same time, at the opening of the 13th film the problem only starts), the classic use of media player in windows XP? I was able to do all the time! It has to do with the codec?
If yes what codec plays multiple instances of Media Player Classic in windows XP?
I get the same problem with VLC all that needs to be checked on preferences is checked in the two VLC & MPC!Hello
Multiple instances of Media Player is not supported in version 7 and greater.
· What version of Windows Media Player you have installed?
· Are instances that you are referring to the bodies shipped?
· You use any third-party software to run multiple instances?
Maybe you are looking for
-
My open tabs will open once I installed 10?
The tabs I have open (my current version is version 9.0.1) will remain open after that I installed version 10?
-
How I have two tabs open at the same time
I want to work on both windows at the same time, in order to drag a symbol from one to the other
-
Is it possible to merge videos?
Is it possible to merge short videos that I took with my iPhone 5 to make a video?
-
From last week a boring music, talk radio and the news began to play in the background of my computer is a virus or a part of an update and how do I get rid of him?
-
Opening files from the desktop causes to try to be open with WorkPerfect instead of Word
When I try to open a document in the office, I receive a message indicating that it tries to open it with WordPerfect instead of the word. Why this happens when I want, he opened with Word.