Hi Steven,
if your first select statement does not work, but your second ALWAYS works, the reason must be that LEN(emp1no)#LEN(employeenumber), or LEN(jobno)#LEN(JobNumber). Find out which length does not match, and use the PADR() function.
Select * From ntimetbl Where emp1no+DTOC(wend)+PADR(jobno,10) == checkthisentry InTo Cursor myVerifySingle
OR
Select * From ntimetbl Where PADR(emp1no,10)+DTOC(wend)+jobno == checkthisentry InTo Cursor myVerifySingle
OR
Select * From ntimetbl Where PADR(emp1no,10)+DTOC(wend)+PADR(jobno,10) == checkthisentry InTo Cursor myVerifySingle
You need to replace 10 with the actual field length.
if your first select statement does not work, but your second ALWAYS works, I can conclude that LEN(ALLTRIM(emp1no)) is constant. This is because
>I am hung up on an index again and need some help with this post you made to me about AllTrim in an index.
>
>My Index is set on employeenumber+DTOC(weekDate)+JobNumber.
>
>The data in this fields is variable length.
>
>My Select statement is
>
>Select * From ntimetbl Where emp1no+DTOC(wend)+jobno == checkthisentry InTo Cursor myVerifySingle
>
>This will not work unless I use
>Select * From ntimetbl Where AllT(emp1no)+DTOC(wend)+AllT(jobno) == checkthisentry InTo Cursor myVerifySingle
>
>Which I am not sure takes advantage of the index.
>
>Please help me to understand.