Article ID: 181085
Article Last Modified on 5/12/2003
SET COLLATE TO "Hungary"
*SET COLLATE TO "Machine"
CREATE CURSOR cur1 (field_a I)
**INDEX ON field_a TAG field_a
CREATE CURSOR cur2 (field_b I)
**INDEX ON field_b TAG field_b
SELECT 0
INSERT INTO cur1 VALUES (2838)
INSERT INTO cur2 VALUES (2830)
INSERT INTO cur2 VALUES (2838)
IF "05.00.00" $ VERSION()
SELECT * FROM cur1 INNER JOIN cur2 ON cur1.field_a=cur2.field_b
ELSE
SELECT * FROM cur1, cur2 WHERE cur1.field_a=cur2.field_b
ENDIF
SET COLLATE TO "Hungary"
Remove the comment from the following line of code:
*SET COLLATE TO "Machine"
Now, run the program. It should return one record.
CREATE CURSOR cur1 (field_a I)
**INDEX ON field_a TAG field_a
CREATE CURSOR cur2 (field_b I)
**INDEX ON field_b TAG field_b
Save and run the program. It should return one record.
CODEPAGE=1251
CLEAR ALL
CLEAR
** Store the current collation sequence to the variable yyy.
yyy=SET("collate")
** Setting collate to Russian, a collation sequence that illustrates
** the problem.
SET COLLATE TO "Russian"
*SET COLLATE TO "Machine"
** Create two cursors with one integer field in each.
CREATE CURSOR t1 (in1 i)
*INDEX ON in1 TAG in1
CREATE CURSOR t2 (in2 i)
*INDEX ON in2 TAG in2
** Populate each cursor with 2000 records, inserting the loop counter
** into the integer field.
FOR x=1 TO 2000
INSERT INTO t1 (in1) VALUES(x)
INSERT INTO t2 (in2) VALUES(x)
ENDFOR
** The SELECT statement to join the two tables.
SELECT * FROM t1,t2 WHERE in1=in2 INTO CURSOR t3
** Checking _Tally to see how many records the query returned.
WAIT WINDOW STR(_Tally)+" records returned by the query"
** Start of loop to determine what records are missing.
x=0
SCAN
x=x+1
IF NOT in1=x
WAIT WINDOW "Missing integer"+ STR(x)
x=in1
ENDIF
ENDSCAN
** Set collate back to its original setting.
SET COLLATE TO yyy
Keywords: kbbug kbvfp600fix kbpending KB181085