Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Location
    DE
    Posts
    6

    Unanswered: subselect varchar (strings)

    hello,

    my problem is the following: i want to update a table and set its entries as deleted if in another row this entry not exists ( the id is not there):

    example:

    UPDATE tableA
    SET
    deleted = '1'
    WHERE
    idA NOT IN
    ( SELECT idB FROM tableB );

    the id columns are varchars...this seems to be the problem!

    the error is:
    SQL0408N A value is not compatible with the data type of its assignment target. Target name is "<name>".

    i cannot change the varchar to char or something else...

    anyone can help me?
    thank you.

    P

  2. #2
    Join Date
    Nov 2003
    Location
    Germany
    Posts
    62
    Hi

    On what platform are you? Is it mainframe? I think the problem is with the column "deleted". May be this column is numeric?

  3. #3
    Join Date
    Nov 2003
    Location
    DE
    Posts
    6
    Originally posted by Walter Janissen
    Hi

    On what platform are you? Is it mainframe? I think the problem is with the column "deleted". May be this column is numeric?
    thanks but the problem was not a problem :-) it was my fault...you are really right...the problem was another column.

    P

Posting Permissions

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