Hi So,
I never change SET EXACT--it's always OFF. I never change SET NEAR--it's always OFF. "==" is not a Rushmorizable expression. To ensure an exact match, you must match the lengths.
LOCAL SheetCode
SheetCode = PADR(m.SearchCode, FSIZE('SheetCode', 'Datas'))
SELECT * FROM MyTable WHERE SheetCode = m.SheetCode
Think ALLTRIM only for display. Think PADR() for matching a field to a variable exactly.
>>Dear all,
>>
>>In my table 2 sets of datas with sheetcode 'ABC2001001' and 'ABC2001001R01',
>>With a Select clasuse select * form table where sheetcode=searchcode into cursor temp. Whatever I put the searchcode as 'ABC2001001' or 'ABC2001001R01',
>>the temp table extract set of 'ABC2001001' . I had set near off and set exct on,
>>What else do I wrong ??
>>
>>With regards,
>>
>>
>>Ransome
>
>Hello.
>
>Are you *positive* SET EXACT is ON at the moment of SQL command execution? Maybe you are issuing the command in a form with private datasession, and in this case the SET command should be issued again....
>
>Anyway, you can use ALLTRIM(sheetcode)==ALLTRIM(searchcode). This will do the job disregarding the SET EXACT status
>
>
>Hope this helps
Charlie