---
title: "Hämtar inte all text i PM-fält"
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/95188-hämtar-inte-all-text-i-pm-fält"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "Skarre"
published: "2004-01-19T10:04:16.000Z"
updated: "2004-01-19T10:43:53.000Z"
replies: 2
views: 231
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/asp/95188-hämtar-inte-all-text-i-pm-fält"
---

# Hämtar inte all text i PM-fält

## #1 — Skarre, 2004-01-19T10:04Z

Av någon anledning hämtas inte all text i ett PM-fält (Access) utan texten klipps av mitt i. Jag har aldrig tidigare råkat ut för detta.

Den relevanta koden:

```
sql = 	"SELECT DISTINCT gallerycategories.* " &_
		"FROM gallerycategories " &_
		"WHERE categoryid IN (SELECT categoryid FROM galleries WHERE galleryid IN (SELECT galleryid FROM gallerypics))"

Set conn = OpenConn()
Set categories = conn.Execute(sql)

If Not categories.EOF Then
	%>
	<table width="100%" border="0" cellspacing="0" cellpadding="3">
	<%
	Do Until categories.EOF
		desc = categories("description")
		%>
		<tr>
			<td>
				<strong><%=categories("name")%></strong>
				<%
				If Len(desc) > 0 Then
					Response.Write "<br>" & desc
				End If
				%>
```

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

## #2 — niko, 2004-01-19T10:36Z

> There are limitations in what you can do with queries with memo fields.
> Some good KB articles with info, but basically if anything in the query
> needs looking within the memo field itself, then it will only look at ( and
> return ) the first 256 or so characters. The SELECT DISTINCT is just such a
> case. Lose the DISTINCT and it will probably work.

[Källa](http://dbforums.com/arch/112/2003/6/822810)

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

## #3 — Skarre, 2004-01-19T10:43Z

Tack för den! Det var ju enkelt åtgärdat genom att köra DISTINCT på sub-queryn istället. :)

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

---

Tråden på webben: https://www.webforum.nu/amne/asp/95188-hämtar-inte-all-text-i-pm-fält
