Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL statement is not working...
Message
 
To
29/07/2005 09:12:17
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01036917
Message ID:
01036919
Views:
15
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform