为什么长文本字段在MS ACCESS 2013查询中仅返回255个字符? [英] Why a Long Text field is returning only 255 characters in a MS ACCESS 2013 query?

查看:240
本文介绍了为什么长文本字段在MS ACCESS 2013查询中仅返回255个字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在查询,但是我的字段(长文本)仅返回255个字符.我不知道为什么.

I'm doing a query, but my field (Long Text) is returning only 255 characters. I have no idea why.

我的字段名:

name: tb_Apartamentos.txt_Descricao

实际数据库值:

Quarto e sala super aconchegante equipado com TV a cabo, internet wireless e ar condicionado. O destaque fica por conta da excelente localização: Rua Bolívar, entre os Postos 4 e 5. Está a poucos metros do Baixo Copacabana, encontro das ruas Domingos Ferreira, Aires Saldanha e Bolívar. É neste local que fica uma das maiores concentrações de bares de Copacabana, onde cariocas e turistas disputam um lugar nas mesas ou nas calçadas para beber e jogar conversa fora.

我的查询:

SELECT DISTINCT 
    tb_Apartamentos.cod_Apartamento,
    tb_Apartamentos.txt_Titulo,
    tb_Apartamentos.txt_Descricao,
    tb_Apartamentos.txt_Endereco,
    tb_Apartamentos.txt_Bairro,
    tb_Apartamentos.txt_Cidade,
    (
        select count(tb_DisponibilidadeApartamentos.ind_Disponibilidade) 
        from tb_DisponibilidadeApartamentos 
        where ind_Disponibilidade = true 
            and tb_DisponibilidadeApartamentos.cod_Apartamento = tb_Apartamentos.cod_Apartamento  
    ) as qtd_Disponibilidade,
    (
        select count (tb_FotoApartamentos.cod_FotoApartamento) 
        from tb_FotoApartamentos 
        where tb_FotoApartamentos.cod_Apartamento = tb_Apartamentos.cod_Apartamento
    ) as qtd_FotoApartamento,
    tb_Apartamentos.txt_Periodo
FROM 
    (
        (
            tb_Apartamentos
            LEFT JOIN 
            tb_DisponibilidadeApartamentos 
                ON tb_Apartamentos.cod_Apartamento = tb_DisponibilidadeApartamentos.cod_Apartamento
        )
        LEFT JOIN 
        tb_FotoApartamentos 
            ON tb_Apartamentos.cod_Apartamento = tb_FotoApartamentos.cod_Apartamento
    )
WHERE tb_Apartamentos.cod_Apartamento = 5;

查询返回的输出:

Quarto e sala super aconchegante equipado com TV a cabo, internet wireless e ar condicionado. O destaque fica por conta da excelente localização: Rua Bolívar, entre os Postos 4 e 5. Está a poucos metros do Baixo Copacabana, encontro das ruas Domingo

推荐答案

我在另一个网站

I found this solution in another website http://www.pcreview.co.uk/forums/query-returns-first-255-characters-memo-field-t2603141.html:

The core if the issue is that Access returns only the first 255 characters
if it has to process the field.

That applies if you Group By a memo field (totals query), or if the query
deduplicates records (e.g. it has a DISTINCT or UNION), or if formatting is
applied to the field.

Examples of solving the problem:
a) If it is a Totals query, you could solve the problem by chosing First in
the Total row under the memo field instead of Group By.

b) Use UNION ALL instead of UNION.

c) Remove the DISTINCT. (If necessary, you can save the query without the
memo, and then build another query on top of that to get the memo.)

d) Remove anything from the Format property of the field in your table (or
the Format property of the text box on your form/report.)

我从查询中删除了DISTINCT,并且可以正常工作

I removed DISTINCT from my query and it works

这篇关于为什么长文本字段在MS ACCESS 2013查询中仅返回255个字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆