Ok, I know what the problem is now. Somewhere along the line some fields have
obtained a space at the start. Garbage in, garbage out. Next time we wont
outsource our data entry.
Thanks for reading.
"JJBaxter" wrote:
> This query : select * from fitt_user_norm_31860_1
> Returns the 10 records as expected
>
> id comp status evidence_date verifier
> 1 ICTTC137B T 20/06/2008 Jim Campbell (ID:25432)
> 2 ICTTC010C M 8/10/2008 Leslie Bailey (MIL030555)
> 3 ICTTC009C M 8/10/2008 Leslie Bailey (MIL030555)
> 4 ICTTC013C M 8/10/2008 Leslie Bailey (MIL030555)
> 5 ICTTC137B M 8/10/2008 Leslie Bailey (MIL030555)
> 6 ICTTC136B M 8/10/2008 Leslie Bailey (MIL030555)
> 7 ICTTC010C T 26/06/2008 Hans-Dieter Kwasny (ID:30047)
> 8 ICTTC009C T 24/06/2008 Hans-Dieter Kwasny (ID:30047)
> 9 ICTTC011C T 8/10/2008 Leslie Bailey (MIL030555)
> 10 ICTTC013C T 24/06/2008 Hans-Dieter Kwasny (ID:30047)
>
> but this query : SELECT * FROM fitt_user_norm_31860_1 WHERE comp like 'I%'
> only returns 5 records even though field comp in every row starts with 'I'
>
> id comp status evidence_date verifier
> 1 ICTTC137B T 20/06/2008 Jim Campbell (ID:25432)
> 7 ICTTC010C T 26/06/2008 Hans-Dieter Kwasny (ID:30047)
> 8 ICTTC009C T 24/06/2008 Hans-Dieter Kwasny (ID:30047)
> 9 ICTTC011C T 8/10/2008 Leslie Bailey (MIL030555)
> 10 ICTTC013C T 24/06/2008 Hans-Dieter Kwasny (ID:30047)
>
> I've tried 'i%' as well as N'i%' and [comp] but I dont know what else to try.
>
> Fields types are
> id Long(4)
> comp VarChar(30)
> status VarChar(1)
> evidence_date DateTime(16)
> verifier VarChar(50)
>
> Any pointers appeaciated.
>
>> Stay informed about: I'm stumped - Why does this happen?