---
title: "Select ger tomma celler"
type: "forum-thread"
url: "https://www.webforum.nu/amne/databaser-sql/187224-select-ger-tomma-celler"
topic: "Databaser & SQL"
topic_url: "https://www.webforum.nu/amne/databaser-sql"
author: "Rulle"
published: "2011-06-30T08:39:19.000Z"
updated: "2011-06-30T09:01:54.000Z"
replies: 1
views: 807
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/databaser-sql/187224-select-ger-tomma-celler"
---

# Select ger tomma celler

## #1 — Rulle, 2011-06-30T08:39Z

Hej
Kör en select-sats och jag får ut tomma celler, dvs det kan ha stått värden i dom tidigare men är nu tomma och jag vill bara ha ut dom som innehåller något. IS NOT NULL funkar inte, utan detta ger mig först alla channel som är tomma, men jag vill som sagt inte ha dessa med utan bara dom där channel har ett värde nu.

select L.vcchannel, S.vcresource, S.nvcinternal from dbo.tblChannel L
inner join dbo.tblResource S
on L.iresource=S.iresource
where vcchannel IS NOT NULL
order by 1,2 asc

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

## #2 — newseed, 2011-06-30T09:01Z

Om de innehåller en tom sträng så prova detta:

```
select L.vcchannel, S.vcresource, S.nvcinternal from dbo.tblChannel L
inner join dbo.tblResource S
on L.iresource=S.iresource
where vcchannel IS NOT NULL AND LEN(vcchannel) > 0
order by 1,2 asc
```

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

---

Tråden på webben: https://www.webforum.nu/amne/databaser-sql/187224-select-ger-tomma-celler
