>Hi all,
>
>I have a strange thing going on inhere This is my SQL-statement:
>
>SELECT branche, debnr, factuurnr, factuurdat FROM ALLTRIM(m_facturenbestand) ;
>WHERE ALLTRIM(debnr) = ALLTRIM(m_lidnrfactuur) AND ALLTRIM(branche) = m_branchenrfactuur AND INT(VAL(pagina)) = 1 ;
>INTO TABLE temp4
>
>Now imagine that m_lidnrfactuur = '5' So I only want the records with debnr '5' but what happens is that my program returns all the records that have the digit '5' in the field debnr ?!
>
>So I get records like: 5000, 12345, 54, 6534, etc....
>
>How can I adjust my statement to only get the records that have only '5' in the field debnr?
>
>Thanx in advance
>Ron
lcAlias = ALLTRIM(m_facturenbestand)
m_lidnrfactuur = ALLTRIM(m_lidnrfactuur)
m_branchenrfactuur = ALLTRIM(m_branchenrfactuur)
SELECT branche, debnr, factuurnr, factuurdat;
FROM (lcAlias) ;
WHERE ALLTRIM(debnr) == m.m_lidnrfactuur AND ALLTRIM(branche) == m.m_branchenrfactuur AND INT(VAL(pagina))== 1 ;
INTO TABLE temp4
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.