How to rename the column field names
hello guys,
i am retrieving my field names from the database and i view it thru HTML.
When i view it,the column names are those which are given while creating tables.
Ex..
fname,lname,phno,
i want it as First Name,Last Name,Phone Number etc ...<%
try {
stmt = con.createStatement();
sql="SELECT fname, lname, gender, email,phnum,sartweblink, sartaddress1, sartaddress2,sartcounty, country,sartpostcode,dob FROM Artist where artistid='" + sartid + "'";
rs=stmt.executeQuery(sql);
rsmd=rs.getMetaData();
int colcount=rsmd.getColumnCount();
for(i=1;i<=colcount;i++)
%>
<tr><td width="200"><FONT face=verdana size=2><%= rsmd.getColumnName(i)%>
<%
%> </FONT>
<font face=verdana size=2>
<% while(rs.next())
fname=rs.getString("fname");
lname=rs.getString("lname");
gender=rs.getString("gender");
email=rs.getString("email");
phnum=rs.getInt("phnum");
weblink=rs.getString("sartweblink");
address1=rs.getString("sartaddress1");
address2=rs.getString("sartaddress2");
county=rs.getString("sartcounty");
country=rs.getString("country");
postcode=rs.getString("sartpostcode");
dob=rs.getString("dob");
%>i make use of metadata..
can anyone tell me how to do this..
thanks in advance
why not use alias:
your query is
SELECT fname, lname, gender, email
and will be:
SELECT fname FIRSTNAME, lname LASTNAME, gender GENDER, email EMAILADDRESS
Similar Messages
-
How to rename the column name in oracle 8i?
hi,
Does anyone know how to rename the column name in oracle 8i?My method was drop the relationship key first then delete the old column,finally add the new column.
Thanks for your replay.
jingThere is no facilty to rename a column name in Oracle 8i. This is possible from Oracle 9.2 version onwards.
For you task one example given below.
Example:-
Already existed table is ITEMS
columns in ITEMS are ITID, ITEMNAME.
But instead of ITID I want ITEMID.
Solution:-
step 1 :- create table items_dup
as select itid itemid, itemname from items;
step 2 :- drop table items;
step 3 :- rename items_dup to items;
Result:-
ITEMS table contains columns ITEMID, ITEMNAME -
How to change the column header name dynamically based on sysdate
Post Author: senthi_gokul
CA Forum: WebIntelligence Reporting
Dear All,
i have designed some reports. i would like to change the column header dynamically based on sysdate. up to 24 months. can u help me, which add month function using the universe. i dont know if-then-else function is having the universe tool or not?Post Author: prasingh
CA Forum: WebIntelligence Reporting
Are you saying you are not able to create an object by value (select: statement) as sysdate and put it onto the headers of your report? You can use the add_months() function on the object to add the numbers of months you wish.
Please let me knnow for more.. You can get in touch with me on [email protected] for quick reply. -
Renaming the Custom tab name incorporated by EEWB
Dear All
How to rename the Custom tab name incorporated by EEWB in a txn ?
Please guide me .
Thanks
MoniHi Monirujjaman,
As far as I know you can not rename the custom tab once you have created it using EEWB. Alternatively, you can do one thing. Copy all the code written for the enhancement somewhere. Run the wizard again, it asks you for the Extension Title. Give the required title and specify the fields that you want. In effect you will have to create the project again.
After creating the project, paste the code again at the desired place.
<b>Reward points if it helps.</b> -
Reg:FCC to ignore the last field name
Hi...
I am using FCC in the reciver file adapter.
the output structure is like
94,ESSAR,,,,,,,D,0000100226,10000,12/13/1 KURLA EAST,MUMBAI,,400025,006398765432,,2009-03-24 00:00:00.0,0000100226,20202789,,,,SUCCESS,,
/home/corpuser/Disbursement/DD
I am achieving the above structure. But in that i dont want the last field name "/home/corpuser/Disbursement/DD".
Can you please tell how to ignore the last field name in the receiver file adapter using FCC.
Thanks & Regards,
Leela94,ESSAR,,,,,,,D,0000100226,10000,12/13/1 KURLA EAST,MUMBAI,,400025,006398765432,,2009-03-24 00:00:00.0,0000100226,20202789,,,,SUCCESS,,
/home/corpuser/Disbursement/DD
I am achieving the above structure. But in that i dont want the last field name "/home/corpuser/Disbursement/DD".
Can you please tell how to ignore the last field name in the receiver file adapter using FCC.
Completely with Jai on that.
Dont do that mapping itself. Handle such conditions in your mapping.
Is there any specific reason why you can do so? -
How to find the internal(default name) of the fields once renamed?
Hi,
Is it possible to find what default fields are used(renamed) and new custom fields created from field configuration?
thanks,
mm, you can find it out from field management screen for a particular object (e.g. Admin > Application Customization > Activity > Activity Field Setup). Click on the Rename button, and in the resulting screen the 2nd column “Default Name” will contain “<Custom Field>” for the new field were as for the OOB field it will contain the OOB field name.
-
How to rename a column name in a table? Thanks first!
I tried to drop a column age from table student by writing the
following in the sql plus environment as :
SQL> alter table student drop column age ;
but I found the following error
ORA-00905: 缺少关键字 (Lack of Key word)
I have oracle enterprise edition 8.0.5 installed at windows 2000
thank you
And I want to know how to rename a column name in a table?
thanksIn Oracle 8i, your syntax would have worked. However, if I
recall correctly, in Oracle 8.0, you can't rename or drop a
column directly. One way to get around that problem is to
create another table based on a select statement from your
original table, providing the new column name as an alias if you
want to change the column name, or omitting that column from the
select statement if you just want to drop it. Then drop the
original table. Then re-create the original table based on a
select statement from the other table. Then you can drop the
other table. Here is an example:
CREATE TABLE temporary_table_name
AS
SELECT age AS new_column_name,
other_columns
FROM student
DROP TABLE student
CREATE TABLE student
AS
SELECT *
FROM temporary_table_name
DROP TABLE temporary_table_name
Something that you need to consider before doing this is
dependencies. You need to make a list of all your dependecies
before you do this, so that you can re-create them afterwards.
If there are a lot of them, it might be worthwhile to do
something else, like creating a view with an alias for the
column or just providing an alias in a select. It depends on
what you need the different column name for. -
How to use the column names generated from Dynamic SQL
Hi,
I have a problem with Dynamic SQL.
I have written an SQL which will dynamically generate the Select statement with from and where clause in it.
But that select statement when executed will get me hundreds of rows and i want to insert each row separately into one more table.
For that i have used a ref cursor to open and insert the table.
In the select list the column names will also be as follows: COLUMN1, COLUMN2, COLUMN3,....COLUMNn
Please find below the sample code:
TYPE ref_csr IS REF CURSOR;
insert_csr ref_csr;
v_select VARCHAR2 (4000) := NULL;
v_table VARCHAR2 (4000) := NULL;
v_where VARCHAR2 (4000) := NULL;
v_ins_tab VARCHAR2 (4000) := NULL;
v_insert VARCHAR2 (4000) := NULL;
v_ins_query VARCHAR2 (4000) := NULL;
OPEN insert_csr FOR CASE
WHEN v_where IS NOT NULL
THEN 'SELECT '
|| v_select
|| ' FROM '
|| v_table
|| v_where
|| ';'
ELSE 'SELECT ' || v_select || ' FROM ' || v_table || ';'
END;
LOOP
v_ins_query :=
'INSERT INTO '
|| v_ins_tab
|| '('
|| v_insert
|| ') VALUES ('
|| How to fetch the column names here
|| ');';
EXECUTE IMMEDIATE v_ins_query;
END LOOP;
Please help me out with the above problem.
Edited by: kumar0828 on Feb 7, 2013 10:40 PM
Edited by: kumar0828 on Feb 7, 2013 10:42 PM>
I Built the statement as required but i need the column list because the first column value of each row should be inserted into one more table.
So i was asking how to fetch the column list in a ref cursor so that value can be inserted in one more table.
>
Then add a RETURNING INTO clause to the query to have Oracle return the first column values into a collection.
See the PL/SQL Language doc
http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/returninginto_clause.htm#sthref2307 -
Hi,
I am using OCCI to interact with DB through code, which means I am writing a vc++ file to interact with Data Base and execute the Stored Procedure which I am calling from the C++ Code. And also displaying the output of the Stored Procedures to the Front End. I am succeeded in this, but now I should be able to display the Column names of the output to Front End. Can any one help me on this.
Example:
Sno | Sname
------- |-------------
1 ABC
2 DEF
I am getting (1,ABC) and (2,DEF) as the output of the Stored Procedure but I need the Column names also to display. How to get them.
Thanks in Advance..:)Look at Re: exporting csv via pl/sql - select statement?
It has an example how to extract the column name from a cursor. You have to check, whether you can use DBMS_SQL.DESCRIBE_COLUMNS
Your procedure might need another out parameter, that returns the column names , e.g. as comma separated list or as varray. -
How to change or rename the logical system name T90CLNT090 IN BI 7
HI Expert's,
i am really digging for the solution of changing or renaming the logical system name technical name T90CLNT090.
in our company we are using ecc5.0 with bi 3.5 and ecc6 with bi 7. In BW 3.5 having a connection with R/3 and the technical name of the myself bw source system(logical system) is T90CLNT090.
In bi 7 also the logical system name is same as T90CLNT090. Because of the same system name(Logical name) it is not active in BI7 and also it's giving error when i am activating the DSO Object as Transfer structure prefix for source system T90CLNT090 is not defined.
because of this i am not able to create the source system between r/3 also.
so how to change this source system name for T90CLNT090.
regards
harikrishna NHi,
Pls follow this OSS note : 325525.
Note 325525 - Copying and renaming systems in a BW environment
Summary
Symptom WARNING: THIS NOTE HAS BEEN REPLACED. FOR MORE CURRENT AND MORE COMPREHENSIVE INFORMATION SEE NEW NOTE 886102.
You want to copy and or rename one or more systems (database or client copy). One or more of the systems is a BW system or is connected to a BW system.
Caution: This note only deals with problems that occur in the BW source system connections. Other problems that occur in the BW environment (indexes) are NOT dealt with. See URL http://www.service.sap.com/bw --> Services & Implementation --> System copy & Migration.
Other terms BW, source system, OLTP, database copy, client copy, system infrastructure, transport system, connections, RFC connection, trfc, transfer structure, IDoc, ALE customizing, logical system name, system changeability, renaming systems, system copy
Solution Several scenarios are possible in this environment. Find the scenario relevant to your situation below and execute the steps listed or read the note(s) specified:
Scenario 1) You do not want to copy a system but only want to rename one (changing a logical system name).
Solution scenario 1): Execute Transaction BDLS both in the client to be renamed and in the connected BWs or BW source systems. To do this, see Notes 121163 and 369758.
Check the RFC destinations in all connected BWs/BW source systems as described in Note 524554.
Reactivate all partner agreements that carry the new logical system name after renaming.
Scenario 2) You want to copy the entire system infrastructure connected by the BW source system connections (that means the entire system group) by a database copy. SAP recommends this procedure for copying systems.
Solution scenario 2):
If you want to rename one or more of the copied systems, then execute Transaction BDLS both in the client you wish to rename and in all the connected BW and BW source systems. See Note 121163.
Make sure that an RFC destination exists with the new logical name in every connected BW or BW source system.
Reactivate all partner agreements that carry the new logical system name after renaming.
Change the hosts in the appropriate RFC destinations so that they refer to the correct computer. For this, see Note 524554.
Scenario 3) You want to copy a single BW system of the group by database copy.
Scenario 3)a) You only want to exchange the hardware of your system but do not want to rename the system.
Solution scenario 3)a): You do not need to execute follow-up work regarding the system connections, except for adjusting the IP address in the RFC destinations of the connected system.
Scenario 3)b) You want to keep the original system of the copy so that you have two systems after copying.
Solution scenario 3)b): See Note 184754.
Scenario 4) You want to copy a single source system of the group by database copy.
Scenario 4)a) You only want to exchange the hardware of your system but do not want to rename the system.
Solution scenario 4)a): You do not need to execute follow-up work regarding the system connections, except for adjusting the IP address in the RFC destinations of the connected system.
Scenario 4)b) You want to keep the original system of the copy so that you have two systems after copying.
Solution scenario 4)b): See Note 184322.
Scenario 5) You want to import a client copy in a source system.
Solution scenario 5): See Note 325470.
Thanks & Regards,
Suchitra.V -
How to get the column names of the table into the Dashboard prompt
how to get the column names of the table into the Dashboard prompt
Thanks & Regards
Kishore PHey john,
My requirement is as follows
I have created a Rank for Total sales by Region wise i.e RANK(SUM(Dollars By Region)) in a pivot table.
My pivot table looks like this
COLUMN SELECTOR: TOTAL US , REGION , DISTRICT , MARKET
---------------------------------------------------- JAN 2009 FEB 2009 MAR 2009
RANK REGION DOLLARS DOLLARS DOLLARS DOLLARS
1 CENTRAL 10 20 30 40
2 SOUTHERN 10 30 30 70
3 EASTERN 20 20 20 60
4 WESTERN 10 20 30 40
When i select the District in column selector
Report has to display rank based on Total Sales by District. i.e
------------------------------------------------- JAN 2009 FEB 2009 MAR 2009
RANK DISTRICT DOLLARS DOLLARS DOLLARS DOLLARS
for this i need to change the fx of rank i.e RANK(SUM(Dollars By Region)) to RANK(SUM(Dollars By District)) and fx of Region i.e Markets.Region to Markets.District dynamically.
so , i need to capture column name of the value selected from the column selector and dynamically i need to update the fx 0f RANK & fx of region.
do you have any solution for this?
http://rapidshare.com/files/402337112/Presentation1.jpg.html
Thanks & Regards
Edited by: Kishore P on Jun 24, 2010 7:24 PM
Edited by: Kishore P on Jun 24, 2010 7:28 PM -
How to rename the SharePoint Document Library existing file name using Web service
Hi,
How to rename the SharePoint Document Library existing file name using SharePoint Web service.
Is it possible. How could i do it?
Thanks & Regards
Poomani SankaranHi,
Lists.UpdateListItems Method
would be helpful for your requirement.
Here is a blog with code demo for your reference:
http://blogs.msdn.com/b/knowledgecast/archive/2009/05/20/moss-using-the-list-web-service-to-rename-a-file.aspx
Best regards,
Patrick
Patrick Liang
TechNet Community Support -
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 Rename the technical name and description of an infocube?
Hi,
How to Rename the technical name and description of an infocube?
Thanx in advance,
Ravi.Ravi,
You cant change the Technical name of the cube but you can change the description of the Cube. If you want to have a Cube with the same properties and with different Techname and Description better you do copy from the base cube and rename as per your requirement.
Regards,
Gattu. -
Rename the column names in Embedded BPM Worklist
Hi,
I have embedded the BPM worklist in ADF Page.
My requirement is to rename the column names in the task list.
For example, the column 'state' should be renamed as 'Status' and the column 'from User' should be renamed as 'From'.
Is there any possibility to achieve this? Please let me know.
Regards,
TamilSee if the solution in this post helps -
Re: Customize workspaceAlso , its better to post these questions in the BPM forum -
Business Process Management SuiteEdited by: Sudipto Desmukh on Apr 27, 2012 8:57 AM
Maybe you are looking for
-
I cannot upgrade to firefox 4, 5 or 6. I get the crash reporter Every Single time I attempt to restart. I go back to 3.6 and it works fine. Until firefox decides to automatically upgrade me to 3.6XX. Then it loses ALL my bookmarks AND will not let me
-
How to edit text in a form edited in LCD / Acrobat 9?
So I have a few minor edits to a form that was created in LCD 9 and Acrobat Pro 9. Apparently this seemingly simple task is now impossible with the latest versions. When I try to edit it in Acrobat XI I get the message "This form cannot be edited i
-
Hi...gurus while posting sales invoice ( T-code f-22), accrued error Cost center 1111111 in controlling area xxx is locked for revenue postings on 15.05.2011.
-
OfficeJet 4630 Defaults to Network Fax when user has selected Network Printer Instead on WIN XP
Hi, just installed the OJ4630 and selected the "Network Printer" as the default. When choosing to print an MS Word document in "My Documents" the "Network Printer" correctly appears as the default. But when choosing to print a picture in "My Pictur
-
How to set the working directory for reports in linux
Hi All, Can you anyone help me to set the working directory for oracle application server 10g reports? I am using RHEL4 and AS10g. Actually i want to run my reports from my define working directory. How can I do this? Thanks in advance Arif