Reg. Getting Tables name from interbase
Hi,
I like to get interbase database table name using a query from JDBC program .I am connecting interbase through interclient driver.
Regrads,
Vikki
Once you have a Connection to the database, use its getMetaData() method to get a DatabaseMetaData object, which can give you that information.
Similar Messages
-
Getting table name from a query
Hi, I'm trying to get the table name from my sql query
My code is as follows;
ResultSetMetaData metadata = rs.getMetaData();
for (int i = 1; i < metadata.getColumnCount(); i++)
System.out.println(metadata.getTableName(i));
I just get a blank output. Yet my sql query executes and I can pull down the records, and grab the column names from the result sets.
Any ideas on how I can get the table name for the columns. The reason being is on one of my querys I'm using join statements and i need to retrieve the table name for the column i'm displaying, as some tables have similar column names.
Thanks in advance.Hi,
What db are you using?
I also get a blank output with ResultSetMetaData.getTableName because Oracle doesn't implement this method.
Why do you not know the table name anyway?
regards
Nick -
Hello Friends..
I need your Help My Friends...
we are working currently on Oracle Applications : 12.1.1
i would like to know the best way to get Table name from Web Based Form..
Regards
Yas.Hi Yas;
Please follow below 2 thread i belive you will find some hint in those thread
table name for a jdeveloper page
Re: EBS, 11.5.10, table name
Hope it helps
Regard
Helios -
How get all table name from database
hi master
sir
how get all table name from databaseThe big question is 'why'.
Selecting from view 'dba_tables' will indeed give the list of all tables in the database, but that includes the dictionary tables and the internal tables, and many others that are probably not of interet to a person who needs to ask this question. Besides, the dba_tables view requires access to a DBA account.
There are several other views: "user_tables" will list all the tables in this user's schema; and "all_tables" will list all the tables this user can access in some way.
The above do not, of course, include any information about synonyms, sequences, views, indexes and so on.
The correct answer and the meaningful answer may be two different things. -
Dear Sapers,
How to find table name from field name to write functional spec.Pl elaborate it for normal & zdevelopment.Points will be rewarded for useful answer.
Thanks in advance.Hi Uday,
Just for the sake of help this reply......
You can find the name of tables by using F1 button keeping cursor on the respective field that you want to bring in development. From there you have to move to Technical details through technical details button.
If that field or values are getting saved into some structure then you have to search the right database tables. According to your module many database tables are there (that you can search from sdn.sap.com directly). That totally depends on your report/development that you want to bring in......
In any development deciding the right table for start up ( I mean to say tables that will give you input fields in your FS) is critical, latter you have to search linking tables and have to give logic about how to pass values from what to what field and what to what table..... In this case Transaction code SE11 and SE16 are useful......
This all is slightly confusing and tedious too...... Closely work with you ABAPer to get into many things and have successful development....
Have nice development....
Cheers!
Abu Arbab -
FM for getting MONTH name from DATE.
Hi all ,
We have a requirement to get Month name from the DATE,e.g IF date is 01/01/2008 we need a FM which can generate month name as 'JANUARY'.
\[removed by moderator\]
Thanks and Regards
Kiran
Edited by: Jan Stallkamp on Jul 30, 2008 4:26 PMHi,
Here is the code u required...
REPORT ZASHU_MONTH_NAMES_GET.
data:r_code type sy-subrc.
data:mnames type standard table of T247 with header line.
CALL FUNCTION 'MONTH_NAMES_GET'
EXPORTING
LANGUAGE = SY-LANGU
IMPORTING
RETURN_CODE = r_code
TABLES
month_names = mnames.
EXCEPTIONS
MONTH_NAMES_NOT_FOUND = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write:/ mnames.
Thanks & Regards
Ashu Singh -
How to compare 2 different database to get table name which are not present in second database
How to compare 2 different database to get table name which are not present in second database
Sorry cannot test it right now
use db1
go
select * from sys.tables t where not exists
(select * from db2.sys.tables s where t.object_id=s.object_id)
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Getting column names from cursor
Hi all
I have procedure which produces list of applied for jobs web page(using htp. package)
I got result in cursor, but have to provide dinamic sort, based on colimn pressed
procedure my_application_list
(pi_resume_num in varchar2 default null
,pi_sort_col in varchar2 default null
,pi_page_no in varchar2 default null
,pi_action in varchar2 default null
,pi_msg in varchar2 default null
is
CURSOR cur_job IS
SELECT jtl.JOB_TITLE
,jtl.COMPANY_NAME
,a.APPLY_DATE
,a.lang
,a.job_id
FROM job_tl jtl, applied_for_job a, gateway gt
WHERE a.job_seeker_id=app.job_Seeker
AND a.job_id=jtl.job_id
AND a.lang=jtl.lang
AND a.gateway=gt.gateway
AND jtl.lang=(SELECT substr(MIN(lt.order_list||jtl0.lang),2) lang
FROM job_tl jtl0
,language_tl lt
WHERE jtl0.job_id = a.job_id
AND jtl0.lang=lt.lang
AND lt.gui_lang=app.language)
ORDER BY pi_sort_col
rest of code
The columns displayed in web page are Job_title, Company_name and Applied_date
This page is displyed well, bu without column nmes at the top. I am trying to get column names from cursor in order to have ORDER BY <pi_sort_col>
can someone help how i can get those column names:Job_title, Company_name and Applied_date
User will be able to click on column and sort
Thank in advance .I appreciate any helpHi Francisco
Here is my code
CREATE OR REPLACE PACKAGE BODY cc_web_application_list
IS
TYPE COL_NAME_LIST IS TABLE OF VARCHAR2(100)
INDEX BY BINARY_INTEGER;
TYPE COL_ORDER_LIST IS TABLE OF VARCHAR2(30)
INDEX BY BINARY_INTEGER;
col_name_t col_name_list;
col_order_t col_order_list;
procedure my_application_list
(pi_resume_num in varchar2 default null
,pi_sort_col in varchar2 default null
,pi_page_no in varchar2 default null
,pi_action in varchar2 default null
,pi_msg in varchar2 default null
is
l_my_page_no PLS_INTEGER := TO_NUMBER(nvl(pi_page_no,1));
l_js_name gam_user.username%TYPE;
l_js_first_name gam_user.first_name%TYPE;
l_cnt PLS_INTEGER := 0;
l_scr_lines PLS_INTEGER := 0;
l_curline PLS_INTEGER;
l_jobs_applied PLS_INTEGER;
l_total_rec PLS_INTEGER;
l_total_pages PLS_INTEGER;
l_pos PLS_INTEGER;
l_first PLS_INTEGER :=0;
last PLS_INTEGER :=0;
l_lines PLS_INTEGER := 10;
col_name VARCHAR2(100) := col_name_t(3) ;
col_order VARCHAR2(30) := 'DESC';
str VARCHAR2(2000);
TYPE display_rec IS TABLE OF VARCHAR2(500) INDEX BY BINARY_INTEGER;
display display_rec;
TYPE page_table_type IS TABLE OF PLS_INTEGER INDEX BY BINARY_INTEGER;
page_number page_table_type;
CURSOR cur_job IS
SELECT jtl.JOB_TITLE job_title
,jtl.COMPANY_NAME company_name
,a.APPLY_DATE apply_date
,a.lang
,a.job_id
FROM job_tl jtl, applied_for_job a, gateway gt
WHERE a.job_seeker_id=app.job_Seeker
AND a.job_id=jtl.job_id
AND a.lang=jtl.lang
AND a.gateway=gt.gateway
ORDER BY a.apply_date;
This decode is a problem
decode(col_order,'ASC'
,decode(col_name
,col_name_t(1), jtl.job_title
,col_name_t(2), jtl.company_name
,col_name_t(3), TO_CHAR(a.apply_date, 'YYYYMMDDhh24miss')
,a.apply_date)
) ASC
,decode(col_order,'DESC'
,decode(col_name
,col_name_t(1), jtl.job_title
,col_name_t(2), jtl.company_name
,col_name_t(3), TO_CHAR(a.apply_date, 'YYYYMMDDhh24miss')
,a.apply_date)
) DESC
,a.apply_date
TYPE rec_one IS TABLE OF cur_job%ROWTYPE INDEX BY BINARY_INTEGER;
r rec_one;
BEGIN
BEGIN
SELECT username,first_name
INTO l_js_name,l_js_first_name
FROM gam_user
WHERE user_id = App.job_seeker;
EXCEPTION
WHEN OTHERS THEN NULL;
END;
Cc_Pkg_Elements.p_page_top_job_seeker(
'Personal Job List'
,REPLACE(Txt_Proc_My_Joblist.title_job_list
,'##first_name##',l_js_first_name),'N' ,TRUE ,'Pxx');
----- get numer of records returned by query
SELECT COUNT(1)
INTO l_total_rec
FROM job_tl jtl,applied_for_job a
,gateway gt
WHERE a.job_id = jtl.job_id
AND a.job_seeker_id = App.job_seeker
AND a.gateway = gt.gateway ;
------get number of pages
l_total_pages:=CEIL (l_total_rec/l_lines);
l_jobs_applied := 0;
col_name := pi_sort_col;
col_order := pi_sort_col;
--get first positions
l_first := (nvl(l_my_page_no,1) - 1) * l_lines + 1;
FOR rec IN cur_job LOOP
l_cnt := l_cnt + 1;
EXIT WHEN l_cnt > l_first + l_lines - 1;
IF l_cnt >= l_first THEN
l_scr_lines := l_scr_lines + 1;
r(l_scr_lines) := rec; --assign counter from loop to r index
IF rec.apply_date IS NOT NULL THEN
l_jobs_applied := l_jobs_applied + 1;
END IF;
END IF;
END LOOP;
htp.p('<FORM ACTION="'||App.gateway||'8.my_application_list" METHOD="post">');
htp.p('<table align="center">');
htp.p('<tr><td>');
IF r.COUNT = 0 THEN
Web_Pkg_Elements.doc_msg(Txt_Proc_My_Joblist.no_jobs);
END IF;
htp.p('</td></tr>');
htp.p('</table>');
--table_heading(col_name ,col_order );
htp.p('<table align=center>');
htp.p('<tr align="center"><td>');
FOR i IN 1..l_total_pages LOOP
page_number(i) := i;
IF page_number(i) = l_total_pages THEN
htp.p('');
||'');
Web_Pkg_Elements.doc_val_small(page_number(i)||'</A>');
ELSE
htp.p('');
|'||'');
Web_Pkg_Elements.doc_val_small(page_number(i)||' |'||'</A>');
END IF;
END LOOP;
htp.p('</td></tr>');
htp.p('</table>');
htp.p('<table align=center>');
FOR l_curline IN 1..l_scr_lines LOOP
display(1) := NVL(r(l_curline).job_title, '<br>');
display(2) := NVL(r(l_curline).company_name, '<br>');
display(3) := NVL(Cc_Pkg_Nls.date2char(r(l_curline).apply_date, App.date_format), '<br>');
IF MOD(l_curline, 2) = 0 THEN
Cc_Pkg_Elements.tr_even;
ELSE
Cc_Pkg_Elements.tr_odd;
END IF;
htp.p('<td>');
htp.p('');
Web_Pkg_Elements.doc_val(display(1)||'');
htp.p('</td>');
htp.p('<td>');
Web_Pkg_Elements.doc_val(display(2));
htp.p('</td>');
htp.p(' <td>');
Web_Pkg_Elements.doc_val(display(3));
htp.p(' </td>');
htp.p('</tr>');
END LOOP;
htp.p('</TABLE>');
htp.p('<TABLE width="88%" BORDER="0" CELLPADDING="0" CELLSPACING="0"
align="center">');
htp.p('<tr valign=bottom>');
htp.p('<TD colspan=2 align=right>');
IF l_my_page_no > 1 THEN
htp.p('<P>'||'<IMG SRC="'||App.image||'prev.gif" ALT="'
||Txt_Proc_My_Joblist.prev
||'"' ||' HEIGHT=20 BORDER=0 ALIGN=bottom '
||'hspace=2>');
END IF;
IF l_my_page_no < CEIL (l_total_rec/l_lines) THEN
htp.p(' <a href="'||
web_pkg_elements.link$$(App.gateway||'8.my_application_list?'
||'pi_sort_col='||Web_Pkg_Elements.replace_in_url(pi_sort_col)
||'&pi_msg=&pi_page_no='||TO_CHAR(l_my_page_no + 1)
||">'||'<IMG SRC="'||App.image||'next.gif" ALT="'
||Txt_Proc_My_Joblist.NEXT
||'"' ||' HEIGHT=20 BORDER=0 ALIGN=bottom '
||'hspace=2></a>');
END IF;
htp.p('</TD>');
htp.p('</TR>');
htp.p(' </TABLE>');
htp.formHidden('pi_sort_col', pi_sort_col);
htp.formHidden('pi_page_no', pi_page_no);
htp.p('</FORM>');
END my_application_list;
END ; --cc_pkg_application_list -
Select query to get table names
Hi,
Can i retrieve a table name from a select query if i know value of one of the columns in the table?
GlenCan't you take a look at the source code and see what table those values are coming from? That's likely the easiest solution.
Barring that, you could use dynamic SQL, but it's going to be awfully inefficient. Something like
FOR x IN (SELECT * FROM user_tab_cols WHERE data_type = 'VARCHAR2')
LOOP
EXECUTE IMMEDIATE
'SELECT COUNT(*) FROM ' || x.table_name ||
' WHERE ' || x.column_name || ' = <<literal value>>'
INTO l_cnt;
IF( l_cnt > 1 )
THEN
DBMS_OUTPUT.PUT_LINE( 'Found the value' );
END IF;
END LOOP;This assumes that you know at least what data type the value is stored in. It's also going to generate a tremendous number of full table scans, so it'll be slow as molasses on a system of any size.
Justin -
Table name from structure name
Hi experts
can anyone tell me how to find the table name if structure name is known.
when i press F1 in table field ,it give me struct name and field name.
how can i find table name from this struct.
Thanks in advanceHi ,
You can Check the where used list from your structure,
or
From SE84 transaction in abap dictionary ,give your
structure name and execute it will show where it has
been used.
Hope it helps
Regards
Mansi -
SRM 7.0 find transparent table name from Web dynpro Component
Hi ,
I am trying to find the transparent table name from Web dynpro component dictionary structure. I am working in SRM 7.0. Please let me know how to find the transpartent table for a field.
Thanks,
Monicahi,
your question is very unclear and does not relate to performance.
SRM uses webdynpro ABAP so the recommendation will not help.
Do you need a technical UI element?
Or the application table where the business data of an UI is stored???
If it is the later, then you can use the SQL trace, change to element you are interested in, and trace it. The table should appear in the trace in connection which an UPDATE command. Still a bit cimbersome.
Siegfried -
Table name from which to extract bank name and swift code by key field as vendor code
Please help with the table name from which we can extract the bank name and swift code of vendors with the key input as vendor numbers
Hello Subhadra, I'm sorry, I should've said join of LFBK and BNKA. The fields for the join will be the bank country(BANKS) and bank key (BANKL).
If you have not found a docu on SQVI already, you can refer to this:
How to create Report by using SQVI
This is how your join should look in BASIS mode, your selection parameter should be vendor code LIFNR; output fields with be bank name BANKA and swift code SWIFT. -
Problem while displaying all the table names from a MS Access Data Source.
I started preparing a small Database application. I want to display all the Table Names which are in the 'MS Access' Data Source.
I started to executing by "Select * from Tab" as if in SQL.
But i got an error saying that "Not able to resolve Symbol 'Tab' in the query".
Please let me know how can i display all the table Names in the MS Access Dats Source.Here i am developing the application in Swing using JDBC for accessing the database.
I want to display all the Table names from the data source in a ListBox for easy selection of tables to view their details. -
Getting user name from sopa header
How should get user name from soap header in my udf...?i searched in sdn,but not get exact solution...
I din't get this with SRemoteUser
1. i've enabled " Do Not Use SOAP Envolope"
2.Enabled ASMA
3.Variable Transport Binding .
used the following code as well:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey user = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/SOAP", "SRemoteUser");
conf.get(user);
But not value in it.. Correct me if iam wrong.. -
Fix for getting track names from GraceNote.
Finally found a Windows fix for getting iTunes to get track names from GraceNote (see below). It works!!!
Fixing iTunes CDDB lookup - more details
Since Apple’s forums don’t seem to support permalinks, the hint I previously posted about fixing iTunes for Windows’ connection to CDDB isn’t complete. Here’s how to reestablish connection to CDDB if your track lookups start failing:
Quit iTunes for Windows.
In Internet Explorer, go to Tools | Internet Options, click on the Connections tab, and click on the LAN Settings button.
In the dialog that follows, uncheck the checkbox about using a proxy. Hit OK, then OK again.
Open RegEdit and look for the following key: HKEYLOCALUSER\Software\CDDB\Control\2.0. Delete this key.
Open iTunes and insert the CD. iTunes should now be able to connect to CDDB again—at least, until it forgets again later...
If necessary, reenable your proxy settings.
Microsoft —Tim Jarrett @ 2/12/04; 8:59:45 AM Discuss Comment (0) Cosmos [#]
Cheers.
Tom W.
Other OSFinally found a Windows fix for getting iTunes to get
track names from GraceNote (see below). It works!!!
Fixing iTunes CDDB lookup - more details
Since Apple’s forums don’t seem to support
permalinks, the hint I previously posted about fixing
iTunes for Windows’ connection to CDDB isn’t
complete. Here’s how to reestablish connection to
CDDB if your track lookups start failing:
Quit iTunes for Windows.
In Internet Explorer, go to Tools | Internet Options,
click on the Connections tab, and click on the LAN
Settings button.
In the dialog that follows, uncheck the checkbox
about using a proxy. Hit OK, then OK again.
Open RegEdit and look for the following key:
HKEYLOCALUSER\Software\CDDB\Control\2.0. Delete
this key.
Open iTunes and insert the CD. iTunes should now be
able to connect to CDDB again—at least, until it
forgets again later...
If necessary, reenable your proxy settings.
Microsoft —Tim Jarrett @ 2/12/04; 8:59:45 AM Discuss
Comment (0) Cosmos [#]
Cheers.
Tom W.
Other OS
I followed this exactly and it didn't work!
When I put in a CD and click on Get CD Track Names the "Accessing Gracenote CDDB" box flashes up and then disappears and nothing happens!
Any suggestions???
Thanks,
Rach
Maybe you are looking for
-
To partition or not to partition: that is the question
I bought an external hard drive (1 TB) that I plan to use to back up my MacBook Pro by activating Time Machine. I also plan to use this new drive to back up 2 other external drives: a 150 GB drive with all my photos and a 500 GB drive with iMovies. S
-
Need help changing from SQL dbo to mdf file
My project was started using dbo is there a way to change this to an mdf without changing out the database.
-
Windows 7 Home Premium stops working with ADobe Create PDF
Windows 7 home premium after a year of working fine, today stopped working with create PDF printer. I print to the PDF printer, looks normal, but no file appears in my files of PDFs created on line. My laptop running Windows 7 Professional has had no
-
Hi everyone, I recently tried zeroing out an external HDD within Leopard but after waiting for Disk Utility to run its course for approx 11 hours, it ended in an error message. Frustrating but life goes on... Following that 1/2 day, I proceeded to re
-
is it possible to buy an apple monitor for a mac book pro version 10.7.5 with Software Mac OS X Lion 10.7.5