Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Query problem
Message
From
18/12/2000 09:57:32
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00454602
Message ID:
00454665
Views:
20
Mike,

I put a breakpoint right before the query and check the value and type of "&INV", &INV, and INV.

STORE "2 " TO INV

INV was = "2 "
&INV was 2 (numeric)
and "&INV" showed in the Watch window as Name: "2 " Value "2 "

Are you sure you didn't mean WHERE Factgrostete.invnumb = &INV; in your second example?

There shouldn't be any problem with spaces before the semmicolons unless you are building a command string, in which case Vlad's comment is true. Personally, I use a space because that's the way I like it! ;-)

Also, if you hit reply you'll notice that I put < pre > and < /pre > (without spaces) around the code. Makes it read better!


>Can someone explain to me why this works:
>
>
STOR ALLT(THISFORM.INVNUMB1.VALUE) TO INV
>SELECT *;
> FROM  transactions!factgrostete INNER JOIN transactions!factgros ;
>   ON  Factgrostete.invnumb = Factgros.invnumb;
> WHERE Factgrostete.invnumb = "&INV";
> INTO CURSOR QUERY1
>
>And this does not:
>
>
STOR ALLT(THISFORM.INVNUMB1.VALUE) TO INV
>SELECT *;
> FROM  transactions!factgrostete INNER JOIN transactions!factgros ;
>   ON  Factgrostete.invnumb = Factgros.invnumb;
> WHERE Factgrostete.invnumb = INV;
> INTO CURSOR QUERY1
>
>Whit this one I get an Operand mismatch. The INV value is character and the invnumb field is character.
Previous
Reply
Map
View

Click here to load this message in the networking platform