How to find out Column names from JDBC?
Hello,
How to get Oracle's Table Meta Data without firing a "SELECT" statement and using ResultSet meta data ?
Thanks,
-raj
This works for most jdbc drivers:
Connection con = ???;
DatabaseMetaData dbmd = con.getMetaData();
ResultSet rs = dbmd.getColumns( null, null, "TABLENAME", null );Read the API: http://java.sun.com/j2se/1.4.1/docs/api/java/sql/DatabaseMetaData.html#getColumns(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String)
Similar Messages
-
HOW TO FIND OUT TABLE DESCRIPTION FROM JDBC?
HOW WILL FIND OUT TABLE DESCRIPTION FROM JDBC?
Have a look at ResultSetMetaData
getColumnCount()
getColumnName(int)
getColumnTypeName(int)
getColumnDisplaySize(int)
***Annie*** -
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. -
How to find the form name from VA02 T.code
how to find the form name from VA02 T.code
Hi Rajyam,
I guess you are looking out for the formname which prints sales related documents.
If this is what you want,then go to the T-code NACE and select the option K1Sales activities and click on the Output Types button on the top.The new window has all the types of Output types listed.Select the most appropriate and double click on the Processing routines button in the left side screen.
The new window lists the program names and the forms associated with that output type.
In case you have any further clarifications,do let me know.
Regards,
Puneet Jhari. -
How to find out Db name of perticular web application in sharepoint 2010
how to find out Db name of perticular web application in sharepoint 2010 to take a backup from sql
1. Open the SharePoint 2010 Central Admin application.
2. On the SharePoint central administration website, click Application Management.
3. In the Databases section, click Manage Content Databases.
4. On the Manage Content Databases page, select a web application by clicking the Web Applications drop-down list and choosing a web application.
5. Can notice the available database names for the webapplication. ******************************************************************************************
Please remember to mark your question as answered &Vote helpful, if this solves/helps your problem
s p kumar -
Discoverer Report: How to find Business Area name from Report Name.
Hi
I opened a report in Disco Desktop 4 -> Resonsibiolity --> Report Name.
So I know Report name but don’t know which Business Area it belongs to.
How to find Business Area Name from Report Name?
Cheers
VijayHi,
There is no relationship between reports and business areas. Each report can be built from many folders. Each folder can be in many business areas.
However you can try the following SQL which may give you the result you want for an v5 EUL. You will have to modify for Discoverer 4 EUL:
select distinct doc_name, obj.obj_name folder_name, bas.ba_name
from eul_us.eul5_documents doc
, eul_us.eul5_elem_xrefs xref
, eul_us.eul5_expressions exp
, eul_us.eul5_objs obj
, eul_us.eul5_ba_obj_links bol
, eul_us.eul5_bas bas
where xref.ex_from_id = doc.doc_id
and doc.doc_name = &your_report
and xref.ex_to_id = exp.exp_id
and obj.obj_id = exp.it_obj_id
and bol.bol_obj_id = obj.obj_id
and bas.ba_id = bol.bol_ba_id
Rod West -
How to pull only column names from a SELECT query without running it
How to pull only column names from a SELECT statement without executing it? It seems there is getMetaData() in Java to pull the column names while sql is being prepared and before it gets executed. I need to get the columns whether we run the sql or not.
Maybe something like this is what you are looking for or at least will give you some ideas.
public static DataSet MaterializeDataSet(string _connectionString, string _sqlSelect, bool _returnProviderSpecificTypes, bool _includeSchema, bool _fillTable)
DataSet ds = null;
using (OracleConnection _oraconn = new OracleConnection(_connectionString))
try
_oraconn.Open();
using (OracleCommand cmd = new OracleCommand(_sqlSelect, _oraconn))
cmd.CommandType = CommandType.Text;
using (OracleDataAdapter da = new OracleDataAdapter(cmd))
da.ReturnProviderSpecificTypes = _returnProviderSpecificTypes;
//da.MissingSchemaAction = MissingSchemaAction.AddWithKey;
if (_includeSchema == true)
ds = new DataSet("SCHEMASUPPLIED");
da.FillSchema(ds, SchemaType.Source);
if (_fillTable == true)
da.Fill(ds.Tables[0]);
else
ds = new DataSet("SCHEMANOTSUPPLIED");
if (_fillTable == true)
da.Fill(ds);
ds.Tables[0].TableName = "Table";
}//using da
} //using cmd
catch (OracleException _oraEx)
throw (_oraEx); // Actually rethrow
catch (System.Exception _sysEx)
throw (_sysEx); // Actually rethrow
finally
if (_oraconn.State == ConnectionState.Broken || _oraconn.State == ConnectionState.Open)
_oraconn.Close();
}//using oraconn
if (ds != null)
if (ds.Tables != null && ds.Tables[0] != null)
return ds;
else
return null;
else
return null;
}r,
dennis -
How to find out server name in reports9i
hi all
how to find out server name in reports9i
i need the report server name to call a report
thanks
Edited by: vikas singhal on Nov 5, 2008 1:02 AMYou do not need to do anything, if your Report server is on the same machine as the Forms server (which is usually the case) you simply use the url as
/reports/rwservlet?report=myreport' and the server will automatically use the default report server.
then you simply use
web.show_document('/reports/rwservlet?userid=scott/tiger@orcl&report=myreport&desformat=htmlcss&desname=test.html'Tony
Try it now
Edited by: Tony Garabedian on Nov 5, 2008 2:00 PM -
How to find out company code from a plant ?
Hello friends,
I have to modify a program that uses FM "BAPI_COMPANYCODE_GET_PERIOD". For that, we have to export company code ID. Currently it is hard coded with one company code. Now we want to make this program usable by all company codes. So instead of hard coding, I would like to dynamically find out company code based on the plant. So I want to know - how to find out company code from a plant ? Is there any table that has plant to company-code assignment data, or any other FM/BAPI to get this info ?
Thanks,
- Chetanhi
u can find this from table T001K
or just goto EC01
here click on STRUCTURE>NAVIGATION
double click on co code u will get the list
u can slo try this in EC02
regards
kunal -
How to find out query name using Elements of the query builder.
Hi SDNers,
how to find out query name using Elements of the query .
thanks,
satyaaHi,
For having a look at the relation between BEx tables,check the link below:
http://wiki.sdn.sap.com/wiki/display/BI/ExploretherelationbetweenBEx+Tables
-Vikram -
How to find the dsn name from an *.rpd file provided?
How to find the dsn name from an *.rpd file provided? All the ODBC details which would require to run your dashboard.
Hi
DSN name is not a part of .rpd file. So There is no information about DSN name in .rpd file.
Thanks
Siddhartha P -
How to find a metachain name from local process chain id or name
how to find a metachain name from local process chain id or name
Hi Dwarakanath,
Please post your query in the correct topic space in SCN. For help, see this document:
Find Topic Spaces on SCN (Forums)
Thanks,
Kristen -
How to find out the user from the Jobs queue in Report server
Hello All!
I have a doubt about finding out the user from the scheduled jobs queue. Say I go ahead and schedule a report on Reports Server how can I find out the user name. When I view the jobs using showjobs I could see that the DBMS_JOBS table has a column under "Job Owner". But it invariantly shows it is "rwuser". So is there a way to find out which user has scheduled which job?
Regards
Shobhahi,
The below tables will give only the name .
USER_ADDRS
USER_ADDR
USER_ADDRP
USR02
i think you need email address .
you can use this Tcode : su01d
and give the user name and excute it
i hope it will help you.
Ram
Edited by: Ram velanati on Jun 30, 2008 6:57 PM -
How to find out the metachian from subchain
hello friends,
could you please let me know , how to find out the meta chain from subchian .
I know the subchain name and wanted to check that this chian is included in which meta chian ,
actaully here so many chain , so its confusing .
Is there any way ?Hi,
Pls chk this links,
Re: Meta chains - how to create n example scenerios
Re: How to create process chains, infopackage groups & Meta chains
Hope this helps,
regards
CSM reddy -
How to find out table name for the field in the webUI
Hi.
I am in CRM2007.
So i go to the transaction code BSP_WD_CMPWB
In that i provide the component name as CRM_UI_FRAME.
I press the Test button.
So, it opend the WebUI.
I want how to find out table of the particular input field?
I mean from which table the data is retrived how to find out?
When i enter some thing in the input field how to find out in which table that data is stored?
By pressing F2 on the input field it opend View and Component Name.
I want find out table of that particular field. How to find it?
If anybody know about this explain it with Screen shorts if possible.
Thank You.
Krishna. B.hi
goto tx genil_model_browser. Suppose you want to find fields reated to your order header eg sold to name. In component set write all and press F8. Then goto access object and in access object click on node BTAdminH. Click on attribute structure. Here you will find structure and attributes. If you click relationship then you will see all the relationship wrt btadminh. open any r/s that you require. and click on other object and attribute. You will get to know the structure.
Best regards
Pankaj kumar
Maybe you are looking for
-
My ipad was stolen over the weekend and i immediately contacted apple to do a data-wipe. On wednesday, the ipad was apparently wiped and then decided to sync with all of my other systems. It's been two days and I just figured out how to access and re
-
Hey, Earlier today I clicked on for a FF upgrade. Now I no longer am able to get Skype, and can not access my University of Dallas imba site to listen to today's lecture and access notes etc...crucial...I took the afternoon off from work to do this..
-
I get a message to - (turn off compatibility mode) how?
While attempting to sync my Iphone, I get a message to turn off compatibility mode, how do I do that?
-
Hi all i habe the following problems, I customiz the credit limit and it work well, but the Message to the credit manager can not be sent. when i create a sales order, i can see the message in header output well, when i save the Order i become a mess
-
Using Pageflow with pop-up windows
Has anyone tried to invoke a nested pageflow in a pop-up window? There's a bit of a problem if you open a new window to a different, albeit nested, pageflow. The original pageflow essentially loses all its data. Here's what I have: 1.) A Pageflow por