---
title: "<NULL>"
type: "forum-thread"
url: "https://www.webforum.nu/amne/dotnet/68706-null"
topic: ".NET"
topic_url: "https://www.webforum.nu/amne/dotnet"
author: "firstchoice"
published: "2003-02-19T08:29:26.000Z"
updated: "2003-02-19T08:35:42.000Z"
replies: 1
views: 206
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/dotnet/68706-null"
---

# <NULL>

## #1 — firstchoice, 2003-02-19T08:29Z

om jag har en kollumn i en databas som antingen har en siffra som värde eller \<NULL\> (alltså inget)
hur skall If sattsen nedan funka?

```
    If lParentId <> -1 Then
        sql = sql & " AND CategoryParentId = " & lParentId
    Else
        sql = sql & " AND CategoryParentId =  Null
    End If
```

Permalänk: https://www.webforum.nu/p/68706

## #2 — firstchoice, 2003-02-19T08:35Z

tydligen skall det vara sä här:

```
sql = sql & " AND CategoryParentId Is Null"
```

Permalänk: https://www.webforum.nu/p/956890

---

Tråden på webben: https://www.webforum.nu/amne/dotnet/68706-null
