Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT-SQL command have different results in VFP8 and VF
Message
 
 
To
04/05/2005 15:35:45
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01010955
Message ID:
01011012
Views:
19
Aleksey,

I posted code that repro the bug in Re: SELECT-SQL command have different results in VFP8 and VF Message #1010985. Or you can change the first insert in your code to
INSERT INTO taba values("0101","desc","")
Notice empty field2.

>Hi Carlos,
>
>The following code produces identical result in VFP9 and VFP8:
>
>CLEAR
>
>CREATE CURSOR taba (id C(4), field1 C(4), field2 C(5))
>INSERT INTO taba values("0101","desc","1")
>INSERT INTO taba values("0201","desc","2 X")
>
>CREATE CURSOR tabb (id C(6), field1 C(1))
>INSERT INTO tabb values("010101","1")
>INSERT INTO tabb values("010102","2")
>INSERT INTO tabb values("010103","3")
>INSERT INTO tabb values("020101","1")
>INSERT INTO tabb values("020102","2")
>INSERT INTO tabb values("020103","3")
>
>select * from tabb left join taba on left(tabb.id,4)=taba.id where not empty(taba.field2) INTO CURSOR res
>list
>
>
>The result is (it looks correct to me):
>
>Record#  ID_A   FIELD1_A ID_B   FIELD1_B FIELD2
>      1  010101 1        0101   desc     1
>      2  010102 2        0101   desc     1
>      3  010103 3        0101   desc     1
>      4  020101 1        0201   desc     2 X
>      5  020102 2        0201   desc     2 X
>      6  020103 3        0201   desc     2 X
>
>
>Could you modify the code to get results you are describing?
>
>Thanks,
>Aleksey.
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform