MS Access query returning Chinese characters - possible table corruption?

后端 未结 4 620
孤城傲影
孤城傲影 2020-12-10 14:56

I copied and pasted a new version of the data into my MS Access table and now I\'m getting weird characters in my queries. Essentially if I say:

SELECT a,          


        
4条回答
  •  庸人自扰
    2020-12-10 15:41

    This is a bug typically met if grouping on a memo field.

    There may be several workarounds depending on your needs:

    Select 
        a, Left(b, 255) As b
    From 
        table1 
    Group By 
        a, Left(b, 255)
    
    Select 
        a, Mid(b, 1) As b
    From 
        table1 
    Group By 
        a, Mid(b, 1)
    
    Select 
        a, First(b) As firstb
    From 
        table1 
    Group By 
        a
    
    Select 
        a, DLookUp("b","table1","Id = " & [table1]![Id] & "") AS b
    From 
        table1 
    Group By 
        a, DLookUp("b","table1","Id = " & [table1]![Id] & "")
    

提交回复
热议问题