How to lock a column?

how to lock a column?
pls give one example....

You can't lock a column, but lock rows of a table based on changes to a column.
This is done using FOR UPDATE clause
example
SELECT ENAME, SAL
FROM EMP
WHERE DEPTNO = 20
FOR UPDATE OF SALabove query will lock the employee records of department 20, till the lock is released.

Similar Messages

  • SNP: How to "lock" initial column in SNP data view (SCM7.0 / SP8)

    Hello experts,
    after a change from SCM5.0 to SCM7.0 we are seeing a change in a tiny but very important capability and we are trying to re-establish it in SCM7.0. If somebody has an idea how to address this that would be of great help:
    As of SCM5.0 users were able to lock the INITIAL column of an SNP DataView so that the column is the default start column and not the next future column. In SCM5.0 the solution had 2 elements
    A) set a user parameter in SU01 called /SAPAPO/SDP_STARTCOL to value X
    +
    B) double-click the header of the initial column in the SNP data view
    As of SCM7.0 this is not supported anymore. There is a certain user setting in an SNP data view (Settings --> Others --> "Period from last selection"  ) but this is not behaving to our needs and SAP is saying what we want from SCM5.0 is a non-supported feature in SCM7.0.
    So, does anybody have an idea how to solve this. I checked UserExits and BAdis in SPRO for interactive planning - there all kind of stuff but nothing having a method to allow / perform a "column locking" in an SNP Data view. Thanks for any tip or hint here.
    Regards
    Thomas

    Hello jejeje,
    thanks for your efforts - what you describe is something users have found out on our side too - a problem remains: you can save this setting "Period from last Selection" and it brings you to the INITIAL column but: once you have scrolled forward in the SNP data view (so that the INITIAL column has disappeared) and you leave the SNP data view or select another product ... it "remembers" that you last time left the data view NOT having INITIAL column as a start column.
    So, my users say that they scroll back to INITIAL column before selecting another part or using another SelectionID or leaving the SNP data view ... and of course they hate this since they have to do this a few hundred times a day worse case.
    We had a call open to SAP on this and I told them that is about productivity and usabaliity issue moving from SCM5.0 to SCM7.0 - but they have nothing more to say than "not supported anymore" - and the ultimate solution is / will be to modifiy SAP SCM standard coding - unless somebody from SAP is reading the discussioons here and is dedicated to help their customers which pay millions every year into SAP support fees.
    Thanks for your responses and effort !
    Regards
    Thomas

  • How to lock the statistics in column level.

    Hi All, i am using 10.2.0.1.0 version of oracle.
    I have gathered freuency histogram manually on one of my column of a table to provide more information to optimizer for better calculation of cardinality.
    Now i have my weekend job runs for gathering stats on schema level with method_opt as 'For all column size repeat'. But i dont want the stats of above column to be overridden by the stats job. I dont want to lock the statistics of whole table, but i just want to lock the column level stats for this table.
    how the above can be achieved?
    Below is the details.
    Code for manual histogram , i have eliminated many buckets purposely, as there are 194 buckets.
    DECLARE
    m_distcnt NUMBER := 916714;       -- num_distinct (As it is there in dba_tab_columns)
    m_density NUMBER := 0.00000109031397771616;  -- density (As it is there in dba_tab_columns)
    m_nullcnt NUMBER := 0;       -- num_nulls (As it is there in dba_tab_columns)
    m_avgclen NUMBER := 8;       -- avg_col_len (As it is there in dba_tab_columns)
    srec      dbms_stats.statrec;
    n_array   dbms_stats.numarray;
    BEGIN
      srec.epc := 3; -- no of end points
      n_array     := dbms_stats.numarray(3870     ,
                                                 3891     ,
                                                 3945     
      srec.bkvals := dbms_stats.numarray(25000     ,
                                                 55000     ,
                                                 100000     ,
      dbms_stats.prepare_column_values(srec, n_array);
      dbms_stats.set_column_stats('Schema1', 'USERS_HIST_TEST', 'COMPANYPK',
      distcnt => m_distcnt,
      density => m_density,
      nullcnt => m_nullcnt,
      srec    => srec,
      avgclen => m_avgclen,
      force => TRUE);
    END;
    -- Weekend job which will override above histogram
    DBMS_STATS.GATHER_SCHEMA_STATS (
        ownname          => 'Schema1',
        estimate_percent => dbms_stats.auto_sample_size,
        block_sample     => FALSE,
        method_opt       => 'FOR ALL COLUMNS SIZE REPEAT',
        DEGREE           => dbms_stats.default_degree,
        granularity      => 'DEFAULT',
        CASCADE          => TRUE,
        options          => 'GATHER STALE'
    Edited by: 930254 on Jul 4, 2012 9:08 AM

    Pl do not post duplicate threads - How to  lock the statistics in column level.

  • Lock particular column

    hai,
    any one tell 'How to lock the particular column in table ".
    but iam use like this
    cursor c1 is select ename,sal,comm from emp where deptno=:dtno
    for update of <<column name>>;
    the above statement is not working (unable to update other columns).
    Plz tell full scenario of locking method

    I find it amusing and a sad reflection on your expertise, that you put OCP in your handle, claiming to be an Oracle Certified Professional, and yet you have no idea how locking works in Oracle.
    > Plz tell full scenario of locking method
    RTFM. Chapter 13, Data Concurrency and Consistency in the [url http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/consist.htm#i13945]Oracle® Database Concepts guide.

  • How to Lock a Transaction for Editing AND VERY minor tab cont. help

    Just two things I need to ask about
    <b>1. How to Lock a Transaction for Editing</b>
    I am currently using the fcode ENQUEUE_E_TABLE. The function works as once the transaction in opened, another cannot access it.
    However, I have two modes in my transction (Display and Edit). <u> What I need to do is If another user has already opened the transaction, the other user can still access the transaction but cannot access the edit mode.</u>
    <b> 2. VERY minor tab cont. help </b>
    I noticed in a table control is being used in a transction you can resize a colunm. <u> How do you disable this </b>?
    and <u> how do you resize the horizontal scroll bar </u> so that you can limit scrolling upto the point where there are field columns?
    Thanks for you help ppl and take care

    Hi chad,
    This link will help u know abty different types of locks that are available:
    http://help.sap.com/saphelp_erp2005/helpdata/en/7b/f9813712f7434be10000009b38f8cf/frameset.htm
    For resizing all u can go to the table settings and u can do it.
    Hope tis helps u,
    Regards,
    Nagarajan.

  • How to lock a row in a db2/400

    Hi all,
    Could someone show me how to lock a row in the database DB2/400
    The scenario:
    DB.beginTransaction
    User 1 gets a row with a column bill_number
    "select bill_number from numbers where pk = xxx for update"
    aux_bill_number = bill_number
    USER 1 updated this row
    "update numbers set bill_number = bill_number +1 where pk = xxx "
    USER 1, like final step, insert aux_bill_number in other table as primary key
    DB.commitTransaction
    While doing so,
    User 2 also gets a row with a bill_number. this user must take bill_number with value 2, but take the same value 1
    This it causes key duplicated in the destiny table.
    Please, help me.
    How I must lock the row not to allow to read until finishing the previous transaction?

    Hi all,
    Could someone show me how to lock a row in the
    database DB2/400Isn't SELECT FOR UPDATE standard?
    >
    The scenario:
    DB.beginTransaction
    er 1 gets a row with a column bill_number
    "select bill_number from numbers where pk =
    xxx for update"
    aux_bill_number = bill_number
    1 updated this row
    "update numbers set bill_number = bill_number
    +1 where pk = xxx "
    USER 1, like final step, insert aux_bill_number in
    other table as primary key
    DB.commitTransactionSounds like you're trying to do something that a JOIN would do better.
    While doing so,
    User 2 also gets a row with a bill_number. this user
    must take bill_number with value 2, but take the
    same value 1
    This it causes key duplicated in the destiny table.
    Please, help me.
    How I must lock the row not to allow to read until
    finishing the previous transaction?Setting the isolation level to SERIALIZABLE might help.
    %

  • How to "lock" a cell reference in Numbers??

    HELP! I am a recent convert from Windows based machines to Apple. I am very familiar with Excel and need to figure out how to do something in Numbers....
    I need to know how to lock a cell reference so that when you drag the formula down or across it keeps the same cell reference. In Excel you can do this by picking the cell and then hitting F4 to either lock the column, row or both.
    Anybody out there help a newbie?? Thanks

    Thanks Jerrold, I'm using them that way. My request has to do with
    using them as an Absolute Reference versus a relative reference.
    If I specify a header ref for a cell in a formula, when I drag that
    formula to some other cells I want Numbers to treat it as absolute,
    ie. as if I had said $A$5. What I am finding is that it does it's default
    behaviour, ie. it is translating the formula reference to a new cell just
    as it would do for a reference like A5.
    ie. with header references, what is the equivalent of specifying $A$5?
    ($header name doesn't work ).
    thx, rob

  • How to set unequal columns using master pages in InDesign CS3?

    How to set unequal columns using master pages in InDesign CS3?

    I don't have CS3 anymore but I don't think this has substantially changed in the last few versions of InDesign.
    Choose View > Grids & Guides > uncheck Lock Column Guides. Then drag the column guides to the position you want.

  • How do I Freeze Columns in HTML Tables

    How do I Freeze Columns in HTML Tables when scroll vertically as well as horizontally? (header and some columns on LHS). I generate a JSP report which got more than 1000 rows. Please advise. Thanks.

    Gooooooooooooooooogle searched "Freeze Columns in HTML Tables"
    So many solutions available !!!!!
    see the 1st link
    http://web.tampabay.rr.com/bmerkey/examples/locked-column-csv.html

  • Reg:How to delete the column in table control also from database table.

    Hi Experts,
    Once again thank u all for giving the responses.
    one more doubt is how to delete the columns of table control and also the record shold delete from ztable.
    With Regards,
    Saroja.P.

    Hi,
    If you want to delete the rows in the table control and simultaneously delete it from the database table, then you can implement a 'DELETE' functionality specific to your table control. Have a MARK field (you will find that in the screen attributes of the table control -> give a name for the MARK field, you will find an additional MARK column at the beginning of your table control). You can check whatever rows you want to delete from the table control, call the delete module.
    "This portion of code inside the LOOP...ENDLOOP.
    IF sy-ucomm eq 'F_DELETE'.
       gt_itab2-check = mark.  " Store the MARK field status into your internal table's correspoding field 'check'
      MODIFY gt_itab INDEX tabcontrol-current_line.
    ENDIF.
    iF sy-ucomm eq 'DELETE1'.
      DELETE gt_itab WHERE check eq 'X'. "Your internal table does not have rows that you want to delete
    ENDIF.
    Now you can modify your database table using the MODIFY statement.
    MODIFY ZDB FROM TABLE gt_itab.

  • How to print all columns in one page

    Hi,
    Can anybody explain me how to print all columns in one page.we have around 15 to 20 columns for 4 reports and all these reports are build on one multiprovider.we are using BW 3.5.
    Can anyone explain me  how to print ALL COLUMNS IN ONE PAGE  .currently they are getting all columns in 2 to 3 pages. They are using PORTAL to run the reports here.
    Is it possible to do by customizing Webtemplate or by macros in Workbook.Please help me
    Edited by: kotha123 on Oct 11, 2010 5:58 PM

    Hi,
    Your best bet is to use a workbook template or else Excel to pdf option...Thanks

  • How can i suppress columns in ALV ?? Will reward points.

    Hello Gurus, how can i suppress column in ALV when i`m using the transparent table:
    CALL METHOD grid->set_table_for_first_display
          EXPORTING
            i_structure_name = 'ZIANEXE'
            is_layout        = wa_layout
            is_variant       = wa_variant
            i_save           = 'U'
            IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
          CHANGING
            it_outtab        = itab[]
            it_fieldcatalog  = fieldcat.
    Please help.

    in the fieldcatalog you are providing there is a field NO_OUT use this.
    Loop over internal table and check fieldname. If fieldname = column you want to hide, NO_OUT = 'X'.
    Edited by: Micky Oestreich on May 8, 2008 12:06 PM

  • How to lock record in a remote database ???

    Hi All!
    How to lock record in a remote table ??? Is it possible to lock by using the RPC ??? What are the options available ??
    thanks
    Sanjeeb Bose
    HCL Infosystems Ltd
    Kolkata India

    DBLinks may be one option...
    --Shirish                                                                                                                                                                                                                       

  • How to read BLOB column from a table in SQL or PL/SQL

    I have table which is having one BLOB data type column . Ihave inserted few rows in that table . Now i want to see wheather BLOB column has been inserted properly or not . How to read that column through SQL or PL/SQL.
    Can anyone help me to do this.

    You can only manipulate LOBs in PL/SQL because you have to use the DBMS_LOB package.
    Check out the Oracle Developer's Guide

  • FBL5N : how to add a column of the Account's name?

    Hi,
    the list displayed by Tcode : FBL5N contain only the number of account, please how to add a column of Account's name ?
    Please advise
    Regards.

    When you are in the FBL5N display results screen, use the menu option Settings --> Special Fields. 
    There are also the following notes which would explain you how to add special or new fields to the line items :
    - 310886     Line items: Dynamic selections ignored
    - 215798     FBL*N: Special fields are not displayed
    - 373268     Line item: new display field
    The special field has to exist in table T021S.

Maybe you are looking for

  • Help! iPhone will no longer sync with my iTunes library

    My iPhone thinks my iTunes library is not the one it is used to syncing to anymore for some reason, and whenever I try to sync music or applications, I get: "Do you want to erase this iPhone and sync with another iTunes library?" I don't want to eras

  • Captured video not in sync with audio

      I capture video and audio from a Sony Beta SX A-75 using the SDI output through Blackmajc card into dual 2.5. We are using DV compression. The audio is out of sync after capture. It is 3 frames off. If I slide the video 3 frames to the right on the

  • How to build my own SOAP envelope

    Hi after a lot of work I have now realised that my SOAP to SOAP scenario can't use SAP XI std SOAP ENVELOPE on the receiver part. How to I build my own SOAP ENV in my RECEIVER payload? iMaybe in the mapping or in the WSDL/XSD? Any guides or experiens

  • All Applications and Finder Crashing after Leopard Update!!

    I've tried everything. See previous question... http://discussions.apple.com/thread.jspa?threadID=1378080&tstart=0 Now the same problems keep arising... 2/5/08 1:09:36 AM [0x0-0xf00f].com.apple.Safari[213] Safari(213,0xa04da074) malloc: * error for o

  • Oracle 9i Lite ODBC driver issues

    Does the 9i Lite driver support a concept of username and password when getting a connection? With the Oracle 8i Personal ODBC driver, we are doing this, and then if we give a query like 'SELECT CASE_ID FROM CASE_AX', it works; but with the Lite driv