Find the column name for a constraint
Hi Guru,
I know the constraint name, now i need the column name and table name for the constraint?
Thanks
Query the USER_CONS_COLUMNS then you will find the column name and table Name
SQL> Select * from USER_CONS_COLUMNS where Constraint_Name='<Your_constraint_Name>';
Similar Messages
-
Hi ,
I have a table so many constraints on so many columns. I need to know which column has which constraint plsql dev?? like below...
table_name -------- col_name ------ constraint_name_of_that_col
xxxxxx xxxxxxx xxxxxxxxxxxxxxxx
or else please let me know how can i get the corresponding col_name for a particular constraint name???My be this can give you a help:
[code]
SELECT *
FROM ALL_CONSTRAINTS
WHERE R_CONSTRAINT_NAME IN (SELECT CONSTRAINT_NAME
FROM ALL_CONSTRAINTS
WHERE TABLE_NAME = 'TABLE_NAME'
[/code] -
How to find the column name and table name with a value
Hi All
How to find the column name and table name with "Value".
For Example i have value named "Srikkanth" This value will be stored in one table and in one column i we dont know the table how to find the table name and column name
Any help is highly appricatable
Thanks & Regards
Srikkanth.M2 solutions by Michaels (the latter is 11g upwards only)...
michaels> var val varchar2(5)
michaels> exec :val := 'as'
PL/SQL procedure successfully completed.
michaels> select distinct substr (:val, 1, 11) "Searchword",
substr (table_name, 1, 14) "Table",
substr (t.column_value.getstringval (), 1, 50) "Column/Value"
from cols,
table
(xmlsequence
(dbms_xmlgen.getxmltype ('select ' || column_name
|| ' from ' || table_name
|| ' where upper('
|| column_name
|| ') like upper(''%' || :val
|| '%'')'
).extract ('ROWSET/ROW/*')
) t
-- where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'DEPARTMENTS')
order by "Table"or
SQL> select table_name,
column_name,
:search_string search_string,
result
from cols,
xmltable(('ora:view("'||table_name||'")/ROW/'||column_name||'[ora:contains(text(),"%'|| :search_string || '%") > 0]')
columns result varchar2(10) path '.'
where table_name in ('EMP', 'DEPT')
TABLE_NAME COLUMN_NAME SEARCH_STRING RESULT
DEPT DNAME ES RESEARCH
DEPT DNAME ES SALES
EMP ENAME ES JONES
EMP ENAME ES JAMES
EMP JOB ES SALESMAN
EMP JOB ES SALESMAN
EMP JOB ES SALESMAN
EMP JOB ES PRESIDENT
EMP JOB ES SALESMAN
9 rows selected. -
Regarding finding the table name for a field in R12 forms
Hi all,
I need to know how to find the table name for a field in R12. I am working on extracting the employee information but i need to know how to get the table names for the fields.
Thank you,
rajPlease see these threads.
How to find table name in ebs
How to find table name in ebs
E-Business tables
E-Business tables
Thanks,
Hussein -
Find the sequence name for a particular table
Hi,
Please give query to find the sequence name for a particular table in oracle.
ThanksI mean getting List of Sequence names defined in DB.
I got the answers
select *from user_sequences -
How to find the group name for a section programatically?
I have these display formulas that are being repeated in each group footer. The only thing that changes are the group names.
How can I find the group name for the current section?
The bolded(or starred) items are what I'm trying to create a generic function for.
Ontario
Bob
1000 Sales Other
2000 Random Billing
200 Phone Billing
*Total for Bob* 3200
Sally
2000 Sales Client
1000 Random Billing
300 Cell Billing
*Total for Sally* 3300
*Total for Ontario* 6500
Thanks in advance,
JI'm not sure if the GroupingLevel or GroupNumber fuctions will help. (There description in the on-line help leaves much to be desired, IMHO...)
If not, you could try adding formula fields to each level that sets a global variable to tell your other formula fields what level it is on. If you only have one or two other formulas, and only one or two groups, this really wouldn't be a whole lot easier. But if you had a lot of groups or a lot of formula fields that you want to make "group independent" it could help.
So for each footer, create a formula field like (basic syntax):
WhilePrintingRecords
global geoupLevel as String
groupLevel = "Province"
formula = ""
(changing the name given to groupLevel for each footer). Then in your "generic" formula you could put something like:
WhilePrintingRecords
global groupLevel as string
select case groupLevel
case "Province"
formula = "Total for " + {Province}
case "Name"
formula = "Total for " + {Name}
else
Formula = "Totals"
end select
HTH,
Carl -
Where do I find the Instance Name for EPM Batch Script Utility?
I am trying to find the Instance Name for the EPM Batch Script Utility. I have done the obvious...looked at the Deploy settings in EPM, but the Instance field is not even listed. I have tried 'Default', 'localhost', 'Planning', 'epmsystem1' and " " (nothing).
Anyone know where I can look? The script will not deploy without this option (I have tried removing the field altogether). This is the error I am getting:
2012-12-05 03:02:21,908 INFO Parameters(ApplicationName, InstanceName, ApplicationServer, HubProject, datasourceName, waitForCompletion, deployOption, RefreshOutline, CreateSecurityFilters)
2012-12-05 03:02:21,909 INFO Values('BKAdFund', 'Default', 'PLANNING_LWA', 'Planning', 'BKAdFund', 'True', 'All','True', 'True');
2012-12-05 03:02:23,149 ERROR [Line 16] Unable to find the instance with name Default.
Thanks!Hi all,
I referred Andy's suggestion to set both App Server name and instance name as PLANNING_LWA.
It worked in Planning 11.1.2.3
My deploy string set as followed:
set bpmaserverurl=http://localhost/hyperion-bpma-server;
set workspaceurl=http://localhost:9000/workspace;
login;
Execute Deploy
Parameters(ApplicationName, InstanceName, ApplicationServer, HubProject, ClearAll, CheckIntegrity, waitforcompletion, purgeTransactions, deployOption, datasourceName,CreateOutline,RefreshOutline,CreateSecurityFilters,SharedMembersSecurityFilters,ValidateSecurityFilterLimit,Notes)
Values ('HRPLN1', 'PLANNING_LWA', 'PLANNING_LWA', 'Planning', 'false', 'false', 'true', 'true', 'AppView','HRPLN_DS','false','true','false','false','false','HRPLN1 redeploy by batch client');
Thanks Andy!! -
Pls help me to find the smartform name for RMA REQUEST(RMA)
Hi Experts,
Pls Tell me how too find the smartform name for RMA REQUEST(RMA)
Pls help
Thanks and regards
JayaWHat is RMA REQUEST form please ellobrate your query
the smrat form tcode is SMARTFORMS.....you can try -
How to find the role name for the trasaction
Dear Gurus,
Kindly assist me to find the role name to which a perticular transaction was assigned.
For example:- I need to find the role name for SU01, SUIM, SE38...etc
Thanks&Regards,
Kalyan.Hi Kalyan,
Use SUIM T-code to analyse User Vs Roles and Roles Vs T-Codes. Then your problem will be solved.
Regards,
Hari.
PS: Points are welcome. -
How to find the program name for LSMW
hi experts,
i have created a LSMW for uploading data in HR.i hope there will be a ABAP progarm automatically generated from it .where i can find the program name .
i have succesfully completed all the 14 stepas and data is uploading comfortably .
thanx in adavancehi,
just do liek this to know abt the program name,
select system at the menu in your lsmw,
select status ,
in popup u'll get the proram name and all other related details.
reward points if useful,
regards,
seshu. -
Just new to this and unable to find answers
My solution
Public Function GetTableColumnNames() As Boolean
Form1.ListBox1.Items.Clear()
_MDFFileName = String.Format("{0}.mdf", _DatabaseName)
_sqlConnectionString = String.Format("Data Source=(LocalDB)\v11.0;AttachDBFileName={1};Initial Catalog={0};Integrated Security=True;", _DatabaseName, Path.Combine(_DatabaseDirectory, _MDFFileName))
Dim cn As New SqlConnection(_sqlConnectionString)
'put the table name in brackets in case it has spaces in it
Dim SQLString As String = "SELECT * FROM [" & _TableName & "]"
Try
cn.Open()
Dim cmd As New SqlCommand(SQLString, cn)
Dim rdr As SqlDataReader =
cmd.ExecuteReader(CommandBehavior.KeyInfo)
Dim tbl As DataTable = rdr.GetSchemaTable
'This shows all of the information you can access about each column.
For Each col As DataColumn In tbl.Columns
Form1.ListBox1.Items.Add(col.ColumnName)
Debug.Print("col name = " & col.ColumnName & ", type = " & col.DataType.ToString)
Next
'Get each column.
For Each row As DataRow In tbl.Rows
Form1.ListBox1.Items.Add(row("ColumnName"))
Next
rdr.Close()
Catch
MessageBox.Show("Error opening the connection to the database.")
Finally
cn.Close()
End Try
Return _Success
End Function -
Find the Column Name which gives Invalid Number Error
Hi,
There are about 150 columns in a table and data to this table is from a external source like flat file. when these data are loaded to the table for a particular column it gives Invalid Number Error. So need to find for Which Numeric Column a String Value is about to be inserted.
since we are sure not whether the proper Values are coming from Source in Front End we pass the Value within ' quotes.
So how do we get the Column for which the error is raised :-)If you are using SQL*Loader, the log will tell you which row and column has the error.
Otherwise you may need to code your own debugging statements. -
Finding the column names from a table.
I am on 10g
I would like to find out the columns of a table where there are null columns in a table.....this table contains about 300 + columns where i do not want to put where condition for all the columns
is there a way i can write a sql to find?
for a given table or the results set that i need to get, i will have same results for all the rows, so it
cant be like col1 is null on row1, but col2 is not null on row2 ...they are all identical....
example table, but it has 300 + cols
F_IND H_IND P_IND DMA_IND
N N
N N
N N
N N Thanksselect count(col1), count(col2), count(col3), ...
from your table;
The results with 0s are null throughout the table (or the table has no rows). -
Return the column names for which the row values are not null.
Hi i m a new guy to db admin, and i need a sql script which should return column names of the particular table. and the returned column should have value (fyi - if the column has null value column name should not come in the sql o/p).
Exmple:
table name - A
s.no name mark status fee
1 aa 45 p null
2 bb 30 null paid
3 cc 35 p paid
fyi -1) if i give the table name(A) and s.no (2) the o/p should be -- name,mark.
2) if i give the tablename(A) and s.no (1) the o/p should be --- name,mark,status.
Thanks
Krishna.
Edited by: user13294228 on Jun 14, 2010 10:54 PMBTW,
The previous solution is for all values of the column, if you want a specific row, you can add it in where clause.
I mean in your example, it you look like:
SET serveroutput on;
DECLARE
l_cnt NUMBER;
l_str VARCHAR2 (255) := '';
l_table_name VARCHAR2 (255) := 'YOUR_TABLE_NAME';
l_col_cond VARCHAR2 (255) := 'S_NO';
l_val NUMBER := 1;
CURSOR c_col
IS
SELECT column_name
FROM user_tab_columns
WHERE table_name = l_table_name;
BEGIN
FOR i IN c_col
LOOP
EXECUTE IMMEDIATE 'SELECT COUNT ('
|| i.column_name
|| ') FROM '
|| l_table_name
|| ' WHERE '
|| l_col_cond
|| ' = '
|| l_val
INTO l_cnt;
l_str := l_str || CASE
WHEN l_cnt = 0
THEN ''
ELSE i.column_name
END || ',';
END LOOP;
l_str := SUBSTR (l_str, 1, LENGTH (l_str) - 1);
DBMS_OUTPUT.put_line (l_str);
END;Saad,
Edited by: S.Nayef on Jun 15, 2010 11:54 AM -
Can I show the column name for my legend?
I have a bunch of graphs where the legend labels (ie. the values from the column) aren't really informative (ie. simple numeric values), and are part of a dimensional hierarchy, so you might see a graph whose legend has 1, 14, 38, 141 and you click on one of them and get another graph whose legend is 345, 6546, 2342. My current solution is to create a logical column prepending the value with a column name, so my values are now "District 1", "District 14", "District 38", "District 141". But it would be so much nicer if I could just show "District" above the legend. Is there any way to do this?
My be this can give you a help:
[code]
SELECT *
FROM ALL_CONSTRAINTS
WHERE R_CONSTRAINT_NAME IN (SELECT CONSTRAINT_NAME
FROM ALL_CONSTRAINTS
WHERE TABLE_NAME = 'TABLE_NAME'
[/code]
Maybe you are looking for
-
Recent Places list under Save As...
When I do a Save or Save As..... the Mac window usually defaults to a folder location for placing the file. Maybe the last folder I was in. When you click on the Folder pop-down window you see the path to the current folder.. .But you also see a list
-
CS3: Make mask using group with strokes, fills, multiple objects,etc
I am currently using CS3, and I have created 2 objects with gradient clipping masks on them, to go over a group (my logo). I am hoping to create a glass effect with these gradients over my logo. The problem I am running into is that I cannot use my l
-
How to display graphics dynamically in JSP
I use JSP to call a servlet to get the output . The output is in svg format. I do not hope to create a svg file to store the output from servlet. I wope to embed the svg dynamically in the jsp page Anybody knows the solution. Many thanks in advance C
-
I finished my website and try and publish it, and starts uploading then part way through it says error and stops uploading...is it because i am on dial up????
-
HI , NOW i have problem in file2file scenario i use archive mode ,NOW at the sender ,the file was moved to OK but it wasnit transfer to the receive. the file is not initial. in SXI_MONITOR ,there was no message about the file .