• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 238
  • Last Modified:

Lock a column from updating

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
0
amaher84
Asked:
amaher84
  • 3
  • 2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
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...
0
 
amaher84Author Commented:
Thank you so much, I think that will work nicely.  
0
 
amaher84Author Commented:
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
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
0
 
amaher84Author Commented:
thanks
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now