我正在查询,但是我的字段(长文本)仅返回255个字符。我不知道为什么。
我的栏位名称:
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
我在另一个网站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,它可以正常工作
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句