Permissions to update certain columns only in SQL 2005 ?

Is there a way to grant allow a user or role to update certain columns within a table?...or recommended way like involve creating a View or something else?
Thanks in advance.

GRANT|REVOKE|DENY <permission> ON <schema>.<table>(<column>) TO [User];
Please click "Propose
As Answer" if a post solves your problem, or "Vote
As Helpful" if a post has been useful to you

Similar Messages

  • What property/preference sets block property "Update changed columns only"

    Hi, we are wondering how Designer (latest version 10.1.2.4) desides when it generates a form with block property "Update changed columns only" set to Yes.
    Under some cricumstances this property is No in the generated .fmb
    We checked the object library, but the .olb has this property set to No, so Designer overrules it.
    Our goal is to generate all blocks with the "Update changed columsn only" set to No, because we ran in a forms bug that it can't handle Insert statements on blocks with this property set to Yes (ORA-01036). This bug only occurs in the latest forms version 10.1.2.3
    Hope anyone can help to force this property to be No when we want to achieve 100% generation from Designer.
    Kind Regards
    Auke Quist
    Edited by: aukequist on Oct 13, 2008 8:49 PM

    I think that's not possible in designer. You could define a block with this property set in the template form or in the object library. The use this block use the template/library object property in designer.
    Regards Erik

  • Update Changed Columns Only

    How to generate a form with a data block with the "Update Changed Columns Only" property set to "yes" from Designer 9.0.4.6? Is there an equivalent for this property in Designer? Or do I have to create a library object which I then have to subclass from?
    Thanks in advance
    Gerald

    Hi Gerald
    When you look in the help of Designer (Generated data block properties (implicit/explicit)), the Forms property "Update Changed Columns Only" is not mentioned. That implies that there is no property/preference in Desinger that will influence the value of this Forms property.
    So yes, you have to create a library object and subclass from it.
    Another solution is to work with the Forms built-ins GET_BLOCK_PROPERTY and SET_BLOCK_PROPERTY in a Pre_Form trigger, but I personally would prefer a new library object for this.
    Kind regards,
    Lennart de Vos

  • Capture change on certain columns only in ODI,

    Hi experts:
    Need you help to suggest the proper way to meet the following requirements.
    Requirements”
    (a) Source– Oracle 11g, need to track changes to 2 columns only - [Table A, Column A1] & [Table B, Column B1]. These 2 columns may be changed many times during a day.
    (b) Every 4 hours, based on what are captured from (a), find out the distinct rows changed (i.e. based on primary keys of Table A, Table B) , and only ship the most current row images for these rows to target
    (c) Target – Sybase, meet to perform transformations on the 2 column values (i.e. Column A1, Column B1) to map to target table [Table C, Column C1]
    From my limited understanding, I think trigger-based CDC is to be used. However, not sure how to do this , especially (a) and (b). For example, where do we configure trigger logic to achieve (a) from the ODI studio ?
    Your help is much appreciated.
    Regards

    Hi,
    887999 wrote:
    Hi experts:
    Need you help to suggest the proper way to meet the following requirements.
    Requirements”
    (a) Source– Oracle 11g, need to track changes to 2 columns only - [Table A, Column A1] & [Table B, Column B1]. These 2 columns may be changed many times during a day.
    (b) Every 4 hours, based on what are captured from (a), find out the distinct rows changed (i.e. based on primary keys of Table A, Table B) , and only ship the most current row images for these rows to target-- Check out the JV$ and JVD$ views that are created when you start the ODI Journal, they do exactly what you have described in (b) - You get the latest update based on the SCN number when they occured.
    (c) Target – Sybase, meet to perform transformations on the 2 column values (i.e. Column A1, Column B1) to map to target table [Table C, Column C1]To be honest the target is irrelvant, you just need to decide if you want to do the transformation on the source on the way out of oracle (set staging area different to target and choose your Source logical schema).
    I would design an interface that uses Table A and Table B as the sources, do the join , transformation on Oracle and map to Target Table C, choose your staging area based on where you want the joins / transformation to take place, pick a Knowlege module based on Technology and how you want to update the target.
    >
    From my limited understanding, I think trigger-based CDC is to be used. However, not sure how to do this , especially (a) and (b). For example, where do we configure trigger logic to achieve (a) from the ODI studio ?You can use Synchronous (Trigger based) or Asynchronous (Logminer / Streams based) to perform what you want, see this nice guide on setting up CDC and consuming the changes :
    http://soainfrastructure.blogspot.ie/2009/02/setting-up-oracle-data-integrator-odi.html
    If your friendly with your source system DBA then I prefer Asynchronous CDC , its less intrusive than triggers, it does however need a bit of knowledge on how to monitor it, Metalink / Support has plenty of info.
    >
    Your help is much appreciated.You welcome, have a play with it in a demo environment and get a feel for how you consume the captured changes (Lock Subscriber, Extend Window, Consume, Purge + Unlock, Loop) etc.
    The guide I've linked to uses an ODI WAit for Data to trigger the consumption of changes, you have stated every 4 hours so I would skip the ODI wait for data and simply schedule your package to run every 4 hours.

  • Block based on Stored Procedure - Update Changed columns only

    If I were to base a block on stored procedures that includes an Update procedure but only update SOME of the updateable columns, what happens?
    Does the Form send to server ONLY
    1) The rows that were updated
    2) The columns that updated
    3) All columns in the row being updated regardless of whether they were updated
    Is the correct answer 1) + 2) or 1) + 3)
    Please help.
    Thanks

    Hello,
    <p>There is another example here</p>
    Francois

  • How can I change the output for certain columns only?

    I am finding it hard to explain my issue , as I am very green when it comes to database, but I will try my best.
    I am writing a script that will query a database and output 5 columns, the first and last name of a student, the last name of their adviser, their enrollment status, and how many years they have been enrolled.
    I have the student's enrollment date and graduation date stored, however not all students have graduated, so that field is null for some students.
    my question is, how can I use their enrollment status of graduated to change the calculation of how long they were enrolled for.
    This is what I have so far :
    SELECT
         STUDENTS.NameFirstS,
         STUDENTS.NameLastS,
         STUDENTS.EnrollStatus,
         TRUNC((MONTHS_BETWEEN(SYSDATE, STUDENTS.EnrollDate))/12) as Years,
         FACULTY.NameLast
    FROM
         STUDENTS,
         FACULTY
    WHERE
         STUDENTS.ThesisAdvisor = FACULTY.FacultyId
    I'm not sure where to go form here, like I said, I am very new. Thank You in advance!

    Thank you for the warm welcome :)
    My Oracle Version is 11.2.0.1.0
    Here is the create statement I used for the table.
    CREATE TABLE STUDENTS
    (StudentId NUMBER(9)                                                             
    ,NameFirstS VARCHAR(255) NOT NULL                                             
    ,NameMiddleS VARCHAR(255)                                                       
    ,NameLastS VARCHAR(255) NOT NULL                                             
    ,PhoneHome NUMBER(10) NOT NULL                                                  
    ,PhoneOffice NUMBER(10)                                                            
    ,HomeCity VARCHAR(255) NOT NULL                                         
    ,HomeState VARCHAR(255) NOT NULL                                             
    ,HomeStreet VARCHAR(255) NOT NULL                                             
    ,EnrollDate DATE NOT NULL                                                       
    ,EnrollStatus VARCHAR(255) NOT NULL                                             
    ,StudyArea VARCHAR(255) NOT NULL                                             
    ,SpouseNameFirst VARCHAR(255)                                                  
    ,SpouseNameLast VARCHAR(255)                                                  
    ,ThesisTitle VARCHAR(255) NOT NULL                                             
    ,ThesisInternational VARCHAR(255)                                              
    ,ConvocationDate DATE                                                            
    ,ThesisAdvisor NUMBER(9) NOT NULL                                             
    ,Mentor NUMBER(9) NOT NULL                                                       
    ,CONSTRAINT STUDENTS_pk PRIMARY KEY (StudentId)                              
    ,CONSTRAINT STUDENTS_Mentor_fk FOREIGN KEY (Mentor)                     
    REFERENCES FACULTY(FacultyId)                               
    ,CONSTRAINT STUDENTS_ThesisAdvisor_fk FOREIGN KEY (ThesisAdvisor)     
    REFERENCES FACULTY(FacultyId)                                                       
    And here is 2 inserts of random data
    INSERT INTO STUDENTS (StudentId, NameFirstS, NameMiddleS, NameLastS, PhoneHome, PhoneOffice, HomeCity, HomeState
    , HomeStreet, EnrollDate, EnrollStatus, StudyArea, ThesisTitle, ConvocationDate, ThesisAdvisor, Mentor)                               
    VALUES(778506631                                        
              , 'John'                                             
              , 'Jacob'                                        
              , 'Smith'                                             
              , 3125551234                                        
              , 5182293313                                        
              , 'Wilksbury'                                        
              , 'Texas'                                             
              , '14 Main Road'                                   
              , TO_DATE('04-SEP-2003', 'DD-MON-YYYY')          
              , 'Graduated'                                        
              , 'Physics'                                             
              , 'Why Move'                                        
              , TO_DATE('07-JUL-2008', 'DD-MON-YYYY')          
              , 157928743                                             
              , 997569876                                        
    INSERT INTO STUDENTS (StudentId, NameFirstS, NameLastS, PhoneHome, HomeCity, HomeState, HomeStreet
    , EnrollDate, EnrollStatus, StudyArea, SpouseNameFirst, SpouseNameLast, ThesisTitle, ThesisInternational, ThesisAdvisor, Mentor)
    VALUES(251321188                                             
              , 'Larry'                                             
              , 'Timsfield'                                        
              , 2815551200                                        
              , 'Johnsburg'                                        
              , 'Florida'                                             
              , '223 Route 54'                                   
              , TO_DATE('09-SEP-2010', 'DD-MON-YYYY')          
              , 'Full Time'                                        
              , 'Medicine'                                        
              , 'Wanda'                                             
              , 'Timsfield'                                        
              , 'Cut Me Mick'                                        
              , 'Yes'                                                  
              , 997569876                                             
              , 101325587                                             
    I don't know how to format them like you did in your reply, so they look like a quote, so I hope that just pasting them in is okay.

  • UPDATE multiple columns with conditional SET parameters

    I have a procedure that updates multiple columns of a table using the procedure's parameter. Is it possible to have one update statement with conditional SET parameter?
    CREATE TABLE TEMP
    (POL_NUM NUMBER,
    OED DATE,
    TERM NUMBER,
    TRANS_CD CHAR(2));
    INSERT INTO TEMP VALUES (1, '1 AUG 2009', 12, 'NB');
    INSERT INTO TEMP VALUES (2, '4 AUG 2009', 12, 'XL');
    INSERT INTO TEMP VALUES (3, '2 AUG 2009', 12, 'RN');
    COMMIT;
    CREATE OR REPLACE PROCEDURE TMP_PROC (
      pPOL_NUM NUMBER,
      pOED IN DATE,
      pTERM IN NUMBER,
      pTRANS_CD CHAR2)
    AS
    BEGIN
      IF pOED IS NOT NULL THEN
        UPDATE TEMP SET OED = pOED WHERE POL_NUM = pPOL_NUM;
      END IF;
      IF pTERM IS NOT NULL THEN
        UPDATE TEMP SET TERM = pTERM WHERE POL_NUM = pPOL_NUM;
      END IF;
      IF pTRAN_CD IS NOT NULL THEN
        UPDATE TEMP SET TRANS_CD = pTRANS_CD WHERE POL_NUM = pPOL_NUM;
      END IF;
      COMMIT;
    EXCEPTION
      WHEN OTHERS THEN
         NULL;
    END;Is it possible to replace multiple IFs from the code to have only one UPDATE statement with condition that update the column only if the passed parameter is not null? In real scenario I have more than 3 columns and I don't want to write many IF blocks.
    Please help Gurus!!
    Edited by: Kuul13 on Sep 18, 2009 1:26 PM

    Hi,
    You certainly don't want to issue separate UPDATE statements for every column; that will be really inefficent.
    SQL has several ways to implement IF-THEN-ELSE logic. CASE is the most versatile, but NVL will do everything you need for this job. You can use one of those to set a column to itself (and therefore not really update that column) when appropriate.
    For example:
    CREATE OR REPLACE PROCEDURE TMP_PROC (
      pPOL_NUM   IN       NUMBER,
      pOED          IN   DATE,
      pTERM          IN   NUMBER,
      pTRANS_CD  IN       CHAR
    AS
    BEGIN
         UPDATE  temp
         SET     oed      = NVL (poed,       oed)
         ,     term      = NVL (pterm,       term)
         ,     trans_cd = NVL (ptrans_cd, trans_cd)
         WHERE     pol_num      = ppol_num;
      COMMIT;     -- Maybe
    END    tmp_proc;"EXCEPTION WHEN OTHERS THEN NULL" is almost always a bad idea. If there's an error, don't you want to know about it? Shouldn't you at least log a message in a warnings table or something?
    Think careflully about whether or not you want to COMMIT every time you call this procedure.
    Just as it's inefficient to issue a separate UPDATE statement for every column, it's also inefficient to issue a separate UPDATE statement for every row. If efficiency is important, it should be possible to UPDATE several rows in a single UPDATE statement, using NVL (or CASE, or COALESCE, or NULLIF, or NVL2, or ...).
    This was a very well-written question! Thanks for providing the CREATE TABLE and INSERT statements, and such a clear explanation.

  • Updating certain rows of table by external file??

    Hello gentlemen,
    I need your help.I have a very large table.I need to update certain rows of table every day(around 200 per day)
    I would like by using an external file (.csv or .txt) to update certain column on the 200 rows i have in the external file.
    Can this be done?Do i need to write down a pl/sql procedure?Please help.I am a newbie to pl/sql but it will save me much time every day if i manage to do this.
    Thank you in advance for your help.

    I made a first attempt to create the external table from a .txt file.
    I used the below:
    CREATE TABLE pol_test
    (STATUS VARCHAR2(30 CHAR),
    ASFAL VARCHAR2(20 CHAR)
    ORGANIZATION EXTERNAL
    (TYPE ORACLE_LOADER
    DEFAULT DIRECTORY def_dir1
    ACCESS PARAMETERS
    (RECORDS DELIMITED BY STRING
    FIELDS (STATUS VARCHAR2(30 CHAR),
    ASFAL VARCHAR2(20 CHAR)
    LOCATION ('C:\Users\t.christopoulos\Desktop\TEST.TXT')
    I get the below error :
    Error report:
    SQL Error: ORA-06564: object DEF_DIR1 does not exist
    06564. 00000 - "object %s does not exist"
    *Cause:    The named object could not be found.  Either it does not exist
    or you do not have permission to access it.
    *Action:   Create the object or get permission to access it.
    I suppose that it goes to create the directory on the server where i dont have access.I run these commands from my desktop using SQL developer.

  • Need Checklist for migrating MS SQL 2005 SP2 to MS SQL 2012

    Dear Member,
    We are in process of  migrating our MS SQL 2005 SP2 db engine / SSIS/SSRS services to 2012.Need to know steps/checklist and experiences of migration.
    I have read on Microsoft site (http://msdn.microsoft.com/en-in/library/ms143393(v=sql.110).aspx), that we can only migrate SQL 2005 with SP4 to SQL 2012.Do we need to upgrade first existing 2005 SP2 to SP4 and then start migration.
    Regards,
    Mahesh 

    Hello,
    Yes, you need to apply SP4 first, if you choose to perform an in-place upgrade.
    You have the option to perform a side-by-side upgrade too. Please refer to the following guide:
    http://download.microsoft.com/download/9/5/3/9533501A-6F3E-4D03-A6A3-359AF6A79877/SQL_Server_2012_Upgrade_Technical_Reference_Guide_White_Paper.pdf
    Hope this helps.
    Regards,
    Alberto Morillo

  • Restict read only users to certain columns

    Hi guys ,
    I want to restrict read-only users to read only certain columns on the table.How do I go about restricting?

    Always include the following information when asking a question:
    <ul>
    <li>Full APEX version</li>
    <li>Full DB/version/edition/host OS</li>
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)</li>
    <li>Browser(s) and version(s) used</li>
    <li>Theme</li>
    <li>Template(s)</li>
    <li>Region/item type(s)</li>
    </ul>
    935462 wrote:
    Hi guys ,
    I want to restrict read-only users to read only certain columns on the table.How do I go about restricting?Who are readonly users? How are they determined?
    What exactly are you talking about?
    Is it a report, If then which report Interactive or Classic?
    In either of them you can do conditional display of column using the same login
    Look at this for options http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/bldapp_rpt_att.htm#BCEBDIFA

  • Display a particular column only when certain criteria is satisfied

    Hi Experts,
    I have a requirement from a user with which i am struggling. The person wants to see an entire report but see a particular column only when certain criteria is satisfied. I am not talking about filtering the entire Query but just a certain column.
    Ex.
    Data in Cube
    Req | Candidate | Candidate Status | Grade
    1 | C01 | Draft | A
    1 | C02 | Withdrawn | B
    2 | C03 | Hired | B
    3 | C04 | In Process | A
    3 | C05 | Hired | C
    Result in Query
    Req | Candidate | Grade
    1 | <Blank> | A
    1 | <blank> | B
    2 | C03 | B
    3 | <blank> | A
    3 | C05 | C
    Basically, user wants to see candidate information only when Status is Hired. Rest of the time, it should be blank.
    Is this possible ?

    Hi,
    From My view this is not possible in Query.
    You can do this in Backend or
    You can create 2 Query
    1.Query whith candidate name who is hired.
    2.Query without candidate name whose status is not hired.
    3.Merge these these report using Excel Macro.
    Thanks and Regads,
    MuraliManohar

  • SQL Server 2012 Cumulative update package 2 (CU2) for SQL Server 2012 Service Pack 2 - why only for x86 ?

    Hey guys...
    Im a little bit confused... i wanted to download the newest hotfixes for SQL server 2012...
    But the download for :
    2983175 Cumulative update package 2 (CU2) for SQL Server 2012 Service Pack
    is only for the platform: x86 available ... but my SQL server 2012 is running in a x64 environment...
    (when i checked the older cumulative updates... they're all only for x86.. can someone tell me why ? )
    thanks and regards,
    Dominic

    There doesn't exist an SQL Express "Standard". It's two different editions.
    For Express there are three 32bit/64bit editions:
    Express, Express with Tools and Express with Advanced Services.
    Express with Tools is essentially Express with Management Studio Tools, Express with Advanced Services adds also BI (Business Intelligence) + Reporting Services.
    As for where you can apply the cumulative update, on the link you can see this:
        Microsoft SQL Server 2012 Service Pack 2, when used with:
            Microsoft SQL Server 2012 Analysis Services
            Microsoft SQL Server 2012 Developer
            Microsoft SQL Server 2012 Enterprise
            Microsoft SQL Server 2012 Express
            Microsoft SQL Server 2012 Business Intelligence
            Microsoft SQL Server 2012 Standard
            Microsoft SQL Server 2012 Web
    "If there's nothing wrong with me, maybe there's something wrong with the universe!"

  • Execute PL/SQL statement on rendered report column only (APEX 4.02)

    Hello,
    i have a classic report which selects approx. 100.000 rows. For one of the columns in the sql i am executing
    a rather complex PL/SQL function which generates additional html. This function slows down the query
    by a tremendous amount (over one hour for the select, without this function it's 30 seconds) so i don't
    want to execute it for each selected row but for the rendered ones only (15 per page).
    Is it possible to do so in a report?

    Steven Mark wrote:
    So if APEX does not give us the option to execute PL/SQL scripts on actually rendered columns onlyI have long thought that this is a major limitation of APEX. We know from Marc's post Re: Reports/Tabular Form and number of executions of a Lov Query that built-in column display operations are only performed for the rows rendered on the current page. However, there are many requirements (even relatively simple ones like row-level conditional display) that are impossible to meet using the built-in Display As/LOV, HTML Expression, Tabular Form Element, and Column Link display options. The alternatives are inefficient (context switching to user-defined functions) or poor practice (losing the separation of concerns by generating HTML/links in report queries).
    The ability to call user-defined functions at the same rendering point as built-in column display operations, and to apply row-level conditions to built-in display options are long overdue enhancements.

  • Using ipone4s, since update to IOS6 I cannot use "search" in the App Store.  I deleted an App because I was have trouble activating certain features since the update to IOS6 - only to find now I cannot download the App to use AT ALL.  ???????

    Using ipone4s, since update to IOS6 I cannot use "search" in the App Store.  I deleted an App because I was have trouble activating certain features since the update to IOS6 - only to find now I cannot download the App to use AT ALL.  ???????

    Anything* >.<

  • SQL Developer dropping first column in a SQL SELECT

    Am not too certain who to report this to... but I just noticed that SQL Developer will not return the first column in a SELECT statement when there is a comment just after the SELECT reserved word when running the query in the SQL Worksheet. For instance:
    SELECT -- > HEADER INFORMATION STARTS HERE <--
    w.stu_id HDR_STU_ID,
    w.wiser_id HDR_WISER_ID,
    iep.wiep_id HDR_WIEP_ID,
    sis.wisis_id HDR_WISIS_ID,
    FROM wiser_exit exit
    INNER JOIN wiser w
    ON exit.wiser_id = w.wiser_id
    INNER JOIN wiser_iep iep
    ON w.wiser_id = iep.wiser_id
    INNER JOIN vw_wiser_iep_sis sis
    ON iep.wiep_id = sis.wiep_id
    will just return columns 2 - 4 (HDR_WISER_ID, HDR_WIEP_ID, and HDR_WISIS_ID), and NOT column HDR_STU_ID.
    I verified this by running the same query in SQL Commands in the SQL Workshop of APEX, and the resultset returned all the columns including HDR_STU_ID.
    Just ran another quick test in SQL Developer, and get the same results from a SELECT against a single table:
    SELECT -- > HEADER INFORMATION STARTS HERE <--
    county_cd,
    odd_even_flg,
    street_name
    FROM dime
    Did not return the county_cd column.
    I know, it's just a minor quirk, but I thought I would mention it.

    John,
    Thank you. I replaced the '--' comments with the '/*' '*/' style and it picked up the first column.
    I guess I'll just have to break an old habit I've been doing for years for comments. Dang, I hope all that old code doesn't break...
    Thomas
    Spoke too soon. I followed up by checking what Oracle's 'Oracle Database 10g The Complete Reference' had to say about the issue of using '--' for comments and under '-- (Comment)' it says "-- tells oracle a comment has begun. Everything from that point to the end of the line is treated as a comment. These delimiters are used only within SQL itself or in PL/SQL ..."
    So I guess I can continue using '--', but need to keep in mind that in certain circumstances it might not work as expected. YMMV
    Edited by: Thomas 8246 on Feb 19, 2010 8:09 PM

Maybe you are looking for

  • Very urgent: How to append the form elements to the Querytext

    Hi All, Could anyone please guide me thru of how we can pass the Querytext in the serach results page in content server 10gR3. As far as I knew we pass thru in submitfrm() function in the resource include query_submit_form_function. Am actually tryin

  • PDA: How does the VI in the "Calling External Code (Inline C Method)" example link to the called functions?

    The PDA module provides an example of calling external code via an inline C The inline source code from the example:      OSVERSIONINFO info;      info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);      Err = GetVersionEx(&info);      MajorVersion = i

  • Activation de Photoshop Elements 13

    eBonjour, J'ai acheté à a FNAC le logiciel Photoshop Elements 13, qui vient avec une carte à gratter qui donne un code d'accès, qaui donne un numéro de série et permet de télécharger le programme. Après une heure et demie de téléchargement, des fichi

  • Any way I can view received messages online ?

    My phones not turning on so I've been using imessage on my mac, i usually sign out of it so no peeping could happen but I'm afraid I'm missing some messages being sent to me. Is there any way I can view the messages that have already been sent and no

  • Locating iTunes Library within Time Machine Backup

    Hey guys interesting one for you. Double clicking on my Backup drive (external) on the desktop shows all the files, folders etc, that have been backed up by TM. Now my main purpose is to backup my iTunes Library. But when looking through the folders,