INSERT NULL

  • Afternoon,

    I have a set of data that I require importing to a database table called Products.

    Some of these need to mirror to what we have already in this table. Some of the fields in question are NULL.

    Is there a way that I can import NULL entries in the database?

    So in my Select part of the script I'm starting to write I have -

    SELECT

    0 AS RecordStatusID

    ,GETDATE() AS CreatedDate

    ,{ fn NOW() } AS CreatedTime

    ,2 AS CreatedByID

    ,1 AS BranchID

    --,AS ProductCode

    --,AS CatalogRef

    --,AS ProductDescription

    --,AS Units

    ,54 AS CategoryID

    --, AS Category2ID

    ,0 AS ManufacturerID

    ,NULL AS ManufacturerPartRef

    Would NULL AS ManufacturerPartRef be the correct way of doing this?

    Thanks

    Ryan

  • Answer on both questions - yes.

    _____________
    Code for TallyGenerator

  • Thanks

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply