Article ID: 164869
Article Last Modified on 10/16/2002
* This section of code creates the table used for testing. CLOSE DATA ALL SET COLLATE TO "General" && or "German" CREATE TABLE test50 ( Field1 C(10), Field2 C(4) ) INDEX ON Field1 TAG Field1 INDEX ON Field2 TAG Field2 INSERT INTO test50 (field1,field2) VALUES ( "fpw26", "Ja" ) INSERT INTO test50 (field1,field2) VALUES ( "vfp50", "Kb" ) INSERT INTO test50 (field1,field2) VALUES ( "vfp30", "Ja" ) USE * NOTE: In the following segment, only ONE record is displayed * whereas there should be 2. USE test50 SHARED WAIT WINDOW 'it will do a BROWSE FOR on "Ja"' BROWSE FOR Field2 = "Ja" * In this example, COUNT doesn't find anything. WAIT WINDOW 'it will do a COUNT FOR on "Ja"' COUNT FOR Field2 = "Ja" TO x WAIT WINDOW "Total records found by Count: "+ALLTRIM(STR(x)) * Once again, only one record is displayed in the following select * statement: WAIT WINDOW "this will do an SQL WHERE Field2='Ja'" SELECT * FROM test50 WHERE Field2 = "Ja" * This SQL outputs 2 records. WAIT WINDOW "this will do an SQL WHERE Field2='J'" SELECT * FROM test50 WHERE Field2 = "J" * This SQL outputs one record. WAIT WINDOW "this will do an SQL WHERE Field2='Ja '" * NOTE: There is one space after the 'Ja.' SELECT * FROM test50 WHERE Field2 = "Ja " * This SQL outputs 2 records WAIT WINDOW "this will do an SQL WHERE Field2='Ja '" * NOTE: There are 2 spaces after the 'Ja.' SELECT * FROM test50 WHERE Field2 = "Ja "
Keywords: kbbug kbfix kbvfp500afix kbprogramming KB164869