Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2004
    Location
    austin
    Posts
    146

    Unanswered: inserting <NULL>

    how do you write an insert into statement and keep <NULL> in the null cells?

    i was trying something like this BUT when you try to write an IS NULL statement it doesnt work.

    Code:
    ISNULL(dbo.TRUNK02_LastVersion_PayableClaims_01.MOD1, NULL) AS Mod1,

  2. #2
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    ISNULL(dbo.TRUNK02_LastVersion_PayableClaims_01.MO , NULL) AS Mod1,
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  3. #3
    Join Date
    Jan 2004
    Location
    austin
    Posts
    146
    how is this any different?

    ISNULL(dbo.qry_TRUNK02_LastVersion_PayableClaims01 .MOD1, NULL) AS Mod1


    after i truncate and insert into my table i need to be able to query with an IS NULL statement.

    select mod1
    from table
    where mod1 is null
    Last edited by michelin man; 10-14-05 at 12:16.

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Books online: ISNULL Replaces NULL with the specified replacement value.
    So what is the point of ISNULL([A], Null)?

    Please explain more clearly what you are trying to do, and give some sample data.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  5. #5
    Join Date
    Feb 2004
    Location
    Burbank & Santa Cruz de la Sierra
    Posts
    3,716
    Yeah, what The Blind One said...

    are you just meaning to insert a NULL into a column of a table?

    as in:
    Code:
    INSERT INTO dbo.TRUNK02_LastVersion_PayableClaims_01 (Mod1, ...)
    VALUES (NULL, ...)
    ?????
    aka "Paul"
    Non est ei similis.

    I just read "100 Things To Do Before You Die". I was surprised that "Yell for help!!" wasn't one of them

Posting Permissions

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