Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL statement is not working...
Message
From
29/07/2005 09:57:02
 
 
To
29/07/2005 09:52:30
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:
01036954
Views:
10
>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


Ron,
Did you check the Sergey's answer?
m_lidnrfactuur     = PADR(ALLTRIM(m_lidnrfactuur),LEN(debnr))
m_branchenrfactuur = PADR(ALLTRIM(m_branchenrfactuur), LEN(branche))

SELECT branche, debnr, factuurnr, factuurdat FROM m_facturenbestand ;
       WHERE debnr   == m_lidnrfactuur     AND ;  && See the [==]
             branche == m_branchenrfactuur AND ;  && Again [==]
             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