CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Clearing Field

  1. #1
    Join Date
    Apr 1999
    Location
    Germany
    Posts
    53

    Clearing Field

    Hi,

    I want to remove all Data in one Field and insert in another Field of the same record.

    For example:
    Fields: Name, Street

    At the moment:
    NAME = Test
    STREET = Teststreet

    I want to make:
    NAME = anothername
    STREET should be empty

    How can I do this.

    At the moment I try

    UPDATE table SET Name = 'anothername', Street = '' WHERE Name = 'Test'

    But I get an error message.


    Who can help me?

    Thanx in advance

    Karsten


  2. #2
    Join Date
    Jul 1999
    Location
    Moscow, Russia
    Posts
    667

    Re: Clearing Field

    Hi, try this:

    UPDATE table
    SET Name = 'anothername', Street =NULL
    WHERE Name = 'Test'

    Hope this helps,
    Oleg.



Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured