문제

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).

도움이 되었습니까?

해결책 3

I had two similar Name fields, I misread one and it indeed was truncated in the actual table.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top