You must make sure that the expressions you compare have the same lengths OR always put the shortest in fron of equal sign. Try this in the command window:
?'AA'='A'
?'A'='AA'
>I removed all the ALLTRIM()'s out of my query. But still I get all the numbers that have a '5' (like in my example) This is the query:
>
>SELECT branche, debnr, factuurnr, factuurdat FROM m_facturenbestand ;
>WHERE debnr = m_lidnrfactuur AND ;
>branche = m_branchenrfactuur AND ;
>INT(VAL(pagina)) = 1 ;
>INTO TABLE temp4
>
>But..........
>
>If I say like this:
>
>SELECT branche, debnr, factuurnr, factuurdat FROM m_facturenbestand ;
>WHERE VAL(debnr) = VAL(m_lidnrfactuur) AND ;
>branche = m_branchenrfactuur AND ;
>INT(VAL(pagina)) = 1 ;
>INTO TABLE temp4
>
>I don't get any records at all ?! I only added the VAL() function in my query.
>
>I really don't know how to solve this one......
>
>Greetz,
>Ron