Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003

    Unanswered: Finding column names

    I have columns like jan,feb,mar,apr,dec,etc. (these are column names). I want to update the values in the column , where the name of the column is present month name.

    For ex, i want to update the values in dec. only. Every time, the program should find out the current month and update only the values in the current month column.
    sampath gowri

  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    My initial reaction is that the table "design" is flawed & complicates processing.
    You could use
    if you insist on keeping the proposed columns.

    What prevent your from having a single "MONTH" column that gets the name for that month?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Mar 2004

    Thumbs down Bad Design! Bad Desing!

    Did you have any database design? This is too bad to make each instance of and entity as a column,but you have some strong reasons.
    -let me know please

  4. #4
    Join Date
    Oct 2004
    Granted it is a bad design, if you have to work with this design. I would suggest you read up on generating dynamic sql for your updates.

    variable = Month_string_from_sys_date_or_date;
    Update static_table_name
    set variable(string taken from sysdate) = value ;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts