I had two similar Name fields, I misread one and it indeed was truncated in the actual table.
Access SQL/query has truncated field at 25 characters?
-
24-03-2022 - |
Frage
I have this query in Access:
SELECT a.title, a.init, a.name, l.User AS CreatedBy,
IIf(IsNull(l.Time),Null,DateAdd("s",l.Time,#3/1/1980#)) AS CreatedAt
FROM (Reports AS a LEFT JOIN
(SELECT id, Min([time]) AS Mintime FROM AuditLog GROUP BY id) AS t
ON a.id = t.id)
LEFT JOIN AuditLog AS l ON (t.mintime = l.time) AND (t.id = l.id)
WHERE (((a.name) Like 'start*') AND ((a.Active)='Y'));
But for some reason a.name
is truncated on every result in the query at 25 characters. Why is this? In the table Reports
it is correct and shows the full name (25+ characters long).
Lösung 3
Andere Tipps
Please check the field length of name attribute in table a. It must be more than the name you stored. I think your name length is larger than field length.
This could be due to the size of the a.name field. If the field is set to varchar(25), it is going to allow only 25 characters.
-Edit- Also check any procedures, queries, or outside sources that insert data into that field. It could be a paramter that has been misconfigured.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow