Hi Guys,
Thanks for your help. I tried using the LIKE operator and the Query runs through without an error. Now to see if it's selected the correct data <s>.
Regards,
Gavin...
>Hi Gavin,
>
>Use the LIKE operator and some wildcards:
>
>
SELECT * ;
> FROM loadfile, client ;
> WHERE NOT EMPTY(loadfile.searchstr1) ;
> AND ALLTRIM(UPPER(client.company))LIKE "%" + UPPER(ALLTRIM(loadfile.searchstr1)) + "%"
>
>Cheers,
>
>Andrew
>
>>Hi All,
>>
>>I'm getting an error 'SQL: Internal error.' when issuing the following SQL Statement:
>>
>>
>>SELECT * ;
>> FROM loadfile, client ;
>> WHERE NOT EMPTY(loadfile.searchstr1) ;
>> AND UPPER(ALLTRIM(loadfile.searchstr1)) $ ALLTRIM(UPPER(client.company))
>>
>>
>>Loadfile is a VFP6.0 table and client is a FPW2.6 Table. Searchstr1 and Company Fields are both defined as C(55).
>>
>>The online help states the following:
>>
>>
>>SQL: Internal error (Error 1800)
>>An internal error has occurred.
>>
>>Record your recent actions while using Visual FoxPro and then call Microsoft
>>Support.
>>
>>
>>The Technical Writers must have been up all night thinking about this one !!!
>>
>>What I'm trying to achieve is to find a group of clients using a partial match on Company Name, E.g. if Searchstr1 contained 'Bunbury' then I want to find all occurences in the Client table that contain 'Bunbury' somewhere in the Company Name Field.
>>
>>Any Ideas as to what the problem might be?
>>
>>Thanks,
>>Gavin...