Lock a column from updating

Posted on 2009-04-16
Last Modified: 2012-05-06
Hello, I need to create a SQL query where one of the columns only gets updated on a certain date of the month. So a basic ORACLE table with 10 columns (all defined as integers) or so and one column 'Lcol' selects the data from one of the other columns in the same table on the 4th of every month. And I need it to update when future months come on the 4th.

Would a simple case statement with a 'when sysdate like '%04% select temp from foo' work?

thank you
Question by:amaher84
    LVL 142

    Accepted Solution

    you need to use something like this as the condition expression:

    TRIM(TO_CHAR(sysdate, 'DD')) IN ( '04', '4')

    for the rest, I am not sure what exactly you are trying to implement...

    Author Comment

    Thank you so much, I think that will work nicely.  

    Author Closing Comment

    Thanks so much I appreciate it.

    One last thing, if you don't mind, can you give me a good reference that will explain joins? Mostly 'joins' and 'left joins' and what's the difference between the two and when to use them?

    Thanks again for your help
    LVL 142

    Expert Comment

    by:Guy Hengel [angelIII / a3]

    Author Comment


    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Introduction Hopefully the following mnemonic and, ultimately, the acronym it represents is common place to all those reading: Please Excuse My Dear Aunt Sally (PEMDAS). Briefly, though, PEMDAS is used to signify the order of operations (http://en.…
    'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now