PLEASE SEND ME SQL query to list ALL CONSTRAINTS ON EMPLOYEES TABLE FROM OU
PLEASE SEND ME SQL query to list ALL CONSTRAINTS ON EMPLOYEES TABLE FROM OUTSIDE PP SCHEMA INCLUDING SCHEMA NAME AND CONSTraint NAME
Username : PP
Table : Employees
I think you are looking for below query :
SQL> SHOW USER;
USER is "SCOTT"
SQL> select owner,constraint_name,constraint_type,table_name,r_owner,r_constraint_name
2 from all_constraints
3 where constraint_type='R'
4 and r_constraint_name in (select constraint_name from all_constraints
5 where constraint_type in ('P','U') and table_name='EMP');
OWNER CONSTRAINT_NAME C TABLE_NAME R_OWNER R_CONSTRAINT_NAME
TEST1 ERL_EMP_FK_1 R EMPLOYEE SCOTT PK_EMP
1 row selected.Means, TEST1 user is having a constraint ERL_EMP_FK_1 on his table EMPLOYEE. Which is using PK_EMP (primary key of SCOTT user's 'EMP' [in the query])
Regards
Girish Sharma
Similar Messages
-
Hi guys, I have the below query which lists all the collections and their members, however I need to expand it to also include the OS, Service Pack, IP and if it's a physical or virtual machine.
I've tried a few things but only made it worse. Is anyone able to expand the below code to include those extras??
SELECT
v_FullCollectionMembership.CollectionID AS 'CollID',
v_Collection.Name AS 'CollName',
v_FullCollectionMembership.Name AS 'SystemName'
FROM
v_FullCollectionMembership, v_Collection
WHERE v_FullCollectionMembership.CollectionID = v_Collection.CollectionID
ORDER BY
CollID ASC, SystemName ASCHi,
These requirements could be found in several threads or blogs. We need convert WQL to SQL, and you can involve SQL guys to integrate the statements and format the result.
How to create a all virtual machines collection.
SCCM SQL Query - IP Address
ConfigMgr Systems without Current Service Packs, and System Patch Status -
SQL query problem, listing all deliveries linked to an invoice
Hi I'm trying to write a query that returns all the deliveries linked to an invoice as a single commaseparated result.
This query gets all the links from every line as a commaseparated result but I want to remove the duplicate entries, eg. where/how do I insert the distinct clause?
DECLARE @EmployeeList varchar(350)
SELECT @EmployeeList = COALESCE(@EmployeeList + ', ', '') +
( T1.baseref )
FROM oinv T0 inner join inv1 T1 on T0.DocEntry = T1.DocEntry
where T0.docnum = 119229 and T1.baseref <> ''
SELECT @EmployeeList
Thanks in advance for all helpHi,
How did you use the temporary table?
Can you write your code here.
I am also getting repeated data values in my query output. I want to save that query output into one temporary table and than want to use the SELECT DISTINCT on that temporary table. I am searching on forum madely to do that but can't find the perfect help. It will be nice if you can help me in that.
Thank you -
Looking for a SQL query to get all the possible Alert Messages from the Rules in a Management Pack
For reporting, I'm looking to get a SQL query of all the possible Alert Messages for Rules configured in a Management Pack (not necessarily the ones that have thrown alerts). I can do this for Monitors, but not for Rules.
The configured alert messages for the Management Pack Monitors
go like this: ManagementPack > MonitorView> RuleModule > RuleModule.Alert Message > Localized Text
The configured alert messages for the Management Pack Rules
should go something like this, but there is a missing link: ManagementPack > RuleView > RuleModule > ? Missing Link ? > Localized Text
The Rules are tied to the Module, but I don't see a connection from the RulesModule to the Alert Message that I see in the LocalizedText. The Rule names do not always equal the Alert name.
Can someone provide the missing link?Hi,
please try below powershell code to find the corresponding management pack for specific alert:
$Alert = get-scomalert | where {$_.Name -like 'Agent Proxy Not Enabled*'} | select -first 1
If ($alert.IsMonitorAlert -eq "True") {
write-host "Ths is a monitor-generated alert"
get-scommonitor -ID $Alert.MonitoringRuleID | select Enabled, DisplayName, ManagementPack
else
write-host "This is a rule-generated alert"
get-scomrule -ID $Alert.MonitoringRuleID | select Enabled, DisplayName, ManagementPack
In addition, please also refer to the below link:
http://blogs.technet.com/b/mazenahmed/archive/2011/12/02/using-powershell-to-map-opsmgr-active-alert-to-its-corresponding-rule-monitor-and-management-pack-name.aspx
Regards,
Yan Li
Regards, Yan Li -
Sql query to list menus, submenus and function-names for all resp
Hi,
Please let me know one single sql query to list all the menus, submenus and user-function-names attached for all responsibilities
Thanks...Hi,
See the following threads.
How to find All The Responsibilities with a specific Menu
How to find All The Responsibilities with a specific Menu
SQL query
SQL query
Regards,
Hussein -
Reg: sql query that prints all sundays in the year
Hi all,
Please give me sql query that prints all sundays in year. And when ever we execute that query then that will prints the sysdate(that is execution date).
Thanks in Advance,
-prasad.
Edited by: prasad_orcl on Jun 5, 2009 9:13 PMHi,
Plz try this and let me know this works or not...
SELECT DATE DATES,TO_CHAR(DATE,'DAY') DAYS FROM FISCAL_CALENDAR
WHERE DATE_YEAR = 2009 AND
DATE BETWEEN TRUNC(SYSDATE,'YEAR') AND
ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),12) -1 AND
TRIM(TO_CHAR(DATE,'DAY')) = 'SUNDAY'
ORDER BY DATE
OUTPUT:
DATES DAYS
1/4/2009 SUNDAY
1/11/2009 SUNDAY
1/18/2009 SUNDAY
1/25/2009 SUNDAY
2/1/2009 SUNDAY
2/8/2009 SUNDAY
2/15/2009 SUNDAY
2/22/2009 SUNDAY
3/1/2009 SUNDAY
3/8/2009 SUNDAY
3/15/2009 SUNDAY
3/22/2009 SUNDAY
3/29/2009 SUNDAY
4/5/2009 SUNDAY
4/12/2009 SUNDAY
4/19/2009 SUNDAY
4/26/2009 SUNDAY
5/3/2009 SUNDAY
5/10/2009 SUNDAY
5/17/2009 SUNDAY
5/24/2009 SUNDAY
5/31/2009 SUNDAY
6/7/2009 SUNDAY
6/14/2009 SUNDAY
6/21/2009 SUNDAY
6/28/2009 SUNDAY
7/5/2009 SUNDAY
7/12/2009 SUNDAY
7/19/2009 SUNDAY
7/26/2009 SUNDAY
8/2/2009 SUNDAY
8/9/2009 SUNDAY
8/16/2009 SUNDAY
8/23/2009 SUNDAY
8/30/2009 SUNDAY
9/6/2009 SUNDAY
9/13/2009 SUNDAY
9/20/2009 SUNDAY
9/27/2009 SUNDAY
10/4/2009 SUNDAY
10/11/2009SUNDAY
10/18/2009SUNDAY
10/25/2009SUNDAY
11/1/2009 SUNDAY
11/8/2009 SUNDAY
11/15/2009SUNDAY
11/22/2009SUNDAY
11/29/2009SUNDAY
12/6/2009 SUNDAY
12/13/2009SUNDAY
12/20/2009SUNDAY
12/27/2009SUNDAY
Regards
Thiyag -
SQL query to list the "Administrative category" field for all applications
yesterday i started a thread to list the "Optional reference" field for all cm applications in a SSRS report. I've got the query with the help of Torsten.
https://social.technet.microsoft.com/Forums/en-US/00419e6e-e3c2-4b80-b6af-2a24ced1032d/sql-query-to-list-the-optional-reference-field-of-all-packages-in-cm-2012?forum=configmanagersdk
But again today, i'm looking for a way to get "Administrative category" field in a SSRS report. Could someone point me to the right direction ?
Kindly mark as answer/Vote as helpful if a reply from anybody helped you in this forum. DelphinHi,
You could monitor the SMSProv.log when you check the category of an application. It shows that SQL query the SCCM provider used is related to function fn_ListCategoryInstances.
Best Regards,
Joyce -
Need a query to list all table names
I have more than 500 tables in my database.
'insert_date' & 'update_date' columns are found in more than 100 tables with data type as date.
I need a query to list all table names and 'insert_date' , 'update_date' column's content.
Please Help
Lee1212
Message was edited by:
LEE1212I have more than 500 tables in my database.
'insert_date' & update_date column is found in more
than 100 tables with data type as date.
I need a query to list all table names and
'insert_date' column's content.What do you mean by "column's content". A table can have many rows. Do you want to display all the distinct value for these columns?
Below is the query to get the tables which has columns insert_Date and update_date
select table_name
from user_tab_columns
where column_name ='INSERT_DATE'
or column_name ='UPDATE_DATE'
/You can write a PL/SQL block to retrive the distinct values of INSERT_DATE for these tables
declare
TYPE ref_cur IS REF CURSOR;
insert_date_cur ref_cur;
lv_insert_date DATE;
cursor tables_list IS
select table_name
from user_tab_columns
where column_name ='INSERT_DATE';
begin
for cur_tables in tables_list
loop
OPEN insert_date_cur for 'SELECT DISTINCT insert_date from '||cur_tables.table_name;
DBMS_OUTPUT.PUT_LINE(cur_tables.table_name);
DBMS_OUTPUT.PUT_LINE('--------------------------------');
LOOP
FETCH insert_date_cur into lv_insert_date;
EXIT WHEN insert_date_cur%NOTFOUND;
DBMS_OUTPUT.PUT_LINE(lv_insert_date);
END LOOP;
CLOSE insert_date_cur;
end loop;
end;I haven't tested this code. There might be some errors. Just posted something to start with for you. -
SQl query to remove all dbms_output statement
Hi
Can u please tell me Single SQl query to remove all dbms_output statement from package and procedure
Umesh>
Can u please tell me Single SQl query to remove all
dbms_output statement from package and procedure
If you are comfortable with scripting languages like Perl, Python, Ruby etc., then removing lines having the dbms_output statements from your files should be a trivial matter.
pratz -
SQL Query to list details by Age
Hi All,
I have a Tenant table and want the query to list all tenants in Age bracket between age 14 and 24. But since we have the mobile no of the main tenant we also want to show their record as well. In certain cases the main tenant can also
be in the age group 14 -24 and should include these tenants as well.
Below is how the view should look like. I have uploaded sample data here:
https://app.box.com/s/ky3ry6x5zk587j7nvuk76dg0ezmsv3kn
ThanksHi
Can you please provide the result that you want get according to your sample data?
It will clear what you are ask for.
* if you return
all tenants in Age bracket between age 14 and 24 then you already returned
main tenant in the age group 14 -24, since he is tenant
Ronen Ariely
[Personal Site] [Blog] [Facebook] -
Sql query to identify all the responsibilities attached to a form
(oracle - apps) Can anyone help me by giving a sql query to identify all the responsibilities attached to a form and corresponding menu should not be in the menu exclusion.
Thanks in advance
VenkiBump
-
SQL query which return all the NET SERVICES which are avaiable in tnsname
hi all
how to write a sql query which return all the net services which are avaiable in tnsname.ora
Regards
sAlso, tnsnames.ora is stored on the client, and not necessarily on the server; it's possible (and quite likely) that the name I use for a database in my tnsnames.ora could be different from the name you use for the same database; conversely we might use the same name for two different databases.
Regards Nigel -
Sql query to find all contacts for an account
I wonder if someone wrote an sql query to find all contacts for an account number in Oracle customer master. We are on EBS 11.5.10.
I am also looking for sql query to find all ship to addresses for an account number.
Thanks.Can you also post the query for people who read this post and are also looking for an answer?
Regards,
Johan Louwers. -
Can we implement the custom sql query in CR for joining the two tables
Hi All,
Is there anyway to implement the custom sql query in CR for joining the two tables?
My requirement here is I need to write sql logics for joining the two tables...
Thanks,
GanaIn the Database Expert, expand the Create New Connection folder and browse the subfolders to locate your data source.
Log on to your data source if necessary.
Under your data source, double-click the Add Command node.
In the Add Command to Report dialog box, enter an appropriate query/command for the data source you have opened.
For example:
SELECT
Customer.`Customer ID`,
Customer.`Customer Name`,
Customer.`Last Year's Sales`,
Customer.`Region`,
Customer.`Country`,
Orders.`Order Amount`,
Orders.`Customer ID`,
Orders.`Order Date`
FROM
Customer Customer INNER JOIN Orders Orders ON
Customer.`Customer ID` = Orders.`Customer ID`
WHERE
(Customer.`Country` = 'USA' OR
Customer.`Country` = 'Canada') AND
Customer.`Last Year's Sales` < 10000.
ORDER BY
Customer.`Country` ASC,
Customer.`Region` ASC
Note: The use of double or single quotes (and other SQL syntax) is determined by the database driver used by your report. You must, however, manually add the quotes and other elements of the syntax as you create the command.
Optionally, you can create a parameter for your command by clicking Create and entering information in the Command Parameter dialog box.
For more information about creating parameters, see To create a parameter for a command object.
Click OK.
You are returned to the Report Designer. In the Field Explorer, under Database Fields, a Command table appears listing the database fields you specified.
Note:
To construct the virtual table from your Command, the command must be executed once. If the command has parameters, you will be prompted to enter values for each one.
By default, your command is called Command. You can change its alias by selecting it and pressing F2. -
A report that lists all non-exempt employees that do not have a supervisor
HI all,
Please help. This is urgent.
bold "A report that lists all non-exempt employees that do not have a supervisor assigned in R/3." bold
I have already selected non-exempt employees but don't know how to select people who do not have a supervisor" What selection criteria I should choose in the ad-hoc query
Thanks a bunch,
RashmiHi
Actually its not that difficult. You can give a criteria in selection where relationship A002 is equal to a space . Replace A002 in this example with the relatioship you have defined for 'Reports(line) to'.
Regards
Waz
Maybe you are looking for
-
Best way to archive a project when it's "finished"
I was wondering what the best way is to store a project that is finished, but you still want the option of going back and modifying for other purposes. Do you create one high quality movie and save it? Do you create separate clips of everything used
-
Hi All, I am using Labview8.5 and Windows XP OS. My Problem is my Labview TimeStamp cannot display current system date and time. Please see my attachment for the screentshot. The TimeStamp or ever Format Date/Time String display "YYYY-MM-DD" instead
-
Hi Friends, Are there import limits parameter for BLOB columns? I have an Image table IMAGE_MSTR on our PROD database with 500,000 rows and checking the user_segments dictionary I saw that the table segment itself occupies around 50Mb space while its
-
LR 3, PS CS5, Camera Raw 6.2, oh my! Compatibility issues?
I am using LR3.2, PS CS5 (12.0.1) and Camera Raw 6.2 on Mac OS (Snow Leopard). When I open an image from Lightroom in Photoshop, filters such as Surface Blur take about 10 minutes (literally) to complete. Wile the filter is running, I checked CPU and
-
I just got a new iPhone 4S for my mum . I set it up on my iTunes and I install all her numbers in . Then I plug my phone in all my hints to got erased and I ended up getting all her contacts in my phone . Help I need my contacts back