Rename column in VIEW
When creating views, we can change the column names of tables, which is based view. I would like to know, how it has a purpose of the SECURITY. I need yours opinion or example on this question. Thanks.
Hi,
Views can enforce security when users have privileges on a view, but do not have privileges on the base table(s) (that is, the table(s) referenced in the CREATE VIEW statement.
For example, say only a few users (in a role called sepcial_users) are allowed to see the sal column of the scott.emp table. All users should be allowed to see the other columns of scott.emp.
In that case, you might create a view like this:
CREATE OR REPLACE VIEW emp_public
AS
SELECT empno, ename, job, mgr, hiredate, comm, deptno -- All columns EXCEPT sal
FROM scott.emp;
GRANT SELECT ON emp_public TO PUBLIC;
GRANT SELECT ON scott.emp TO special_users;Now, everybody on the system can query the view emp_public, which is just like scott.emp except that emp_public does not have a sal column.
Here's another example. Say each Oracle user who is in the scottt.emp table (that is, whose user name is the same as emp.ename) should be allowed to see sals in his own department. Anyone, including users who are not in the emp table, is allowed to see all the other columns. Here's one way to do that with a view:
CREATE OR REPLACE VIEW emp_public
AS
SELECT empno, ename, job, mgr, hiredate
, CASE
WHEN deptno IN ( SELECT deptno
FROM scott.emp
WHERE ename = USER
THEN sal
ELSE NULL -- Default, but it doesn't hurt to say it
END AS sal
, comm, deptno
FROM scott.emp;This is kind of like how the data dictionary views work.
Views that start with DBA_ have no security built into them. For example, DBA_TABLES has information about all tables in the database. Security has to be handled by grants, which is why (usually) only a view people are allowed to use it.
Views that start with ALL_ have some security built into them. Everyone is allowed to use ALL_TABLES, but the built-in security makes the view only include a fraction of the rows that are in DBA_TABLES.
Views that start with USER_ have even tighter security built into them. Everyone is allowed to use USER_TABLES, but everyone sees something different (that is, only their own tables) when they use it.
Similar Messages
-
Rename columns of list created by external content type in share point 2010
Hi,
I want to rename columns of list created by external content type.
Please help to solve the issue.
Thanks in advance!
Regards
RajniHi,
Steps to rename column name:
Open external content type in SharePoint designer
click on “Operations Design View” from ribbon
select corresponding external content type operations
click on edit operation from ribbon
click next button to get the Return parameter configuration page
select the parameter and change the display name from the properties
Anandhan.S Remember to 'mark or propose as answer' or 'vote as helpful' as appropriate. -
Rename columns in Presentaion Layer
Hi,
I need to change the column names in the Presentaion Layer. I need only the beginning of the word to be uppercase. Do I have to go to BMM layer and use the rename wizard and get all the columns again to presentation layer. We have a lot of columns so manually doing it would be very time consuming. I am trying to do in Presenation Layer itself using Rename wizard but somehow the 'next' field is not highlighted to go to the next step. Any suggestions? Also if I change any column name in presentation layer manually do I also have to chnage the name in BMM layer as well.Hi,
Keeping the column names consistent in BMM and presntation layer is best suggested as diffrent names in both the layers can lead to confusion .As Aliastair suggested if you rename in presentation layer then it will create aliases to Old names,If someone delete that alias then you will get view display error in report.So follow a simple approach and keep names consistent in both the layesr unless and until its very urgent to rename columns in presentation layer.
Thanks
Sandeep
Edited by: Sandeep Saini on 23-Jul-2010 08:34 -
Can i rename column name of a table. If so how to do it????
before 9i
Renaming a column in table:
==========================
This is possible by updating the "name" column of the col$. To reflect this
change in the system views, run catalog.sql and catproc.sql.
Here is an example:
SQL> create table test(
x number,
y varchar2(10),
z varchar2(10));
SQL> insert into test values (12,'Child','BLUE');
SQL> insert into test values (34,'Mens','BROWN');
If you wanted to rename column "x" as column "x1" then do the following.
The first step is to identify the object number for the table (as SYS):
SQL> select obj# from obj$
where name='TEST' and owner#=9;
OBJ#
======
58217
Now identify the column numbers for the table:
SQL> select obj#, col#, name from col$ where obj#=58217;
OBJ# COL# NAME
58217 1 X
58217 2 Y
58217 3 Z
To change the name, a simple update statement will suffice:
update col$ set name='X1'
where obj#=58217 and col#=1;
To reflect the change in system views, run catalog and catproc (unix) eg:
svrmgr> @$ORACLE_HOME/rdbms/admin/catalog
svrmgr> @$ORACLE_HOME/rdbms/admin/catproc
Now when a describe of the table is done:
SQL> desc test;
Name Null ? Type
X1 NUMBER
Y VARCHAR2(10)
Z VARCHAR2(10)
Similarly, selecting from the table and querying views such as
DBA_TAB_COLUMNS shows the new column name.
NOTE: Before changing column names, drop any indexes,
foreign keys and primary constraints that might be on
the column. These can be re-created later. -
Calculated column of a request from Column Selector View.
hi,
A user wants to select the calculated column of a request from Column Selector View.
But he is able to select only those columns which are available in Selection Pane.
How can he fulfill this requestHi,
Take a column in your request criteria and change the name of the column and forumala to f(x)=qty* amount which is your calculated column and using column selector use this column as your user wish too.
UPDATED POST
I dont know how your proceeding,the solution i gave will definately work .Here are the steps
1)pull a column into the request criteria
2)rename the name of the column
3)go to formula in f(x) change according to your requirement for example:- quantity*unitprice
4) run the report and in results you would see the column.
5)From compound layout select column selector and see what you want is getting displayed.
Hope helps you.Award points.
Cheers,
KK
Edited by: Kranthi on Jan 19, 2011 7:23 AM -
Error while renaming column in Apex 3.2.1
Hi,
I am getting the following error while renaming column in Oracle Apex 3.2.1 through SQL workshop:
"ORA-24344: success with compilation error"
Interestingly, it only gives an error when I rename the column again to its original name. For example, if I renaming the column X to X1 (no problem) but renaming back to X, I get this error. Same is true for X to X1 to X2 without any issues but renaming back from X2 to either X1 or X, I get the same error.
Any insight into this issue would be very helpful and greatly appreciated.
Thanks,
MilaanI've moved a step ahead, getting the new apex screen at http://127.0.0.1:8080/apex/ and can also login to my application. However there is no image for Application Express on http://127.0.0.1:8080/apex/ and I cannot click on the Login button. Hitting http://127.0.0.1:8080/i/ does list down the images. Any clue on what could be the problem?
For others reference: I'm not sure what was wrong, but I tried the entire steps again, with the 2 changes: shutdown the listener and job process ( in step 3.1) before running 'apexins' and second that I installed on SYSAUX and not USERS (in step 4)
1. Downloaded apex_3.2.1.zip to C:\Software
2. unzip apex_3.2.1.zip to C:\Software\apex
3. started command prompt and set these variables
set ORACLE_HOME=C:\oraclexe\app\oracle\product\10.2.0\server
set ORACLE_SID=xe
set ORACLE_PATH=C:\oraclexe\app\oracle\product\10.2.0\server\bin
set LD_LIBRARY_PATH=C:\oraclexe\app\oracle\product\10.2.0\server\lib
3.1 Shutdown the listener and job services
4.
sqlplus /nolog
CONNECT SYS as SYSDBA
@apexins SYSAUX SYSAUX TEMP /i/
5.
sqlplus /nolog
CONNECT SYS as SYSDBA
@apxchpwd
6.
Stopped and Started the Database, also the listener and job processes
7.
sqlplus /nolog
connect sys as sysdba
@apxldimg.sql c:\software
8.
sqlplus /nolog
connect sys as sysdba
exec dbms_xdb.setListenerLocalAccess (l_access => FALSE); -
How to Use Column Selector View in Reports
Hi all,
Can someone please advise on how to use the column selector view in CROMD's reporting tool?
Whenever I add a Column Selector view, and check the Enable checkbox of a certain column, a message appears "Click the columns in the selection pane to add more choices". However there is no selection pane, and the only thing I can do within the column is input a column label.
Am I missing any crucial steps here?
Thanks.Hi,
Choose a column as column selector by enabling the check box and click the columns that has to get into column selector in the left navigation.
On click the columns would get in one by one. After that field that you choose would be displayed in the position of the column in the report table
Typically the purpose is something like this. If you want to dynamically change the first field say by Account Type, Account Region, Account Status and see the revenue then it can be used
-- Venky CRMIT -
Hi Guys,
I want to rename the column name of a table. Lets say I have table employee:
SQL> desc emp;
Name Null? Type
EMPNO NOT NULL NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)
STARS VARCHAR2(8)
I want to change the name of the cloumn name of ENAME to EMPNAME so that structure looks like this:
SQL> desc emp;
Name Null? Type
EMPNO NOT NULL NUMBER(4)
EMPNAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)
STARS VARCHAR2(8)
Can anyone tell me any statement or way to solve this problem. Please keep in mind that I will not delete the table or create another column name of EMPNAME and copy the data from ENAME to EMPNAME.
Regds,
DebabrataALTER TABLE DEPT2 RENAME COLUMN ENAME TO EMPNAME
Regards,
Raj -
How to rename column name of table?
Hello...
How to rename column name of table?
The column have data.
Thanks.
Martonio.The following should work in 9i release 2 and above.
SQL> create table mytable(col1 varchar2(2),
2 col2 date);
Table created.
SQL> insert into mytable values('t1',sysdate);
1 row created.
SQL> select * from mytable;
CO COL2
t1 30-NOV-04
1 row selected.
SQL> desc mytable
Name Null? Type
COL1 VARCHAR2(2)
COL2 DATE
SQL> alter table mytable rename column col2 to mydate;
Table altered.
SQL> desc mytable
Name Null? Type
COL1 VARCHAR2(2)
MYDATE DATE
SQL> select * from mytable;
CO MYDATE
t1 30-NOV-04
1 row selected.
SQL> disconnect
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.3.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.3.0 - Productionhttp://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/wnsql.htm#972698 -
Thumbnails in Column & List views
My Finder (v10.4.5) mostly does NOT show the thumbnails of my JPGs in Column & List views, unless those JPGs were created on my computer (Tiger 10.4.6).
I got it to finally show the thumbnails in Icon view (View > Show View Options > Show Icon Preview + All windows), but I also want to see the little thumbnails in Column and List Views. Anyone know how to do this.
NOTE: those same JPGs that don't get the thumbnails on my MAC, do show thumbnails on my crappy-*** Windows ME Dell's Explorer.
By the way, (different Question) is there a way I can set up to be notified via email when somebody replies to my question here in this discussion area?
Thanks,
Ted
PowerBook G4 Mac OS X (10.4.6) 2 GB DDR SDRAM
PowerBook G4 Mac OS X (10.4.6) 2 GB DDR SDRAMWith a Finder window open in Column view, when you go to the View menu item and select Show View Options there are not any "Show Icons" or "Show preview column" selections for me to check.
That is very very strange. Try opening a Finder window, have it in icon view, and the bring up Show View Options, I presume you are getting the options? Now go to View (don't close the options window!) and change to List. A different set of options should appear in the options window, and if you then change the view to Column what happens to the options window?
If you want to see thumbnails for files that don't have them you either use Column view with a preview column set to display icons, or put the folder in Icon view. The Mac OS Finder does not create thumbnail.db files, as does Windows (I believe many Linux window managers create analogous files). Instead the Finder either reads the thumb from the resource fork of the file (most--maybe all--Mac graphics programs have always had the ability to create custom icons that are a part of the file), or else it will create a thumb "on the fly" for files that don't have them if told to do so in Icon and Column views. In List view it will display a small icon if the file has one, otherwise it just uses the generic icon. Windows is incapable of reading Mac resource forks, where the custom icon is for files created on a Mac, and the Finder is incapable of reading Windows thumbnail.db files. Any file you create on your Mac with a Mac graphics program will have a custom icon, if you set the preference of the program to save the file that way. This includes Image Capture, if you use it to transfer files from your camera. Images you get from a Windows or Linux box, or download from the Internet, do not have a resource fork and so do not have a custom icon.
Francine
Francine
Schwieder -
Can we rename column in Oracle 9i?
Thanks,
AlexI don't think it should be that complicated unless you have any contraints to it. Do you have any foreign keys that are referencing to this particular table ? Also let me know what syntax are you using for dropping the column ?
Also look at the following example, try these things on some test/dummt table first.
Dropping a Column: Example
===========================
This statement illustrates the drop_column_clause with CASCADE CONSTRAINTS. Assume table t1 is created as follows:
CREATE TABLE t1 (
pk NUMBER PRIMARY KEY,
fk NUMBER,
c1 NUMBER,
c2 NUMBER,
CONSTRAINT ri FOREIGN KEY (fk) REFERENCES t1,
CONSTRAINT ck1 CHECK (pk > 0 and c1 > 0),
CONSTRAINT ck2 CHECK (c2 > 0)
An error will be returned for the following statements:
/* The next two statements return errors:
ALTER TABLE t1 DROP (pk); -- pk is a parent key
ALTER TABLE t1 DROP (c1); -- c1 is referenced by multicolumn
-- constraint ck1
Submitting the following statement drops column pk, the primary key constraint, the foreign key constraint, ri, and the check constraint, ck1:
ALTER TABLE t1 DROP (pk) CASCADE CONSTRAINTS;
If all columns referenced by the constraints defined on the dropped columns are also dropped, then CASCADE CONSTRAINTS is not required. For example, assuming that no other referential constraints from other tables refer to column pk, then it is valid to submit the following statement without the CASCADE CONSTRAINTS clause:
ALTER TABLE t1 DROP (pk, fk, c1);
Shalu -
I have tried in vain to rename a column in 8i. There are no good examples out there. Here's my code
SQL> DESC KKQA_CLINIC_CD
Name Null? Type
CLINIC_CD NOT NULL VARCHAR2(15)
REC_EFFENDDT NOT NULL DATE
REC_EFFDT NOT NULL DATE
IDX_NM VARCHAR2(60)
DEPT VARCHAR2(30)
SUBDEPT VARCHAR2(30)
CLINIC_CD_DESC VARCHAR2(150)
MIM_CODES_CLINIC VARCHAR2(1)
HOSPITAL_BASED VARCHAR2(15)
REG_SOURCE VARCHAR2(15)
SQL> ALTER TABLE KKQA_CLINIC_CD ADD (CLINIC_CD_EFFENDDT DATE);
Table altered.
SQL> UPDATE KKQA_CLINIC_CD SET CLINIC_CD_EFFENDDT=REC_EFFENDDT;
0 rows updated.
A second attempt to rename another col, yeilds error:
ALTER TABLE KKQA_CLINIC_CD SET CLINIC_CD_EFFDT=REC_EFFDT
ERROR at line 1:
ORA-02000: missing UNUSED keyword
I just can't seem to find any meaningful examples or substance on this problem particularly ora-02000
I have tried the "unused" keyword example, it basically deletes a col. Can someone help, I am thoroughly puzzled.Hi
Renaming a column is not supported in 8i.
Chris
PS: the syntax is "ALTER TABLE <table name> RENAME COLUMN <old column name> TO <new column name>" -
How to hide the Columns and Views for Login user in SharePoint 2013
Hi Friends,
How to hide the Columns and Views for Login user in SharePoint 2013? Is it possible using OOB features? If not possible how can we hide the Columns and Views for Login user?
Could you please help on this.
Thanks,
Tiru
TiruHello Tirupal,
There is no OOB way to do this.
Please check this codeplex solution to achieve the same.
https://sp2013columnpermission.codeplex.com/
My Blog- http://www.sharepoint-journey.com|
If a post answers your question, please click Mark As Answer on that post and Vote as Helpful -
Renaming columns resulting in breakage of already existing reports
Hi
We recently upgraded from 10g to 11g and we faced the following issue related to trailing spaces:
In 10g we had trailing spaces for few columns which accounts for say around 300 in number. After consistency check, these trailing spaces were shown as warnings in 10g and did not error out any reports. But in 11g, these trailing spaces were shown as errors and resulting in the breakage of already existing reports. To avoid this, we have to delete the trailing spaces along with the aliases. After this, the only process we are aware of, is to re-pull the renamed columns in the existing reports to make them error free. Now we have around 200 reports using these columns and it requires good amount of manual effort to go in. I would like to know, is there any better solution other than re-pulling these columns to keep the reports error free.
Any suggestions on this will be very helpful and greatly appreciated.
ThanksHi,
Refer
renaming presentation colums
Re: renaming using rename wizard.
Re: Renaming Business Model and Subject Area
Thanks
Deva
Edited by: Devarasu on Sep 27, 2011 5:27 PM -
Reorder columns in View Responses window
Can the columns in View Responses window be reordered?
If so, can it be done prior to all the responses being received?
How does the program determine the order for the columns? It is different from the tab order on the form.
ThanksYes, they can be reordered. Just select the column (where the column letters are) and drag it where you want it to go.
You can reorder the columns anytime you want. The default order is based on the order of the fields in the Design tab.
Randy
Maybe you are looking for
-
Can no longer find the NYTimes Reader
This is my first forum "involvement" so please bear with me. I saw the NYT Times Reader on the Apps Catalog in December, downloaded and used; it was wonderful. I had to reload my apps from the Palm site and everything came back excpet for NYTimes
-
My HP Officejet Pro 8600 is randomly printing coloring sheets most often during the night!
For about a month, my HP Officejet Pro 8600 is randomly printing coloring sheets, valentines, etc. Usually this is happening at night! The pages use a lot of ink! How can I get this to stop? Is this part of HP's eprint?? Help!
-
How do I build a user update page
I am trying to build a user update page that only the user can update if they have the correct username and password. I have tried a number of ways, but haven't come anywhere near to acheiving it. I am guessing I need to correctly construct the log i
-
My PSE will not read the raw files on my new Nikon D7100? Help?
I bought a new camera and shoot in the RAW format (nef) and I can not open the files to edit them. Please help?
-
Problems shutting down after installing 10.5.3 update?
Has anyone had any problems shutting down there IMac's after installing 10.5.3 update? I've tried shutting down twice and the image that appears when shutting down seems to go in an endless loop an doesn't shut down.