Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2010
    Posts
    1

    Unanswered: Dynamic Coloumn update

    Hi,
    I need a help , I have a requirement as follows:

    Update Table1
    set Field1 = :Field1-Value,
    Field2 = :Field2-Value,
    Field3 = :Field3-Value
    Where Field4 = '1234'.

    Here I need to update Field3 only if Field3-Value is > spaces. If it is spaces
    I should not update this Field in the Sql. Please let me know if there is any way to do this.

  2. #2
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    how about a CASE statement when field3-value > '' then field3-value else filed3?
    Dave

  3. #3
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483
    if Field3-Value is > spaces
    ???
    What data types are Field3 and Value?

    Anyway, you can use CASE expression.

Posting Permissions

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